:root {
  --bg: #f8fbfb;
  --paper: #ffffff;
  --ink: #17333a;
  --muted: #5d7780;
  --line: #dbe8e8;
  --brand: #155a67;
  --brand-soft: #dff1f2;
  --accent: #c8a76d;
  --shadow: 0 14px 40px rgba(18, 61, 73, 0.10);
  --radius: 24px;
  --hero-glow: linear-gradient(135deg, rgba(21,90,103,.10), rgba(200,167,109,.08));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.9), rgba(255,255,255,.7) 30%, transparent 55%),
    linear-gradient(180deg, var(--bg), #f3f8f8 55%, #eef5f5);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(219,232,232,.88);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 0;
}
.brand { display: flex; align-items: center; gap: .85rem; font-weight: 800; color: var(--ink); }
.brand-logo {
  width: 46px; height: 46px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid rgba(200,167,109,.28);
}
.brand-text small { display:block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.nav-toggle {
  display:none; border:1px solid var(--line); background:#fff; border-radius:12px; padding:.6rem .8rem; font-weight:700; color:var(--brand);
}
.nav { display:flex; gap:.35rem; flex-wrap:wrap; justify-content:flex-end; }
.nav a {
  padding:.55rem .8rem; border-radius:999px; color:var(--ink); font-size:.94rem; font-weight:700;
}
.nav a.active, .nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration:none; }
.cta-inline {
  display:inline-flex; align-items:center; justify-content:center; padding:.9rem 1.15rem; border-radius:999px;
  background: var(--brand); color:#fff; font-weight:800; letter-spacing:.01em; box-shadow: var(--shadow);
}
.cta-inline.alt { background: #fff; color: var(--brand); border:1px solid rgba(21,90,103,.16); }
.hero { padding: 3.2rem 0 2rem; }
.hero-card {
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,255,255,.84));
  border: 1px solid rgba(219,232,232,.92);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  overflow:hidden;
}
.hero-grid {
  display:grid; grid-template-columns: 1.05fr .95fr; align-items:stretch;
}
.hero-copy { padding: 2.4rem; }
.eyebrow {
  display:inline-flex; align-items:center; gap:.45rem; padding:.45rem .82rem; border-radius:999px;
  background: var(--brand-soft); color:var(--brand); font-size:.84rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
}
.hero h1 { font-size: clamp(2rem, 3.4vw, 3.35rem); line-height:1.1; margin:1rem 0 1rem; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.3rem; }
.hero-actions { display:flex; gap:.8rem; flex-wrap:wrap; margin: 1.4rem 0 1.55rem; }
.highlight-list { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:.75rem; padding:0; list-style:none; margin:0; }
.highlight-list li {
  background:rgba(255,255,255,.7); border:1px solid rgba(219,232,232,.9); border-radius:18px; padding:.85rem .9rem; font-weight:700; color:var(--ink);
}
.hero-media { background: var(--hero-glow); min-height: 100%; position: relative; display:flex; align-items:center; justify-content:center; padding:14px; }
.hero-media img { width:100%; height:auto; max-height:100%; object-fit:contain; background:#fff; border-radius:18px; }
.hero-media::after {
  content:""; position:absolute; inset:auto 0 0 0; height: 26%; background: linear-gradient(180deg, transparent, rgba(255,255,255,.16)); pointer-events:none;
}
.section { padding: 1rem 0 1.45rem; }
.section.soft { padding-top: 2rem; }
.section-head { margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.6rem, 2vw, 2.2rem); margin: .35rem 0 0; }
.grid-2 { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:1rem; }
.card {
  background: var(--paper); border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.35rem 1.15rem;
}
.card h3 { margin:.15rem 0 .65rem; font-size:1.2rem; }
.card p { margin:.55rem 0 0; color:var(--muted); }
.info-band {
  margin: 1.35rem 0;
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, var(--brand-soft), rgba(255,255,255,.94));
  border: 1px solid rgba(21,90,103,.12);
}
.info-band strong { color: var(--brand); }
.faq { display:grid; gap:.9rem; }
.faq details {
  background: var(--paper); border:1px solid var(--line); border-radius: 18px; padding: 0 1rem; box-shadow: var(--shadow);
}
.faq summary { cursor:pointer; list-style:none; font-weight:800; padding: 1rem 0; }
.faq summary::-webkit-details-marker { display:none; }
.faq p, .faq li { color: var(--muted); }
.faq ol { margin: 0 0 1rem 1.2rem; padding: 0 0 0 .2rem; }
.faq li + li { margin-top: .35rem; }
.special-visual {
  margin: 1.35rem 0;
  background: linear-gradient(135deg, rgba(17,79,91,.98), rgba(37,124,128,.92));
  border-radius: calc(var(--radius) + 2px); padding: 1.4rem; overflow:hidden; position:relative; box-shadow: var(--shadow);
}
.special-visual h3, .special-visual p { color:#eff9f9; margin:0 0 .5rem; }
.cilia-loop {
  margin-top: 1rem; display:flex; gap: 1rem; width:max-content; animation: slide 18s linear infinite;
}
.cilia-track { overflow:hidden; border-radius: 22px; border:1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); padding: 1rem 0; }
.cell {
  width: 108px; min-width:108px; height: 154px; background: rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22); border-radius: 28px 28px 18px 18px; position:relative;
  display:flex; align-items:flex-end; justify-content:center; padding-bottom: 1rem;
}
.cell::before {
  content:""; position:absolute; inset: 16px 18px 34px; border-radius: 20px 20px 16px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.44), rgba(212,247,247,.18));
}
.cell::after {
  content:""; width: 28px; height: 28px; border-radius:50%; background: rgba(255,255,255,.86); position:absolute; bottom: 40px; box-shadow: inset 0 0 0 8px rgba(21,90,103,.16);
}
.cilia {
  position:absolute; top:-20px; left: 16px; right: 16px; display:flex; justify-content:space-between;
}
.cilia span {
  width: 2px; height: 30px; display:block; background: rgba(255,255,255,.82); border-radius: 2px; transform-origin: bottom center; animation: sway 1.7s ease-in-out infinite;
}
.cilia span:nth-child(2n) { animation-delay: .2s; }
.cilia span:nth-child(3n) { animation-delay: .4s; }
@keyframes sway {
  0%,100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(12deg) translateY(4px); }
}
@keyframes slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.contact-box {
  display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between; align-items:center;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.92));
  border-radius: calc(var(--radius) + 2px); border:1px solid var(--line); box-shadow: var(--shadow); padding:1.25rem;
}
.contact-box p { margin:.2rem 0; color:var(--muted); }
footer {
  margin-top: 2rem; padding: 2rem 0 2.6rem; background: rgba(255,255,255,.7); border-top: 1px solid var(--line);
}
.footer-grid {
  display:grid; grid-template-columns: 1.25fr .95fr; gap: 1rem; align-items:start;
}
.footer-brand p { color:var(--muted); margin:.45rem 0 0; }
.footer-nav { display:flex; flex-wrap:wrap; gap:.55rem; }
.footer-nav a {
  padding:.5rem .75rem; border-radius:999px; background: var(--paper); border:1px solid var(--line); font-weight:700;
}
.page-note { color:var(--muted); font-size:.92rem; margin-top:1rem; }
.theme-home { --bg:#f5fbfb; --brand:#165a66; --brand-soft:#dff4f5; --accent:#c9a86b; --hero-glow: linear-gradient(135deg, rgba(17,84,95,.08), rgba(201,168,107,.10)); }
.theme-dottore { --bg:#f4f8fb; --brand:#1f5a74; --brand-soft:#e1edf5; --accent:#d0a069; --hero-glow: linear-gradient(135deg, rgba(31,90,116,.08), rgba(208,160,105,.12)); }
.theme-orecchio { --bg:#f4fbfb; --brand:#14636f; --brand-soft:#dff5f6; --accent:#c5ab6f; --hero-glow: linear-gradient(135deg, rgba(20,99,111,.08), rgba(197,171,111,.12)); }
.theme-naso { --bg:#f7fbf6; --brand:#366451; --brand-soft:#e5f1ea; --accent:#c9ad70; --hero-glow: linear-gradient(135deg, rgba(54,100,81,.09), rgba(201,173,112,.12)); }
.theme-rino { --bg:#f5fbf9; --brand:#1d675d; --brand-soft:#dff4ee; --accent:#cda56e; --hero-glow: linear-gradient(135deg, rgba(29,103,93,.09), rgba(205,165,110,.12)); }
.theme-gola { --bg:#fbf8f6; --brand:#755153; --brand-soft:#f3e6e7; --accent:#c9aa74; --hero-glow: linear-gradient(135deg, rgba(117,81,83,.09), rgba(201,170,116,.12)); }
.theme-vertigini { --bg:#f6f7fb; --brand:#475d87; --brand-soft:#e6eaf6; --accent:#c9ae76; --hero-glow: linear-gradient(135deg, rgba(71,93,135,.09), rgba(201,174,118,.12)); }
.theme-russamento { --bg:#f5f7fb; --brand:#2f5d70; --brand-soft:#e4edf3; --accent:#c4aa72; --hero-glow: linear-gradient(135deg, rgba(47,93,112,.1), rgba(196,170,114,.14)); }
.theme-pediatrico { --bg:#f8fbff; --brand:#2a6790; --brand-soft:#e6f1f8; --accent:#d5af6c; --hero-glow: linear-gradient(135deg, rgba(42,103,144,.08), rgba(213,175,108,.12)); }
.theme-chirurgia { --bg:#f7f9fa; --brand:#30545f; --brand-soft:#e4eff2; --accent:#c9a268; --hero-glow: linear-gradient(135deg, rgba(48,84,95,.08), rgba(201,162,104,.12)); }
.theme-libri { --bg:#fbfaf5; --brand:#55604f; --brand-soft:#f1efe0; --accent:#b89459; --hero-glow: linear-gradient(135deg, rgba(85,96,79,.08), rgba(184,148,89,.14)); }
@media (max-width: 1024px) {
  .hero-grid, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .hero-copy { padding:1.5rem; }
}
@media (max-width: 860px) {
  .nav-toggle { display:inline-flex; }
  .nav { display:none; width:100%; padding-top:.25rem; }
  .nav.open { display:flex; }
  .topbar-inner { flex-wrap:wrap; }
  .highlight-list { grid-template-columns: 1fr; }
}


/* Home: sezioni tematiche cliccabili */
.home-topics-section { padding-top: 1.2rem; padding-bottom: 2.2rem; }
.home-topics-head { max-width: 820px; }
.home-topics-head p { margin: .7rem 0 0; color: var(--muted); font-size: 1.03rem; }
.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.home-topic-card {
  --topic-accent: var(--brand);
  display: grid;
  grid-template-columns: minmax(190px, .82fr) minmax(0, 1.18fr);
  min-height: 255px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-top: 5px solid var(--topic-accent);
  border-radius: 24px;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.home-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(18,61,73,.15);
  border-color: color-mix(in srgb, var(--topic-accent) 40%, var(--line));
  text-decoration: none;
}
.home-topic-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: .6rem;
  background: color-mix(in srgb, var(--topic-accent) 8%, #fff);
}
.home-topic-media img {
  width: 100%;
  height: 100%;
  max-height: 255px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
}
.home-topic-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem 1.35rem 1.2rem;
}
.home-topic-kicker {
  color: var(--topic-accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  font-weight: 900;
}
.home-topic-body h2 {
  margin: .38rem 0 .55rem;
  font-size: 1.55rem;
  color: var(--ink);
}
.home-topic-body p {
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
}
.home-topic-more {
  display: inline-flex;
  margin-top: .9rem;
  color: var(--topic-accent);
  font-weight: 850;
}
.topic-dottore { --topic-accent: #446c79; }
.topic-orecchio { --topic-accent: #28778a; }
.topic-naso { --topic-accent: #5b7f69; }
.topic-rino { --topic-accent: #317a6d; }
.topic-gola { --topic-accent: #93656a; }
.topic-vertigini { --topic-accent: #6076a3; }
.topic-russamento { --topic-accent: #536f82; }
.topic-pediatrico { --topic-accent: #4787b3; }
.topic-chirurgia { --topic-accent: #5e6970; }
.topic-libri { --topic-accent: #85724e; }
@media (max-width: 980px) {
  .home-topic-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .home-topic-card { grid-template-columns: 1fr; }
  .home-topic-media { min-height: 0; }
  .home-topic-media img { max-height: none; }
}
