/* eduardocirurgiageral.com.br — CSS definitivo (Fase 2)
   Design fiel ao site original (WordPress/tema Dentia), documentado em
   _extracao/DESIGN.md: paleta verde-petróleo + caramelo, Urbanist nos títulos,
   Inter no corpo, cards com raio 20px, alternância de dobras claro/escuro. */

:root {
  --dark: #18323A;          /* faixa de números, CTA final, botão do header */
  --primary: #224648;       /* footer, metade do gradiente do hero */
  --accent: #B77F56;        /* caramelo: títulos de seção, CTA final, hovers */
  --accent-dark: #A26D46;   /* hover do botão caramelo */
  --cream: #E2E2DC;         /* fundo das seções Tipos de Cirurgia e FAQ */
  --on-dark-muted: #AFBAC3; /* texto secundário sobre fundo escuro */
  --ink: #223038;           /* títulos internos sobre fundo claro */
  --body: #4A555D;          /* texto corrido */
  --line: #D8D8D2;          /* divisores finos */
  --radius: 20px;
  --font-title: "Urbanist", Helvetica, Arial, sans-serif;
  --font-body: "Inter", Helvetica, Arial, sans-serif;
  --max: 1180px;
  --grad-hero: linear-gradient(-90deg, #18323A 50%, #224648 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* o header e sticky: as ancoras precisam parar ABAIXO dele */
:target, section[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
img[src=""] { display: none; }
p:empty { display: none; }
p { text-wrap: pretty; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { font-family: var(--font-title); color: var(--ink); line-height: 1.2; margin: 0 0 16px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.centrado { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- botões ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 9px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus-visible { background: var(--accent-dark); color: #fff; }
.btn:focus-visible, .card-plus:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* ---------- header ---------- */
.site-head { background: #fff; position: sticky; top: 0; z-index: 40; box-shadow: 0 1px 0 rgba(24,50,58,.06), 0 10px 26px -20px rgba(24,50,58,.5); }
.site-head .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 10px; padding-bottom: 10px; }
.site-head .logo img { width: 132px; height: auto; }
.head-right { display: flex; align-items: center; gap: 28px; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: 0.92rem; font-weight: 500; transition: color .2s ease; }
.site-nav a:hover { color: var(--accent); }
.site-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.nav-toggle { display: none; }

/* dropdown de procedimentos no menu principal (itens vindos do banco) */
.nav-drop { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-drop-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--ink);
  transition: color .2s ease;
}
.nav-drop-caret {
  width: 7px; height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .22s ease;
}
.nav-drop:hover .nav-drop-toggle,
.nav-drop-toggle:hover,
.nav-drop-toggle[aria-expanded="true"] { color: var(--accent); }
.nav-drop-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.nav-drop-menu {
  position: absolute; top: 100%; left: -18px;
  min-width: 288px; max-width: min(340px, calc(100vw - 48px));
  margin-top: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 1px 2px rgba(24,50,58,.06), 0 18px 40px -12px rgba(24,50,58,.24);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
/* ponte invisivel entre o item e o painel, pra o hover nao cair no vao */
.nav-drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-drop-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  text-wrap: pretty;
  transition: background-color .18s ease, color .18s ease;
}
.nav-drop-menu a:hover, .nav-drop-menu a:focus-visible { background: var(--cream); color: var(--accent); }

@media (min-width: 761px) {
  .nav-drop.aberto > .nav-drop-menu,
  .nav-drop:focus-within > .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
}
@media (hover: hover) and (min-width: 761px) {
  .nav-drop:hover > .nav-drop-menu { opacity: 1; visibility: visible; transform: none; }
}
.nav-drop.aberto .nav-drop-caret { transform: translateY(1px) rotate(-135deg); }

/* ---------- hero ---------- */
.hero {
  background: var(--grad-hero);
  color: #fff;
  text-align: center;
  padding: 130px 0 140px;
}
.hero-eyebrow { font-size: 1rem; font-weight: 600; margin: 0 0 14px; color: #fff; }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 2.85rem);
  font-weight: 600;
  max-width: 640px;
  margin: 0 auto 30px;
  text-wrap: balance;
}
.hero .btn { margin-top: 4px; }

/* ---------- seção sobre ---------- */
.sobre { padding: 110px 0; background: #fff; }
.sobre-grid { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 64px; align-items: center; }
.sobre-foto { border-radius: var(--radius); width: 100%; object-fit: cover; }
.titulo-accent {
  color: var(--accent);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: .02em;
  text-wrap: balance;
}
.sobre-texto p { margin: 0 0 26px; max-width: 560px; }

/* ---------- tipos de cirurgia ---------- */
.procedimentos { background: var(--cream); padding: 110px 0; }
.procedimentos .section-sub { max-width: 620px; margin-bottom: 48px; }
.section-sub { color: var(--body); margin: 0 0 36px; text-wrap: pretty; }
.cards-proc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card-proc {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 36px 30px;
  box-shadow: 0 1px 2px rgba(24, 50, 58, .04), 0 10px 30px -14px rgba(24, 50, 58, .22);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-proc:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(24, 50, 58, .04), 0 18px 42px -16px rgba(24, 50, 58, .3); }
.card-proc:hover .card-plus { background: var(--accent); border-color: var(--accent); color: #fff; }
.card-proc h3 { color: var(--accent); font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.card-proc p { margin: 0 0 22px; font-size: 0.95rem; }
.card-plus {
  margin-top: auto;
  width: 38px; height: 38px;
  border: 1px solid var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
  font-size: 1.25rem; font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.card-plus:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- faixa de números ---------- */
.numeros { background: var(--dark); color: #fff; padding: 78px 0; }
.numeros-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.stat-num { font-family: var(--font-title); font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 700; color: #fff; margin: 0 0 6px; line-height: 1; }
.stat-suffix { margin-left: 2px; }
.stat-label { color: #E7ECEF; font-size: 0.95rem; margin: 0 auto; max-width: 280px; }

/* ---------- atendimento (diferenciais) ---------- */
.atendimento { background: #fff; padding: 110px 0; }
.atendimento-grid { display: grid; grid-template-columns: 1.15fr minmax(0, 460px); gap: 64px; align-items: center; }
.atendimento-foto { border-radius: var(--radius); width: 100%; object-fit: cover; }
.atendimento .section-sub { max-width: 520px; margin-bottom: 40px; }
.difs { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.dif { border-top: 1px solid var(--line); padding-top: 18px; }
.dif h3 { font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.dif p { margin: 0; font-size: 0.9rem; }

/* ---------- FAQ (home e procedimento) ---------- */
.faq { background: var(--cream); padding: 110px 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 64px; align-items: start; }
.faq h2 { color: var(--dark); font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; text-wrap: balance; }
.faq details { border-bottom: 1px solid #CFCFC8; }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 4px;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.98rem;
  transition: color .2s ease;
}
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .25s ease, border-color .2s ease;
  margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > div { padding: 0 4px 20px; font-size: 0.95rem; }
.faq details > div p { margin: 0 0 10px; }

/* ---------- CTA final ---------- */
.cta-final { background: var(--dark); color: #fff; padding: 96px 0; }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-final h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; margin-bottom: 12px;text-wrap: balance; }
.cta-final p { color: var(--on-dark-muted); margin: 0; max-width: 560px; }
.cta-final .btn { flex: none; }

/* ---------- banner de página interna ---------- */
.page-banner {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  text-align: center;
  padding: 96px 0;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/assets/img/cirurgia-geral-1.webp");
  background-size: cover;
  background-position: center 30%;
  opacity: .18;
}
.page-banner-plain::before { display: none; }
.page-banner .container { position: relative; }
.page-banner h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; margin-bottom: 10px; text-wrap: balance; }
.banner-sub { color: #D9DFE3; margin: 0; font-size: 1rem; }

/* ---------- corpo de página interna ---------- */
.page-content { padding: 96px 0; background: #fff; }
.crumbs { font-size: 0.85rem; margin-bottom: 36px; color: var(--body); }
.crumbs a { color: var(--body); text-decoration: none; transition: color .2s ease; }
.crumbs a:hover { color: var(--accent); }

.page-body::after { content: ""; display: table; clear: both; }
.page-body h2 { color: var(--primary); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; margin: 0 0 18px; text-wrap: balance; }
.page-body h2:not(:first-of-type) { margin-top: 44px; }
.page-body h3 { color: var(--primary); font-size: 1.2rem; margin-top: 32px; }
.page-body p { margin: 0 0 18px; max-width: 68ch; }
.page-body img { border-radius: var(--radius); }
.page-body blockquote { border-left: 3px solid var(--accent); margin: 20px 0; padding: 4px 18px; color: var(--body); }
.page-body ul { list-style: none; margin: 0 0 18px; padding: 0; display: flow-root; }
.page-body ul li { position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--ink); font-weight: 500; }
.page-body ul li::before {
  content: "";
  position: absolute; left: 2px; top: 7px;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  transform: rotate(-45deg);
}
.page-body ol { margin: 0 0 18px; padding-left: 22px; }

/* imagens do corpo do procedimento: 1ª flutua à direita (ao lado de
   "O que é" / "Como funciona"), 2ª à esquerda (ao lado dos benefícios) —
   reproduz a composição em duas colunas do site original */
@media (min-width: 900px) {
  .page-body > img:first-of-type { float: right; width: min(42%, 440px); margin: 6px 0 28px 56px; }
  .page-body > img:nth-of-type(2) { float: left; clear: both; width: min(42%, 440px); margin: 6px 56px 28px 0; }
  /* o título e a lista de benefícios ficam ao lado da 2ª imagem (e abaixo da 1ª) */
  .page-body > img:nth-of-type(2) ~ h2 { clear: right; padding-top: 40px; }
}
@media (max-width: 899.98px) {
  .page-body > img { margin: 0 0 28px; }
}

/* ---------- footer ---------- */
.site-foot { background: var(--primary); color: #C6CFD4; font-size: 0.92rem; }
.site-foot .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 56px;
}
.foot-brand img { width: 140px; margin-bottom: 20px; }
.foot-brand p { margin: 0; max-width: 380px; line-height: 1.7; }
.foot-col h3 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.foot-col p { margin: 0 0 8px; }
.site-foot a { color: #E2E2DC; text-decoration: none; transition: color .2s ease; }
.site-foot a:hover { color: var(--accent); }
.foot-bar { background: var(--dark); padding: 18px 24px; text-align: center; }
.copyright { margin: 0; font-size: 0.8rem; color: var(--on-dark-muted); }
.copyright a { color: var(--accent); }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .sobre, .procedimentos, .atendimento, .faq { padding: 72px 0; }
  .cta-final { padding: 68px 0; }
  .sobre-grid, .atendimento-grid { grid-template-columns: 1fr; gap: 40px; }
  .atendimento-foto { order: -1; }
  .faq-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-foot .foot-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; padding-bottom: 40px; }
}

@media (max-width: 760px) {
  .hero { padding: 74px 0 78px; }
  .cards-proc { grid-template-columns: 1fr; }
  .numeros { padding: 56px 0; }
  .numeros-grid { grid-template-columns: 1fr; gap: 34px; }
  .difs { grid-template-columns: 1fr; }
  .cta-grid { flex-direction: column; align-items: flex-start; }
  .page-banner { padding: 64px 0; }
  .page-content { padding: 56px 0; }

  /* menu mobile */
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--dark); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .head-right {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 10px 24px 22px;
    box-shadow: 0 14px 24px rgba(24,50,58,.12);
  }
  .head-right.aberto { display: flex; }
  .site-head .container { position: relative; }
  .site-nav { flex-direction: column; gap: 0; width: 100%; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; }
  /* dropdown vira submenu expansivel dentro do menu mobile */
  .nav-drop { width: 100%; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-drop .nav-drop-link { flex: 1 1 auto; border-bottom: 0; width: auto; }
  .nav-drop-toggle { width: 44px; height: 44px; flex: none; }
  .nav-drop-menu {
    position: static;
    order: 3;
    width: 100%;
    min-width: 0; max-width: none;
    margin: 0; padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-drop-menu::before { display: none; }
  .nav-drop.aberto > .nav-drop-menu { max-height: 460px; }
  /* sub-itens sem o divisor dos itens de 1o nivel: o grupo se le como submenu */
  .nav-drop-menu a {
    padding: 9px 0 9px 16px;
    border-bottom: 0; border-left: 1px solid var(--line);
    border-radius: 0; font-size: 0.9rem; color: var(--body);
  }
  .nav-drop-menu a:first-child { margin-top: 2px; }
  .nav-drop-menu a:last-child { margin-bottom: 12px; }
  .nav-drop-menu a:hover, .nav-drop-menu a:focus-visible { background: none; }
  .head-right .btn { margin-top: 14px; }
}

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