:root {
  --bg: #eef4fb;
  --surface: rgba(255, 255, 255, 0.93);
  --text: #13263d;
  --muted: #64758c;
  --line: rgba(19, 38, 61, 0.1);
  --primary: #0a6e8c;
  --primary-deep: #0f2f46;
  --accent: #ff7c19;
  --accent-soft: rgba(255, 124, 25, 0.12);
  --shadow: 0 18px 42px rgba(19, 38, 61, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.65;
  background:
    radial-gradient(circle at top left, rgba(10, 110, 140, 0.14), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 124, 25, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(248, 251, 255, 0.84);
  border-bottom: 1px solid rgba(19, 38, 61, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary), var(--accent));
  box-shadow: var(--shadow);
}

.brand-text small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand-text strong {
  font-size: 1.08rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: 0.25s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
}

.hero {
  padding: 2.8rem 0 1rem;
}

/* Griglie principali condivise dalle tre pagine */
.hero-grid,
.feature-grid,
.story-grid,
.cards,
.stats-grid,
.article-grid,
.facts-grid,
.spotlight,
.footer-grid {
  display: grid;
  gap: 1.2rem;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.feature-grid,
.story-grid,
.spotlight,
.footer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.cards,
.article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid,
.facts-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-card,
.hero-side,
.card,
.stat,
.article,
.fact,
.panel,
.page-hero,
.cta-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card,
.hero-side {
  position: relative;
  overflow: hidden;
}

/* Overlay per mantenere il testo leggibile sopra le immagini */
.hero-card img,
.hero-side img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}

.hero-content,
.hero-side-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 24, 45, 0.08), rgba(8, 24, 45, 0.86));
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1 {
  margin: 1rem 0 0.8rem;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.97;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.93);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.92rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #ffa24a);
  color: #1c2736;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.section {
  padding: 1.1rem 0 3rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.section-heading p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

.card,
.stat,
.article,
.fact,
.panel,
.cta-box {
  padding: 1.35rem;
}

.card h3,
.article h3,
.panel h3,
.cta-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.card p,
.article p,
.panel p,
.cta-box p,
.fact p {
  margin: 0;
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat strong,
.fact strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  color: var(--primary-deep);
}

.stat span,
.fact span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.article,
.media-card,
.story-visual {
  overflow: hidden;
}

.article img,
.media-card img,
.story-visual img,
.spotlight img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.article-content,
.media-content {
  padding: 1.25rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  margin: 2.2rem 0 1.4rem;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(10, 110, 140, 0.96), rgba(15, 47, 70, 0.96)),
    #0f2f46;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -45px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.panel ul {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.panel li {
  margin-bottom: 0.45rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.badge {
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--primary-deep);
  font-weight: 800;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(19, 38, 61, 0.08);
}

.footer-links {
  display: grid;
  gap: 0.65rem;
}

.footer-links a,
.footer-note,
.microcopy {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Adattamenti per tablet e smartphone */
@media (max-width: 980px) {
  .hero-grid,
  .feature-grid,
  .story-grid,
  .cards,
  .stats-grid,
  .article-grid,
  .facts-grid,
  .spotlight,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1 1 calc(50% - 0.75rem);
    text-align: center;
  }

  .hero-content,
  .hero-side-content,
  .page-hero {
    padding: 1.4rem;
  }

  .hero-card img,
  .hero-side img {
    min-height: 280px;
  }

  .article img,
  .media-card img,
  .spotlight img {
    height: 210px;
  }
}
