/* ==========================================
   STUDIO OCULISTICO LUPIDI - style.css
   ========================================== */

:root{
  --brand:#0b4d8f;
  --brand-dark:#083566;
  --brand-light:#e8f1fa;
  --accent:#c8a04a;
  --text:#22272e;
  --text-soft:#5a6470;
  --text-mute:#8b98a9;
  --bg:#ffffff;
  --bg-soft:#f5f8fb;
  --border:#e4e9ef;
  --radius:14px;
  --radius-sm:8px;
  --shadow:0 6px 24px rgba(11,77,143,.08);
  --shadow-lg:0 12px 40px rgba(11,77,143,.12);
  --max:1200px;
  --stroke:1.75;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  font-size:16px;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-feature-settings:"cv02","cv03","cv04","cv11";
}
img{max-width:100%;height:auto;display:block}
a{color:var(--brand);text-decoration:none;transition:color .2s}
a:hover{color:var(--brand-dark)}
h1,h2,h3,h4{
  line-height:1.2;
  color:var(--text);
  margin:0 0 .6em;
  font-weight:700;
  letter-spacing:-.022em;
}
h1{font-size:clamp(1.9rem,4vw,2.8rem);font-weight:800;letter-spacing:-.03em}
h2{font-size:clamp(1.5rem,3vw,2.2rem);font-weight:700}
h3{font-size:clamp(1.15rem,2vw,1.4rem);font-weight:700}
h4{font-size:1.05rem;font-weight:600}
p{margin:0 0 1em}
ul{margin:0 0 1em;padding-left:1.2em}

.container{max-width:var(--max);margin:0 auto;padding:0 1.25rem}
.narrow{max-width:820px}

/* ---------- ICONS ---------- */
.icon{
  width:20px;height:20px;
  stroke:currentColor;
  stroke-width:var(--stroke);
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
  flex-shrink:0;
  display:inline-block;
  vertical-align:middle;
}
.icon-sm{width:16px;height:16px}
.icon-md{width:22px;height:22px}
.icon-lg{width:28px;height:28px}
.icon-xl{width:36px;height:36px}

/* ---------- Header ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);
}
.header-inner{display:flex;align-items:center;justify-content:space-between;padding:1rem 0;gap:1rem}
.logo{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  flex-shrink:0;
}
.logo img{
  display:block;
  height:48px;
  width:auto;
  max-width:260px;
  object-fit:contain;
}

.main-nav ul{list-style:none;display:flex;gap:.4rem;margin:0;padding:0}
.main-nav a{
  display:inline-block;padding:.6rem 1rem;border-radius:8px;
  color:var(--text);font-weight:500;font-size:.95rem;
}
.main-nav a:hover{background:var(--brand-light);color:var(--brand-dark)}
.main-nav a.active{color:var(--brand);background:var(--brand-light)}

.menu-toggle{
  display:none;background:none;border:0;cursor:pointer;
  width:44px;height:44px;padding:10px;flex-direction:column;justify-content:space-between;
}
.menu-toggle span{display:block;height:2px;background:var(--brand);border-radius:2px;transition:.3s}
.menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(9px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-9px) rotate(-45deg)}

@media(max-width:820px){
  .menu-toggle{display:flex}
  .main-nav{
    position:absolute;top:100%;left:0;right:0;
    background:#fff;border-bottom:1px solid var(--border);
    max-height:0;overflow:hidden;transition:max-height .3s ease;
  }
  .main-nav.open{max-height:400px}
  .main-nav ul{flex-direction:column;padding:1rem 1.25rem;gap:0}
  .main-nav a{display:block;padding:.85rem 1rem;border-radius:8px}
  .logo img{height:40px;max-width:220px}
}
@media(max-width:420px){
  .logo img{height:34px;max-width:180px}
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  padding:.85rem 1.5rem;border-radius:999px;
  font-weight:600;font-size:.92rem;text-align:center;
  letter-spacing:-.005em;
  border:2px solid transparent;cursor:pointer;
  transition:transform .15s, box-shadow .2s, background .2s, color .2s;
  white-space:nowrap;
  font-family:inherit;
}
.btn .icon{width:18px;height:18px}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-dark);color:#fff;transform:translateY(-1px);box-shadow:var(--shadow)}
.btn-ghost{background:transparent;color:var(--brand);border-color:var(--brand)}
.btn-ghost:hover{background:var(--brand);color:#fff}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  padding:5.5rem 0 6rem;
  background:
    linear-gradient(135deg,rgba(11,77,143,.94),rgba(8,53,102,.92)),
    url('../img/hero.webp') center/cover no-repeat,
    #0b4d8f;
  color:#fff;
}
.hero-inner{position:relative;z-index:1}
.hero-text{max-width:720px}
.hero .eyebrow{
  display:inline-block;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--accent);font-weight:700;margin-bottom:1.1rem;
}
.hero h1{color:#fff;font-weight:800;margin-bottom:1.1rem;letter-spacing:-.03em}
.hero h1 span{color:var(--accent)}
.hero-lead{font-size:1.08rem;color:rgba(255,255,255,.9);max-width:620px;margin-bottom:2rem;line-height:1.65}
.hero-cta{display:flex;flex-wrap:wrap;gap:.8rem}
.hero .btn-ghost{color:#fff;border-color:rgba(255,255,255,.7)}
.hero .btn-ghost:hover{background:#fff;color:var(--brand)}

/* ---------- Features ---------- */
.features{padding:4.5rem 0;background:var(--bg-soft)}
.grid{display:grid;gap:1.5rem}
.grid-2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}

.feature{
  text-align:center;background:#fff;border-radius:var(--radius);
  padding:2rem 1.5rem;box-shadow:var(--shadow);border:1px solid var(--border);
}
.feature-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:60px;height:60px;border-radius:16px;
  background:var(--brand-light);color:var(--brand);
  margin-bottom:1rem;
}
.feature-icon .icon{width:30px;height:30px}
.feature h3{font-size:1.05rem;color:var(--brand);margin-bottom:.5rem;letter-spacing:-.01em}
.feature p{color:var(--text-soft);font-size:.94rem;margin:0}

/* ---------- Section head ---------- */
.section-head{text-align:center;margin-bottom:2.5rem}
.section-head h2 span{color:var(--brand)}
.section-head p{color:var(--text-soft);max-width:640px;margin:0 auto}

/* ---------- Cards ---------- */
.pathologies{padding:4.5rem 0}
.card{
  background:#fff;border-radius:var(--radius);overflow:hidden;
  border:1px solid var(--border);box-shadow:var(--shadow);
  transition:transform .25s, box-shadow .25s;
  scroll-margin-top:90px;
}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.card-img{aspect-ratio:4/3;background:var(--brand-light) center/cover no-repeat}
.card-img img{width:100%;height:100%;object-fit:cover}
.card-body{padding:1.25rem 1.4rem 1.5rem}
.card-body h3{color:var(--brand);margin-bottom:.4rem;letter-spacing:-.01em}
.card-body p{color:var(--text-soft);font-size:.93rem;margin:0;line-height:1.6}

/* ---------- Services list ---------- */
.services-list{padding:3.5rem 0 4.5rem}
.group-title{
  font-size:1.35rem;color:var(--brand);
  padding-bottom:.6rem;border-bottom:2px solid var(--brand-light);
  margin:2.5rem 0 1.5rem;
  display:flex;align-items:center;gap:.6rem;
  letter-spacing:-.01em;
}
.group-title .icon{width:26px;height:26px;color:var(--brand)}
.group-title:first-child{margin-top:0}

.exam{
  background:#fff;border-radius:var(--radius);
  border:1px solid var(--border);padding:1.4rem 1.5rem;
  scroll-margin-top:90px;
}
.exam h3{font-size:1.05rem;color:var(--brand);margin-bottom:.5rem;letter-spacing:-.01em}
.exam p{margin:0;color:var(--text-soft);font-size:.93rem;line-height:1.6}

.cta-band-inline{text-align:center;margin-top:3rem}

/* ---------- CTA band ---------- */
.cta-band{background:var(--brand);color:#fff;padding:3rem 0}
.cta-band-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.5rem}
.cta-band h2{color:#fff;margin-bottom:.2rem}
.cta-band p{color:rgba(255,255,255,.85);margin:0}
.cta-phones{display:flex;flex-wrap:wrap;gap:.8rem}
.cta-band .btn-primary{background:var(--accent);color:#fff}
.cta-band .btn-primary:hover{background:#b58f3a}
.cta-band .btn-ghost{color:#fff;border-color:rgba(255,255,255,.7)}
.cta-band .btn-ghost:hover{background:#fff;color:var(--brand)}

/* ---------- Page head ---------- */
.page-head{
  background:linear-gradient(135deg,var(--brand),var(--brand-dark));
  color:#fff;padding:3.5rem 0 3rem;text-align:center;
}
.page-head h1{color:#fff;margin-bottom:.5rem}
.breadcrumb{font-size:.88rem;color:rgba(255,255,255,.8)}
.breadcrumb a{color:rgba(255,255,255,.9)}
.breadcrumb a:hover{color:#fff;text-decoration:underline}
.breadcrumb span{margin:0 .35rem}

/* ---------- Doctors ---------- */
.doctors{padding:4rem 0}
.doctor{
  display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:2.5rem;
  align-items:start;padding:2.5rem 0;border-bottom:1px solid var(--border);
}
.doctor:last-child{border-bottom:0}
.doctor-reverse{grid-template-columns:1fr minmax(220px,320px)}
.doctor-reverse .doctor-photo{order:2}
.doctor-photo{
  border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow);background:var(--brand-light);
  aspect-ratio:4/5;
}
.doctor-photo img{width:100%;height:100%;object-fit:cover}
.doctor-role{color:var(--accent);font-weight:600;margin-bottom:1rem;font-size:.95rem}
.doctor-stats{
  display:flex;flex-wrap:wrap;gap:.6rem;list-style:none;
  padding:0;margin:1.5rem 0 0;
}
.doctor-stats li{
  background:var(--brand-light);color:var(--brand-dark);
  padding:.5rem .9rem;border-radius:999px;font-size:.85rem;
  font-weight:500;
}
.doctor-stats strong{color:var(--brand);font-weight:700}
@media(max-width:760px){
  .doctor,.doctor-reverse{grid-template-columns:1fr;gap:1.5rem}
  .doctor-reverse .doctor-photo{order:0}
}

/* ---------- Contact / centers ---------- */
.contact-section{padding:3.5rem 0 4.5rem}
.center-card{
  background:#fff;border-radius:var(--radius);border:1px solid var(--border);
  padding:1.8rem 1.6rem 1.6rem;box-shadow:var(--shadow);
}
.center-card h3{
  display:flex;align-items:center;gap:.65rem;
  color:var(--brand);margin-bottom:.5rem;font-size:1.15rem;
}
.center-card h3 .icon{color:var(--brand);width:24px;height:24px}
.center-address{color:var(--text-soft);margin-bottom:1rem}
.center-info{list-style:none;padding:0;margin:0 0 1.4rem}
.center-info li{padding:.45rem 0;border-bottom:1px dashed var(--border);font-size:.92rem}
.center-info li:last-child{border-bottom:0}
.center-info a{font-weight:600}
.center-actions{display:flex;flex-wrap:wrap;gap:.6rem}

/* ---------- Legal ---------- */
.legal{padding:3rem 0 4rem}
.legal h2{font-size:1.2rem;color:var(--brand);margin-top:2rem}
.legal p{line-height:1.7}

/* ---------- Footer ---------- */
.site-footer{background:#0d1b2a;color:#cfd8e3;padding:3.5rem 0 0;margin-top:3rem}
.footer-grid{
  display:grid;gap:2rem;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  padding-bottom:2.5rem;border-bottom:1px solid rgba(255,255,255,.08);
}
.site-footer h4{color:#fff;font-size:1rem;margin-bottom:.9rem;letter-spacing:-.005em}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin-bottom:.6rem;font-size:.88rem;line-height:1.5}
.site-footer a{color:#cfd8e3}
.site-footer a:hover{color:#fff}
.site-footer p{font-size:.88rem;color:#9aa7b8;line-height:1.55}

.footer-legal{padding:1.5rem 0 2rem;font-size:.8rem;color:#8b98a9}
.footer-legal p{margin:.25rem 0;color:#8b98a9}
.footer-legal .copy{margin-top:.8rem;color:#6f7c8d}

/* ---------- Back to top ---------- */
#to-top{
  position:fixed;right:1.25rem;bottom:1.25rem;
  width:46px;height:46px;border-radius:50%;
  background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow);
  opacity:0;visibility:hidden;transform:translateY(10px);
  transition:.25s;z-index:50;
}
#to-top .icon{width:22px;height:22px;stroke:#fff;stroke-width:2}
#to-top.show{opacity:1;visibility:visible;transform:translateY(0)}
#to-top:hover{background:var(--brand-dark)}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* ---------- Service detail pages ---------- */
.service-detail{padding:3.5rem 0 4.5rem}
.service-detail .lead{
  font-size:1.08rem;
  color:var(--text-soft);
  line-height:1.7;
  margin-bottom:2rem;
}
.service-detail h2{
  font-size:1.35rem;
  color:var(--brand);
  margin:2.5rem 0 .9rem;
  padding-bottom:.5rem;
  border-bottom:2px solid var(--brand-light);
  letter-spacing:-.01em;
}
.service-detail h2:first-of-type{margin-top:2rem}
.service-detail ul{color:var(--text-soft)}
.service-detail ul li{margin-bottom:.4rem}
.service-detail p{color:var(--text-soft);line-height:1.7}
.service-detail p strong{color:var(--text)}

/* FAQ */
.faq{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:1rem 1.2rem;
  margin-bottom:.7rem;
  transition:box-shadow .2s;
}
.faq:hover{box-shadow:var(--shadow)}
.faq[open]{box-shadow:var(--shadow)}
.faq summary{
  cursor:pointer;
  font-weight:600;
  color:var(--text);
  font-size:1rem;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{
  content:'+';
  font-size:1.3rem;
  color:var(--brand);
  font-weight:400;
  line-height:1;
  flex-shrink:0;
}
.faq[open] summary::after{content:'−'}
.faq summary:hover{color:var(--brand)}
.faq p{
  margin:.9rem 0 0;
  color:var(--text-soft);
  font-size:.95rem;
  line-height:1.65;
}

/* Related links */
.related-links{
  list-style:none;
  padding:0;
  display:grid;
  gap:.6rem;
  margin-top:1rem;
}
.related-links li{
  border-left:3px solid var(--brand-light);
  padding:.6rem 1rem;
  background:var(--bg-soft);
  border-radius:0 8px 8px 0;
  transition:border-color .2s, background .2s;
}
.related-links li:hover{border-color:var(--brand);background:#fff}
.related-links a{font-weight:500;color:var(--text)}
.related-links a:hover{color:var(--brand)}