/* ==========================================================================
   Odonto Alfa — Páginas de serviço
   --------------------------------------------------------------------------
   Componentes do template "Dentista em Cuiabá", usados igualmente pelas 5
   páginas de serviço. Carregado depois de pages.css (tokens e base) e junto
   de layout.css (header, footer, hover dos CTAs).
   ========================================================================== */

/* ==========================================================================
   Hero
   ========================================================================== */
.svc-hero {
  position: relative;
  padding: 88px 32px 96px;
  overflow: hidden;
  background: var(--bg-alt);
}
.svc-hero__blob {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 143, 114, 0.32) 0%, rgba(159, 143, 114, 0) 70%);
  filter: blur(6px);
  top: -260px;
  right: -160px;
  will-change: transform;
  pointer-events: none;
}
.svc-hero__inner { position: relative; max-width: 820px; margin: 0 auto; text-align: center; }

/* ==========================================================================
   Hero com foto de fundo — mesma altura do hero padrão, texto alinhado à
   esquerda no mesmo contêiner do header (1240px + 32px), para começar na
   vertical da logo, igual à home.
   ========================================================================== */
.svc-hero--foto {
  padding-top: 98px;
  padding-bottom: 106px;
  padding-left: 0;
  padding-right: 0;
  background-image: var(--hero-img);
  background-size: cover;
  /* center top: o corte sempre sai por baixo, nunca pela cabeça de quem
     aparece na foto. */
  background-position: center top;
}
.svc-hero--foto .svc-hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  text-align: left;
}
.svc-hero.svc-hero--foto h1 { color: var(--white); font-size: 40px; line-height: 1.15; }
.svc-hero--foto .svc-hero__lede { color: #f1e9da; max-width: 560px; margin: 0; }
.svc-hero--foto .breadcrumb,
.svc-hero--foto .breadcrumb a { color: #e7d9bd; }
.svc-hero--foto .breadcrumb a:hover { color: var(--white); }

/* Quando a foto tem a área do texto clara, o texto vai no marrom escuro da
   paleta em vez de branco. */
.svc-hero.svc-hero--escuro h1 { color: var(--ink); }
.svc-hero--escuro .svc-hero__lede { color: var(--ink-soft); }
.svc-hero--escuro .svc-hero__lede strong { color: var(--ink); }
.svc-hero--escuro .breadcrumb,
.svc-hero--escuro .breadcrumb a { color: var(--accent); }
.svc-hero--escuro .breadcrumb a:hover { color: var(--accent-hover); }
.svc-hero h1 {
  font-weight: 900;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 18px;
}
.svc-hero__lede { font-size: 17px; color: var(--ink-soft); max-width: 600px; margin: 0 auto; }

/* ==========================================================================
   Linhas de introdução — imagem emoldurada + texto
   ========================================================================== */
.svc-intro { padding: 96px 32px; }
.svc-intro__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
}
/* Linha 2: proporções invertidas, texto primeiro */
.svc-intro--reverse .svc-intro__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }

.svc-intro h2 { font-weight: 700; font-size: 32px; letter-spacing: -0.3px; margin: 0 0 20px; }
.svc-intro p { font-size: 16px; color: var(--ink-soft); margin: 0 0 16px; }
.svc-intro p:last-child { margin-bottom: 0; }

/* Moldura deslocada atrás da imagem */
.svc-frame { position: relative; }
.svc-frame__outline {
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 2px solid #c9af7c;
  border-radius: 18px;
  z-index: 1;
  pointer-events: none;
}
.svc-frame--flip .svc-frame__outline { inset: -20px 20px 20px -20px; }

/* ==========================================================================
   Imagens injetadas no build

   O .img-slot logo abaixo só existe nos arquivos de src/ — é a visão de
   autoria, com o rótulo à mostra. No dist/ o build já trocou cada um por
   .img-slot-image (quando a foto existe) ou .img-slot-empty (quando falta).
   ========================================================================== */
.img-slot-image,
.img-slot-empty {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 28px 56px rgba(61, 43, 18, 0.16);
}
.img-slot-image { object-fit: cover; display: block; }

/* Reserva neutra: mesma caixa, tom claro da paleta, sem texto para o visitante.
   O id fica em data-img-slot para a equipe achar por grep o que falta. */
.img-slot-empty { background: var(--bg-alt); }

/* Variante para as fotos que preenchem um contêiner já arredondado
   (cards em destaque da página de Serviços). */
.img-slot--cover.img-slot-image,
.img-slot--cover.img-slot-empty {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

/* ==========================================================================
   Placeholder de autoria — visível apenas ao abrir os arquivos de src/
   ========================================================================== */
.img-slot {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  text-align: center;
  background: repeating-linear-gradient(45deg, #ece4d7 0 12px, #e4dbcb 12px 24px);
  border: 1px dashed #c9af7c;
  border-radius: 18px;
  color: #8a7550;
  box-shadow: 0 28px 56px rgba(61, 43, 18, 0.16);
}
.img-slot__label { font-family: var(--font-heading); font-weight: 700; font-size: 14px; }
.img-slot__id { font-size: 12px; opacity: 0.75; font-family: monospace; }

/* ==========================================================================
   Comparador antes/depois

   As duas imagens ficam sobrepostas; a de "antes" é recortada por clip-path
   até a posição da divisória (--revelado). Sem JS, --revelado fica em 50% pelo
   valor inicial e as duas imagens continuam no DOM.
   ========================================================================== */
.ba { position: relative; z-index: 2; }
.ba__frame {
  --revelado: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 28px 56px rgba(61, 43, 18, 0.16);
  background: var(--bg-alt);
  cursor: ew-resize;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.ba__antes {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--revelado)) 0 0);
}
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--revelado);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
.ba__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(61, 43, 18, 0.18);
}
.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(61, 43, 18, 0.25);
}
.ba__badge {
  position: absolute;
  top: 16px;
  z-index: 3;
  background: rgba(61, 43, 18, 0.78);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  pointer-events: none;
}
.ba__badge--antes { left: 16px; }
.ba__badge--depois { right: 16px; }

/* ==========================================================================
   Respiros com parallax — só a foto de fundo, sem camadas decorativas.
   O efeito vem do background-attachment:fixed: a imagem fica parada enquanto
   a página rola. O véu escuro dá unidade com o resto da paleta.
   ========================================================================== */
.breather {
  position: relative;
  height: 260px;
  overflow: hidden;
  background-image: var(--breather-img);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.breather::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(61, 43, 18, 0.28);
}
.breather--dark::before { background: rgba(61, 43, 18, 0.5); }

/* ==========================================================================
   Grade de cards
   ========================================================================== */
.svc-grid-section {
  background: var(--bg-alt);
  padding: 110px 32px;
  position: relative;
  overflow: hidden;
}
.svc-grid-section__blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(159, 143, 114, 0.2) 0%, rgba(159, 143, 114, 0) 70%);
  top: -140px;
  left: -100px;
  will-change: transform;
  pointer-events: none;
}
.svc-grid-section__inner { position: relative; max-width: var(--container); margin: 0 auto; }
.svc-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.svc-head h2 { font-weight: 700; font-size: 34px; letter-spacing: -0.3px; margin: 0 0 14px; }
.svc-head p { font-size: 15px; color: var(--ink-soft); margin: 0; }

.svc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }

/* Uma linha só, para blocos com 4 cards (benefícios do Invisalign). */
.svc-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 7 cards em duas linhas: 3 em cima, 4 embaixo. A grade de 12 colunas deixa
   os dois grupos preencherem a largura toda sem sobra. */
.svc-cards--3-4 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.svc-cards--3-4 > * { grid-column: span 3; }
.svc-cards--3-4 > :nth-child(-n + 3) { grid-column: span 4; }
.oa-card {
  background: var(--white);
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: 0 16px 32px rgba(61, 43, 18, 0.08);
  cursor: default;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.oa-card:hover { transform: translateY(-8px); box-shadow: 0 24px 44px rgba(61, 43, 18, 0.14); }
.oa-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  transition: transform 0.35s ease;
}
.oa-card:hover .oa-icon { transform: scale(1.12) rotate(-4deg); }
.oa-card h3 { font-weight: 700; font-size: 18px; margin: 0 0 10px; }
.oa-card p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   Cards em destaque com foto (página de Serviços)
   ========================================================================== */
.svc-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.svc-feat {
  display: block;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(61, 43, 18, 0.12);
  color: var(--ink);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.svc-feat:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(61, 43, 18, 0.22);
  color: var(--ink);
}
.svc-feat__media { overflow: hidden; height: 220px; }
.svc-feat__media > * { transition: transform 0.5s ease; }
.svc-feat:hover .svc-feat__media > * { transform: scale(1.06); }
.svc-feat__body { padding: 28px; }
.svc-feat h3 { font-weight: 700; font-size: 19px; margin: 0 0 10px; }
.svc-feat p { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }
.svc-feat__link { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Card da grade quando é link — herda o visual do .oa-card */
a.oa-card { color: var(--ink); text-decoration: none; }
a.oa-card:hover { color: var(--ink); }
.oa-card__link { display: block; font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 14px; }

/* ==========================================================================
   Passos do atendimento
   ========================================================================== */
.svc-steps-section { padding: 110px 32px; }
.svc-steps-section__inner { max-width: var(--container); margin: 0 auto; }
.svc-steps-head { max-width: 680px; margin: 0 auto 64px; text-align: center; }
.svc-steps-head h2 { font-weight: 700; font-size: 34px; letter-spacing: -0.3px; margin: 0 0 14px; }
.svc-steps-head p { font-size: 15px; color: var(--ink-soft); margin: 0; }

.svc-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}
/* Linha tracejada ligando os cinco números */
.svc-steps::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #c9af7c 0, #c9af7c 8px, transparent 8px, transparent 16px);
  z-index: 0;
}
.svc-step { position: relative; z-index: 1; text-align: center; }
.svc-step__num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(138, 117, 80, 0.35);
}
.svc-step h3 { font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.svc-step p { font-size: 13px; color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   Dr. Andrey
   ========================================================================== */
.svc-doctor-section { padding: 110px 32px; }
.svc-doctor {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: center;
}
.svc-doctor h2 { font-weight: 700; font-size: 30px; letter-spacing: -0.3px; margin: 0 0 18px; }
.svc-doctor p { font-size: 16px; color: var(--ink-soft); margin: 0 0 16px; }
.svc-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 3px solid #c9af7c;
}

/* ==========================================================================
   Por que escolher / Quando procurar
   ========================================================================== */
.svc-why-section {
  background: var(--bg-alt);
  padding: 110px 32px;
  position: relative;
  overflow: hidden;
}
.svc-two-col {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
.svc-two-col--flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.svc-two-col h2 { font-weight: 700; font-size: 32px; letter-spacing: -0.3px; margin: 0 0 26px; }
.svc-two-col > div > p { font-size: 15px; color: var(--ink-soft); margin: 0 0 24px; }

.svc-bullets { display: flex; flex-direction: column; gap: 16px; }
.svc-bullet { display: flex; gap: 14px; align-items: flex-start; }
.svc-bullet::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 9px;
  flex-shrink: 0;
}
.svc-bullet p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.svc-bullet strong { color: var(--ink); }

.svc-when-section { padding: 110px 32px; }

/* ==========================================================================
   Resultados reais — carrossel (componente em layout.css)
   ========================================================================== */
.svc-results { background: var(--bg-alt); padding: 110px 32px; }
.svc-results__inner { max-width: var(--container); margin: 0 auto; }
.svc-results__note {
  max-width: 720px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.svc-faq-section { padding: 110px 32px; }
.svc-faq-section__inner { max-width: var(--container); margin: 0 auto; }
.svc-faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
}
.svc-faq-list { display: flex; flex-direction: column; gap: 14px; }

.svc-faq {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(61, 43, 18, 0.07);
}
.svc-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}
.svc-faq summary::-webkit-details-marker { display: none; }
.svc-faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}
.svc-faq[open] summary::after { content: "–"; }
.svc-faq p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border);
}

/* ==========================================================================
   Contato
   ========================================================================== */
.svc-contact-section { background: var(--bg-alt); padding: 110px 32px; }
.svc-contact {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}
/* A coluna de endereço/horário/WhatsApp é mais baixa que o formulário —
   centralizar na vertical evita a sobra toda embaixo. */
.svc-contact__aside { display: flex; flex-direction: column; gap: 16px; align-self: center; }
.svc-info-card {
  background: var(--white);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 16px 32px rgba(61, 43, 18, 0.08);
}
.svc-info-card h3 { font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.svc-info-card p { font-size: 14px; color: var(--ink-soft); margin: 0 0 4px; }
.svc-info-card p:last-child { margin-bottom: 0; }
.svc-info-card--wa { background: var(--accent); }
.svc-info-card--wa h3 { color: var(--white); }
.svc-info-card--wa a { font-size: 14px; color: var(--white); display: inline-flex; align-items: center; gap: 8px; }
.svc-info-card--wa a:hover { color: var(--white); text-decoration: underline; }

.svc-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 44px;
  box-shadow: 0 20px 48px rgba(61, 43, 18, 0.1);
}
.svc-form-card h2 { font-weight: 700; font-size: 26px; letter-spacing: -0.3px; margin: 0 0 26px; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1024px) {
  .svc-intro__grid,
  .svc-intro--reverse .svc-intro__grid,
  .svc-doctor,
  .svc-two-col,
  .svc-two-col--flip,
  .svc-faq-grid,
  .svc-contact { grid-template-columns: 1fr; gap: 40px; }

  /* Empilhado, a imagem vem primeiro nas linhas invertidas */
  .svc-intro--reverse .svc-frame { order: -1; }
  /* Desfaz a grade de 12 colunas: em telas menores todos viram 2 por linha. */
  .svc-cards,
  .svc-cards--4,
  .svc-cards--3-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-cards--3-4 > *,
  .svc-cards--3-4 > :nth-child(-n + 3) { grid-column: auto; }
  .svc-feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .svc-steps::before { display: none; }
  .svc-frame__outline { display: none; }
}

@media (max-width: 768px) {
  .svc-hero { padding: 56px 20px 64px; }
  /* O modificador tem especificidade maior que .svc-hero h1, então a redução
     de fonte no mobile precisa ser repetida aqui. */
  .svc-hero--foto { padding: 66px 0 74px; }
  .svc-hero--foto .svc-hero__inner { padding: 0 20px; }
  .svc-hero.svc-hero--foto h1 { font-size: 28px; }
  .svc-hero h1 { font-size: 30px; }
  .svc-hero__lede { font-size: 15px; }

  .svc-intro,
  .svc-grid-section,
  .svc-steps-section,
  .svc-doctor-section,
  .svc-why-section,
  .svc-when-section,
  .svc-faq-section,
  .svc-results,
  .svc-contact-section { padding: 56px 20px; }

  .svc-intro h2,
  .svc-two-col h2 { font-size: 24px; }
  .svc-head h2,
  .svc-steps-head h2 { font-size: 26px; }
  .svc-doctor h2 { font-size: 24px; }

  .svc-cards,
  .svc-cards--4,
  .svc-cards--3-4 { grid-template-columns: 1fr; }
  .svc-feat-grid { grid-template-columns: 1fr; }
  .svc-steps { grid-template-columns: 1fr; row-gap: 32px; }
  .svc-form-card { padding: 26px 22px; }
  .svc-faq summary { padding: 18px 20px; font-size: 15px; }
  .svc-faq p { padding: 14px 20px 18px; }

  /* background-attachment:fixed trava e pisca no iOS — só no desktop. */
  .breather { background-attachment: scroll; height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-hero__blob,
  .svc-grid-section__blob { transform: none !important; }
  .oa-card:hover { transform: none; }
}
