:root {
  --navy: #0e1f47;
  --navy-dark: #091531;
  --accent: #4aa8dc;
  --accent-light: #8fd0f0;
  --text-light: #eaf3fb;
  --text-dark: #1c2b42;
  --surface: #ffffff;
  --surface-alt: #f3f7fb;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--surface);
  line-height: 1.6;
}

a {
  color: inherit;
}

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

/* Header / Nav */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand img {
  height: 48px;
  width: auto;
}

.brand-text {
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-text span {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--accent-light);
  letter-spacing: 0.15em;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

nav.main-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.3rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--accent-light);
  border-bottom-color: var(--accent);
}

.btn-appuntamento {
  background: var(--accent);
  color: var(--navy-dark) !important;
  padding: 0.55rem 1.3rem !important;
  border-radius: 999px;
  font-weight: 700 !important;
  border-bottom: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-appuntamento:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  background: radial-gradient(120% 160% at 20% 0%, var(--navy) 0%, var(--navy-dark) 65%);
  color: var(--text-light);
  padding: 1.25rem 1.5rem 1.75rem;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero-logo {
  height: 310px;
  max-width: 100%;
  width: auto;
  margin: 0 auto 0.5rem;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
}

.hero p {
  color: #cfe0f2;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-contact {
  color: var(--accent-light) !important;
  font-size: 0.95rem !important;
  margin: 0 0 0.6rem !important;
}

.hero-contact .placeholder-note {
  font-style: italic;
  opacity: 0.75;
}

.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: var(--navy-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-hero:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* Sections */
section {
  padding: 2rem 1.5rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: var(--surface-alt);
}

h2 {
  color: var(--navy);
  font-size: 1.6rem;
  margin-top: 0;
}

.story-section .story-lead {
  font-size: 1.1rem;
  color: #33415c;
  max-width: 760px;
}

.founder-block {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 1.8rem 0;
}

.founder-photo {
  flex: 0 0 auto;
  width: 280px;
  height: 340px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(14, 31, 71, 0.18);
}

.founder-highlight {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--text-light);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  border-left: 5px solid var(--accent);
  flex: 1 1 auto;
  min-width: 0;
}

.founder-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.founder-highlight h3 {
  margin: 0 0 0.8rem;
  font-size: 1.6rem;
  color: var(--text-light);
}

.founder-highlight p {
  margin: 0;
  color: #d7e6f5;
  max-width: 720px;
}

.founding-callout {
  background: var(--surface-alt);
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  padding: 1.8rem 2.2rem;
  margin: 1.8rem 0;
}

.founding-callout p {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  max-width: 780px;
}

@media (max-width: 560px) {
  .founder-block {
    flex-direction: column;
    align-items: stretch;
  }

  .founder-photo {
    width: 100%;
    height: 240px;
  }
}

.story-text {
  color: #33415c;
  max-width: 760px;
}

.story-subheading {
  color: var(--navy);
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
}

.stats-section {
  background: radial-gradient(120% 160% at 20% 0%, var(--navy) 0%, var(--navy-dark) 65%);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.stats-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-tile {
  flex: 1 1 200px;
  max-width: 280px;
  text-align: center;
  padding: 0.5rem 1.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-tile:first-child {
  border-left: none;
}

.stats-section.in-view .stat-tile {
  opacity: 1;
  transform: translateY(0);
}

.stats-section.in-view .stat-tile:nth-child(1) { transition-delay: 0s; }
.stats-section.in-view .stat-tile:nth-child(2) { transition-delay: 0.15s; }
.stats-section.in-view .stat-tile:nth-child(3) { transition-delay: 0.3s; }

.stat-trend {
  width: 40px;
  height: 24px;
  margin: 0 auto 0.6rem;
  display: block;
}

.stat-trend rect {
  fill: var(--accent-light);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.1;
  font-variant-numeric: normal;
}

.stat-label {
  color: #b9cbe0;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

@media (max-width: 640px) {
  .stat-tile {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem 1rem;
  }

  .stat-tile:first-child {
    border-top: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-tile {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid #e2e9f2;
  border-radius: 12px;
  padding: 1.5rem;
}

.feature-card h3 {
  color: var(--navy);
  margin-top: 0;
  font-size: 1.05rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.doctor-card {
  background: var(--surface);
  border: 1px solid #e2e9f2;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 1.5rem;
}

.doctor-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-alt);
}

.doctor-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 3rem;
}

.doctor-card h3 {
  margin: 1.1rem 0 0.2rem;
  color: var(--navy);
}

.doctor-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
}

.doctor-bio {
  color: #4a5568;
  font-size: 0.92rem;
  padding: 0 1.2rem;
  margin: 0;
}

.state-msg {
  text-align: center;
  color: #6b7688;
  padding: 2rem 0;
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: #a9bcd4;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-light);
  text-decoration: none;
}

.site-footer .placeholder-note {
  font-style: italic;
  opacity: 0.7;
}

.legal-footer-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.legal-info {
  max-width: 640px;
  margin: 0.75rem auto 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #8ca0bc;
}

/* Legal pages (Privacy / Cookie policy) */
.legal-section {
  max-width: 800px;
}

.legal-section .section-inner {
  max-width: 800px;
}

.legal-updated {
  color: #6b7688;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: -0.5rem;
}

.legal-section h3 {
  color: var(--navy);
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.legal-section p {
  color: #33415c;
}

.legal-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e9f2;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.7rem;
  }
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--navy-dark);
  color: #d7e6f5;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
  font-size: 0.85rem;
}

.cookie-banner p {
  margin: 0;
  max-width: 640px;
}

.cookie-banner a {
  color: var(--accent-light);
}

.cookie-banner-dismiss {
  background: var(--accent);
  color: var(--navy-dark);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-banner-dismiss:hover {
  background: var(--accent-light);
}
