/* ==========================================================
   Dra. Ana Helena — Oftalmologia | Glaucoma e Catarata
   Paleta extraída da identidade visual (logo e ícones)
   ========================================================== */
:root {
  --sage: #9DB099;        /* cor principal do logo */
  --sage-soft: #DCE4D9;
  --olive: #B3B394;       /* ícone 5 */
  --taupe: #C7B39F;       /* ícone 3 */
  --cream: #F0E6DA;       /* ícone 2 */
  --ivory: #FBF8F3;
  --white: #FFFFFF;
  --green-700: #4F6B52;   /* tom escuro derivado do sálvia (botões / links) */
  --green-800: #3B5140;
  --green-900: #26352A;   /* texto principal */
  --muted: #5E6B60;
  --line: #E4DED3;
  --radius: 18px;
  --shadow: 0 18px 50px -24px rgba(38, 53, 42, .35);
  --container: 1180px;
  --font-title: "Marcellus", Georgia, serif;
  --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--green-900);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; color: var(--green-900); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--sage { background: var(--sage-soft); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  color: var(--green-700); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--sage); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.center .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--sage); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 8px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font: 500 .98rem/1 var(--font-body);
  letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--green-700); color: #fff; box-shadow: 0 10px 24px -12px rgba(79,107,82,.8); }
.btn--primary:hover { background: var(--green-800); color: #fff; transform: translateY(-2px); }
.btn--ghost { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn--ghost:hover { background: var(--green-700); color: #fff; }
.btn--light { background: #fff; color: var(--green-800); }
.btn--light:hover { background: var(--cream); color: var(--green-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Header ---------- */
.topbar { background: var(--green-800); color: #E9EFE7; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(251, 248, 243, .92);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.35); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.brand img { height: 52px; width: auto; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--green-900); font-size: .95rem; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sage-soft); }
.nav .btn { margin-left: 8px; padding: 12px 22px; color: #fff; }
.nav .btn:hover { background: var(--green-800); }
.has-sub { position: relative; }
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .2s ease; flex-direction: column; align-items: stretch !important;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { border-radius: 10px; }
.menu-toggle { display: none; background: none; border: 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--green-900); margin: 5px auto; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 100px); }
.hero::before {
  content: ""; position: absolute; right: -10%; top: -20%; width: 70%; height: 140%;
  background: radial-gradient(closest-side, var(--cream), transparent 70%); z-index: -1;
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--green-700); }
.hero-media { position: relative; }
.hero-media .photo { border-radius: 240px 240px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--shadow); background: var(--cream); }
.hero-media .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.hero-badge {
  position: absolute; left: -28px; bottom: 36px; background: #fff; border-radius: 16px; padding: 16px 20px;
  box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; max-width: 280px;
}
.hero-badge img { width: 54px; }
.hero-badge strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.05rem; }
.hero-badge small { color: var(--muted); font-size: .82rem; line-height: 1.4; display: block; }
.credentials { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.credentials span { display: inline-flex; gap: 8px; align-items: center; }
.credentials svg { width: 18px; height: 18px; color: var(--green-700); }

/* ---------- Faixa de destaque ---------- */
.ribbon { background: var(--green-800); color: #EEF3EC; }
.ribbon .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.ribbon-item { padding: 30px 24px; border-left: 1px solid rgba(255,255,255,.12); }
.ribbon-item:first-child { border-left: 0; }
.ribbon-item strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 2rem; color: #fff; line-height: 1.1; }
.ribbon-item span { font-size: .9rem; opacity: .85; }
.ribbon-item small { display: block; font-size: .72rem; opacity: .6; margin-top: 6px; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about--text { grid-template-columns: 1fr; max-width: 860px; }
.about--text .lead { max-width: none; }
.about-photo { position: relative; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; object-position: 50% 15%; width: 100%; box-shadow: var(--shadow); }
.about-photo::after { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 1px solid var(--sage); border-radius: var(--radius); z-index: -1; }
.timeline { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 4px; }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline .ico { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-soft); display: grid; place-items: center; color: var(--green-700); }
.timeline .ico svg { width: 22px; height: 22px; }
.timeline strong { display: block; font-weight: 500; }
.timeline span { color: var(--muted); font-size: .94rem; }
.signature { margin-top: 28px; display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .9rem; }
.signature img { width: 120px; }

/* ---------- Cards de especialidades ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 48px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--cream); }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); font-size: .97rem; }
.card-link { margin-top: auto; font-weight: 500; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.card-link::after { content: "→"; transition: transform .2s; }
.card-link:hover::after { transform: translateX(4px); }

/* ---------- Procedimentos ---------- */
.procedures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 44px; }
.proc {
  background: #fff; border-radius: var(--radius); padding: 30px; border: 1px solid var(--line);
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
}
.proc .num { width: 56px; height: 56px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-family: var(--font-title); font-size: 1.3rem; color: var(--green-700); }
.proc h3 { margin-bottom: .3em; }
.proc p { color: var(--muted); font-size: .96rem; margin: 0 0 .6em; }
.tag { display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; background: var(--sage-soft); color: var(--green-800); padding: 4px 10px; border-radius: 999px; margin: 0 6px 6px 0; }

/* ---------- Jornada do paciente ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 48px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; background: rgba(255,255,255,.6); border-radius: var(--radius); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-title); font-size: 2.4rem; color: var(--sage); display: block; line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: 1.15rem; }
.step p { font-size: .94rem; color: var(--muted); margin: 0; }

/* ---------- Autoavaliação ---------- */
.risk { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.risk-box { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.risk-box label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .97rem; }
.risk-box input { accent-color: var(--green-700); width: 20px; height: 20px; margin-top: 4px; flex: none; }
.risk-result { margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--sage-soft); font-size: .95rem; }
.risk-result strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; margin-bottom: 4px; }
.disclaimer { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* ---------- Depoimentos ---------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.quote { background: #fff; padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); position: relative; }
.quote::before { content: "“"; font-family: var(--font-title); font-size: 4rem; color: var(--sage); line-height: .6; display: block; margin-bottom: 8px; }
.quote p { font-size: .98rem; }
.quote footer { font-size: .88rem; color: var(--muted); }
.quote footer strong { color: var(--green-900); font-weight: 500; display: block; }
.placeholder-note { font-size: .8rem; color: var(--muted); text-align: center; margin-top: 18px; font-style: italic; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 40px auto 0; }
.faq details { background: #fff; border-radius: 14px; margin-bottom: 12px; border: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--green-700); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 24px 20px; color: var(--muted); }

/* ---------- Local / mapa ---------- */
.location { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.location-info { padding: clamp(28px, 4vw, 48px); }
.location-info dl { margin: 22px 0 0; display: grid; gap: 18px; }
.location-info dt { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--green-700); }
.location-info dd { margin: 4px 0 0; }
.map { min-height: 420px; }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: saturate(.85); }

/* ---------- CTA final ---------- */
.cta { background: var(--green-800); color: #EEF3EC; position: relative; overflow: hidden; }
.cta .container { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.cta h2 { color: #fff; }
.cta p { opacity: .9; }
.cta-art { opacity: .35; filter: brightness(0) invert(1); max-width: 340px; justify-self: end; }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: #C9D3C7; font-size: .92rem; padding: 64px 0 28px; }
.footer a { color: #E8EEE6; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-logo { width: 220px; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; opacity: .8; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; }
.social svg { width: 18px; height: 18px; }

/* ---------- Botão flutuante ---------- */
.float-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45);
  transition: transform .2s;
}
.float-btn:hover { transform: scale(1.07); color: #fff; }
.float-btn svg { width: 30px; height: 30px; }
.float-btn.is-instagram, .float-btn--ig { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.float-btn--ig { bottom: 92px; width: 52px; height: 52px; right: 24px; }
.float-btn--ig svg { width: 26px; height: 26px; }

/* ---------- Páginas internas (artigos) ---------- */
.page-hero { padding: clamp(48px, 7vw, 90px) 0 clamp(40px, 5vw, 64px); background: linear-gradient(180deg, var(--cream), var(--ivory)); }
.page-hero .container { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.page-hero img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; object-position: 50% 20%; box-shadow: var(--shadow); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 110px; background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); font-size: .92rem; }
.toc strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.1rem; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover, .toc a.active { color: var(--green-700); }
.article { max-width: 760px; }
.article section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.article section:last-child { border-bottom: 0; }
.article h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.article h3 { margin-top: 1.4em; }
.article li { margin-bottom: .45em; }
.article sup a { text-decoration: none; font-size: .75em; padding: 0 2px; }
.callout { background: var(--sage-soft); border-left: 4px solid var(--green-700); padding: 18px 22px; border-radius: 0 14px 14px 0; margin: 22px 0; }
.callout strong { font-weight: 500; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.8rem; color: var(--green-700); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); display: block; margin-top: 6px; line-height: 1.45; }
.compare { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .94rem; background: #fff; border-radius: 14px; overflow: hidden; }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { background: var(--green-800); color: #fff; font-weight: 500; }
.table-wrap { overflow-x: auto; }
.refs { font-size: .86rem; color: var(--muted); }
.refs li { margin-bottom: .7em; }
.inline-cta { background: var(--green-800); color: #fff; border-radius: var(--radius); padding: 30px; margin: 10px 0 0; }
.inline-cta h3 { color: #fff; margin-top: 0; }

/* Números com Jost: os algarismos da Marcellus lembram letras ("01" ≈ "OI") */
.proc .num, .step::before, .stat strong, .ribbon-item strong { font-family: var(--font-body); font-weight: 300; }
.card-img img { object-position: 50% 12%; }
strong, b { font-weight: 500; }
.hero .container > *, .page-hero .container > *, .about > *, .risk > *, .location > * { min-width: 0; }
.page-hero img { width: 100%; }

/* ---------- Animações ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .nav { position: fixed; inset: 84px 0 auto 0; background: var(--ivory); padding: 16px; border-bottom: 1px solid var(--line); display: none; max-height: calc(100vh - 84px); overflow: auto; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav .btn { margin: 8px 0 0; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 16px; background: transparent; }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .cards, .testimonials { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .hero .container, .about, .risk, .location, .cta .container, .page-hero .container { grid-template-columns: 1fr; }
  .hero-media { max-width: 440px; margin-inline: auto; width: 100%; }
  .hero-badge { left: 12px; bottom: 16px; }
  .ribbon .container { grid-template-columns: 1fr 1fr; }
  .ribbon-item:nth-child(3) { border-left: 0; }
  .ribbon-item { border-top: 1px solid rgba(255,255,255,.12); }
  .procedures { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; margin-inline: auto; }
  .about-photo::after { inset: 16px -12px -12px 16px; }
  .cta-art { display: none; }
  .page-hero img { max-width: 360px; }
  .stat-grid { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .cards, .testimonials, .steps, .footer-grid { grid-template-columns: 1fr; }
  .ribbon .container { grid-template-columns: 1fr; }
  .ribbon-item { border-left: 0; }
  .brand img { height: 42px; }
  .proc { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
}
