/* ============================================
   CLÍNICA ODONTOLÓGICA DR. GUILHERME PETER
   Estilos das páginas internas (tratamentos, equipe, etc.)
   Carregado DEPOIS de style.css — reaproveita as mesmas
   variáveis, fontes e componentes (.container, .btn-primary,
   .card, .section, .team-*, .footer-*).
   ============================================ */

/* Breadcrumb */
.breadcrumb {
  background: var(--bg-sand);
  padding: 14px 0;
  font-size: 0.85rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--text-gray);
}
.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb a:focus-visible {
  text-decoration: underline;
}
@media (hover: hover) and (pointer: fine) {
  .breadcrumb a:hover {
    text-decoration: underline;
  }
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-gray);
}
.breadcrumb [aria-current="page"] {
  color: var(--text-gray);
}

/* Cabeçalho da página interna */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 48px 0 40px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 14px;
}
.page-header p {
  max-width: 720px;
  font-size: 1.02rem;
  color: #d6e3f7;
}

/* Corpo de leitura */
.page-body {
  padding: 48px 0 8px;
}
.page-body .container {
  max-width: 860px;
}
.page-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  color: var(--text-dark);
  margin: 40px 0 14px;
}
.page-body h2:first-of-type {
  margin-top: 0;
}
.page-body h3 {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin: 26px 0 8px;
}
.page-body p {
  margin-bottom: 16px;
}
.page-body ul:not(.breadcrumb ol) {
  margin: 0 0 20px 22px;
}
.page-body li {
  margin-bottom: 8px;
}

/* Etapas numeradas ("Como funciona") */
.etapas {
  counter-reset: etapa;
  list-style: none;
  margin: 0 0 24px !important;
  padding: 0;
}
.etapas li {
  counter-increment: etapa;
  position: relative;
  padding: 0 0 18px 52px;
  border-left: 2px solid var(--primary-light);
  margin-left: 16px;
}
.etapas li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.etapas li::before {
  content: counter(etapa);
  position: absolute;
  left: -17px;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.etapas strong {
  display: block;
  color: var(--text-dark);
  margin-bottom: 2px;
}

/* Box do profissional responsável */
.pro-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-sand);
  border-radius: var(--border-radius-lg);
  padding: 22px;
  margin: 8px 0 24px;
}
.pro-box img {
  width: 110px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.pro-box h3 {
  margin: 0 0 4px;
  font-size: 1.08rem;
}
.pro-especialidade {
  display: block;
  color: var(--primary-medium);
  font-weight: 600;
  font-size: 0.9rem;
}
.pro-cro {
  display: block;
  color: var(--text-gray);
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.pro-box p {
  font-size: 0.94rem;
  margin-bottom: 8px;
}
.pro-box a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Dúvidas frequentes — sempre visíveis, sem JS */
.faq-item {
  border-top: 1px solid var(--primary-light);
  padding: 18px 0;
}
.faq-item:last-child {
  border-bottom: 1px solid var(--primary-light);
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--text-dark);
}
.faq-item p:last-child {
  margin-bottom: 0;
}

/* Caixa de CTA */
.cta-box {
  background: var(--bg-sand);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  text-align: center;
  margin: 36px 0;
}
.cta-box h2 {
  margin-top: 0 !important;
}
.cta-box p {
  max-width: 560px;
  margin: 0 auto 20px;
}

/* Endereço / como chegar resumido */
.local-box {
  border: 1px solid var(--primary-light);
  border-radius: var(--border-radius-lg);
  padding: 22px;
  margin: 24px 0;
}
.local-box h2 {
  margin-top: 0 !important;
}
.local-box dl {
  margin-bottom: 16px;
}
.local-box dt {
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 10px;
  font-size: 0.92rem;
}
.local-box dd {
  margin-left: 0;
  font-size: 0.94rem;
}

/* Tratamentos relacionados */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.related-grid a {
  display: block;
  background: var(--bg-white);
  border: 1px solid rgba(30, 58, 110, 0.32);
  box-shadow: 0 2px 10px rgba(11, 26, 59, 0.10);
  border-radius: var(--border-radius-lg);
  padding: 18px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  transition: box-shadow 250ms var(--ease-out), transform 250ms var(--ease-out);
}
.related-grid a:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
@media (hover: hover) and (pointer: fine) {
  .related-grid a:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}
.related-grid a:active {
  transform: scale(0.985);
  transition-duration: 100ms;
}
.related-grid span {
  display: block;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--text-gray);
  margin-top: 4px;
}

/* Botão visível dentro do card. O card inteiro já é clicável, mas no toque
   não existe hover para sinalizar isso — o botão dá a pista que faltava. */
.related-grid .trat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin-top: 14px;
  padding: 9px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-medium) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(30, 58, 110, 0.25);
  transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.related-grid .trat-btn::after {
  content: "\2192";
}
@media (hover: hover) and (pointer: fine) {
  .related-grid a:hover .trat-btn {
    box-shadow: 0 4px 14px rgba(30, 58, 110, 0.35);
  }
}
.related-grid a:active .trat-btn {
  transform: scale(0.97);
  transition-duration: 100ms;
}

/* Linha "Conteúdo revisado por" */
.revisado {
  border-top: 1px solid var(--primary-light);
  padding-top: 18px;
  margin-bottom: 40px;
  font-size: 0.86rem;
  color: var(--text-gray);
}

/* Índice de tratamentos */
.trat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.trat-grid article {
  position: relative;
  background: var(--bg-white);
  /* Card branco sobre fundo branco: a borda do tema (#e8f0fe) tem contraste
     de 1,15:1 e some em boa parte dos monitores. */
  border: 1px solid rgba(30, 58, 110, 0.32);
  box-shadow: 0 2px 10px rgba(11, 26, 59, 0.10);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  transition: box-shadow 250ms var(--ease-out), transform 250ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .trat-grid article:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }
}
.trat-grid article:active {
  transform: scale(0.985);
  transition-duration: 100ms;
}
.trat-grid h3 {
  font-size: 1.12rem;
  margin: 0 0 8px;
  font-family: var(--font-main);
  color: var(--text-dark);
}

/* Título de cada área na aba de tratamentos */
.trat-grupo {
  margin: 36px 0 4px !important;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  font-size: 1.3rem !important;
}
.trat-grupo:first-of-type {
  margin-top: 8px !important;
}
.trat-grid h3 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
/* Estende a área clicável do título para o card inteiro: sem isso o card
   levanta no hover mas só ~9% da área responde ao toque. */
.trat-grid h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius-lg);
}
.trat-grid h3 a:focus-visible {
  color: var(--primary-medium);
  text-decoration: underline;
}
@media (hover: hover) and (pointer: fine) {
  .trat-grid h3 a:hover {
    color: var(--primary-medium);
    text-decoration: underline;
  }
}
.trat-grid p {
  font-size: 0.93rem;
  margin-bottom: 12px !important;
}
.trat-grid .trat-link {
  /* Fica acima do ::after que cobre o card, senão o link perderia o clique.
     O padding vertical leva a área de toque aos 24px mínimos. */
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 3px 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

@media (max-width: 600px) {
  .page-header { padding: 32px 0 28px; }
  .page-body { padding: 32px 0 8px; }
  .pro-box { flex-direction: column; align-items: center; text-align: center; }
  .pro-box img { width: 140px; }
  .cta-box, .local-box { padding: 20px; }
}


/* Perfil do profissional */
.perfil {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 8px;
}
.perfil-foto {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}
.perfil h2:first-child {
  margin-top: 0 !important;
}

/* Grade da equipe */
.equipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin: 8px 0 24px;
}
.equipe-card {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-white);
  border: 1px solid rgba(30, 58, 110, 0.32);
  box-shadow: 0 2px 10px rgba(11, 26, 59, 0.10);
  border-radius: var(--border-radius-lg);
  padding: 18px;
  transition: box-shadow 250ms var(--ease-out), transform 250ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .equipe-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }
}
.equipe-card:active {
  transform: scale(0.985);
  transition-duration: 100ms;
}
.equipe-foto {
  flex-shrink: 0;
  display: block;
  width: 96px;
}
.equipe-foto img {
  width: 96px;
  height: auto;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}
.equipe-card h2 {
  font-size: 1.05rem !important;
  font-family: var(--font-main) !important;
  margin: 0 0 4px !important;
}
.equipe-card h2 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}
/* Mesmo motivo do .trat-grid: o card inteiro precisa responder ao toque. */
.equipe-card h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius-lg);
}
.equipe-card .equipe-foto,
.equipe-card .card-link {
  position: relative;
  z-index: 1;
}
.equipe-card h2 a:focus-visible {
  color: var(--primary-medium);
  text-decoration: underline;
}
@media (hover: hover) and (pointer: fine) {
  .equipe-card h2 a:hover {
    color: var(--primary-medium);
    text-decoration: underline;
  }
}
.equipe-card p {
  font-size: 0.92rem;
  margin: 8px 0 0 !important;
}

@media (max-width: 620px) {
  .perfil { grid-template-columns: 1fr; gap: 18px; }
  .perfil-foto { max-width: 240px; margin: 0 auto; display: block; }
  .equipe-card { flex-direction: column; align-items: center; text-align: center; }
  .equipe-foto, .equipe-foto img { width: 130px; }
}

/* Como chegar */
.endereco {
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-sand);
  border-radius: var(--border-radius-lg);
  padding: 18px 22px;
  margin-bottom: 18px;
}
.cta-linha {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.mapa-box {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 8px;
}
.mapa-box iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}
.horarios {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}
.horarios th,
.horarios td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--primary-light);
  font-size: 0.95rem;
}
.horarios th {
  color: var(--text-dark);
  font-weight: 600;
  white-space: nowrap;
}

/* Aviso de profissional independente */
.aviso-box {
  border-left: 4px solid var(--accent-blue);
  background: var(--primary-light);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.aviso-box p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .mapa-box iframe { height: 300px; }
  .cta-linha .btn-primary,
  .cta-linha .btn-secondary { width: 100%; justify-content: center; }
}

/* Foto da fachada */
.foto-fachada {
  margin: 0 0 24px;
}
.foto-fachada img {
  /* width:auto + max-width:100% impede que a foto seja ampliada além do
     tamanho original, o que borraria a imagem. */
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--primary-light);
  box-shadow: var(--shadow-md);
  display: block;
}
.foto-fachada figcaption {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-gray);
}

/* Reveal on scroll (classes aplicadas por reveal.js).
   As regras :active dos cards têm especificidade maior que .reveal.is-revealed,
   então continuam funcionando depois que o elemento entra. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transform: none;
    transition: opacity 300ms var(--ease-out);
  }
}

/* Artigo das dicas */
.artigo-meta {
  border-left: 3px solid var(--accent-blue);
  padding: 4px 0 4px 16px;
  margin-bottom: 28px;
}
.artigo-meta p {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-gray);
}
.artigo-meta p:last-child { margin-bottom: 0; }
.artigo-relacionado {
  background: var(--bg-sand);
  border-radius: var(--border-radius-lg);
  padding: 16px 20px;
  margin: 28px 0;
}
.artigo-relacionado p { margin-bottom: 0; }

/* Link do Instagram no box do profissional */
.link-insta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
}
.link-insta svg {
  flex-shrink: 0;
}

/* Perfil do parceiro — foto em destaque, maior que a do box padrão */
.perfil-parceiro {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  align-items: start;
  background: var(--bg-sand);
  border-radius: var(--border-radius-lg);
  padding: 26px;
  margin: 8px 0 28px;
}

.perfil-parceiro picture {
  display: block;
}

.perfil-parceiro img {
  width: 100%;
  height: auto;
  /* o width/height no HTML reserva o espaço e evita o pulo no carregamento */
  aspect-ratio: 600 / 901;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.perfil-parceiro-info h3 {
  margin: 0 0 4px;
  font-size: 1.32rem;
  color: var(--text-dark);
}

.perfil-parceiro-info .pro-especialidade {
  font-size: 1rem;
}

.perfil-parceiro-info .pro-cro {
  margin-bottom: 14px;
}

.perfil-parceiro-info p {
  font-size: 0.97rem;
  margin-bottom: 12px;
}

.perfil-parceiro-info p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .perfil-parceiro {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    text-align: center;
    padding: 22px 18px;
  }
  .perfil-parceiro picture {
    width: min(320px, 80vw);
  }
  .perfil-parceiro-info .link-insta {
    justify-content: center;
  }
}

/* Foto de apoio no corpo da página do parceiro */
.nutri-figura {
  float: right;
  width: 300px;
  margin: 0 0 20px 26px;
}
.nutri-figura img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 895;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}
.nutri-figura figcaption {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-gray);
}
@media (max-width: 700px) {
  .nutri-figura {
    float: none;
    width: 100%;
    margin: 0 0 22px;
  }
}

/* Bloco de foto + texto contido, para seções curtas onde um float vazaria */
.nutri-bloco {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}
.nutri-bloco img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 899;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}
.nutri-bloco p:last-child {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  .nutri-bloco {
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: center;
  }
  .nutri-bloco picture {
    width: min(300px, 80vw);
  }
}
