/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --tinta: #0f2438;
  --azul: #1c4464;
  --azul-claro: #2c5f88;
  --cobre: #b0764a;
  --cobre-escuro: #95603a;
  --areia: #edf1f5;
  --papel: #fbfcfd;
  --texto: #1f2a37;
  --suave: #5b6776;
  --linha: #dde3ea;
  --pendente: #c2410c;

  --serifa: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(15, 36, 56, .06), 0 8px 24px rgba(15, 36, 56, .07);
}

  /* Fundo do Modal */
  .overlay-presente {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1c4464; /* Mesma cor do seu theme-color */
    z-index: 99999; /* Fica acima de todo o site */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
  }
  .overlay-presente.escondido {
    opacity: 0;
    visibility: hidden;
  }

  /* Container Geral */
  .container-presente {
    text-align: center;
    cursor: pointer;
  }

  /* Animação de pulsar o texto */
  .texto-presente {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 2rem;
    animation: pulsar 1.5s infinite;
  }
  @keyframes pulsar {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
  }

  /* Caixa de Presente */
  .caixa-presente {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    animation: balancar 2s infinite;
  }
  
  /* Corpo da caixa */
  .caixa-presente .corpo {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 100px;
    height: 80px;
    background-color: #e74c3c;
    border-radius: 0 0 8px 8px;
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.2);
  }
  .caixa-presente .corpo::before { /* Fita vertical do corpo */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background-color: #f1c40f;
  }

  /* Tampa da caixa */
  .caixa-presente .tampa {
    position: absolute;
    top: 15px;
    left: 0;
    width: 120px;
    height: 25px;
    background-color: #c0392b;
    border-radius: 4px;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    transform-origin: top right;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  }
  .caixa-presente .tampa::before { /* Fita vertical da tampa */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background-color: #f1c40f;
  }

  /* Laço do presente */
  .caixa-presente .laco {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 15px;
    z-index: 3;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
  }
  .caixa-presente .laco::before, .caixa-presente .laco::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 15px;
    border: 4px solid #f1c40f;
    border-radius: 50%;
    top: 0;
  }
  .caixa-presente .laco::before { right: 50%; border-right: none; transform: skewY(-15deg); }
  .caixa-presente .laco::after { left: 50%; border-left: none; transform: skewY(15deg); }

  /* Animação de chacoalhar */
  @keyframes balancar {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-5deg); }
    20%, 40%, 60%, 80% { transform: rotate(5deg); }
  }

  /* Estado ABERTO */
  .caixa-presente.aberta {
    animation: none;
  }
  .caixa-presente.aberta .tampa,
  .caixa-presente.aberta .laco {
    /* Faz a tampa voar para trás/cima e sumir */
    transform: rotate(45deg) translate(30px, -60px);
    opacity: 0;
  }


html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--papel);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* Recuo lateral de 24px (Bootstrap usa 12px). Também é o que cobre a margem
   negativa das linhas .g-5; com 12px elas vazavam e criavam rolagem horizontal. */
.container { --bs-gutter-x: 3rem; }

h1, h2, h3 { font-family: var(--serifa); color: var(--tinta); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; margin-bottom: 1rem; }
h3 { font-size: 1.3rem; }
h1 em { font-style: italic; color: var(--azul-claro); }
a { color: var(--azul); }
a:hover { color: var(--cobre-escuro); }
:focus-visible { outline: 3px solid var(--cobre); outline-offset: 3px; }

.sobretitulo {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cobre-escuro); margin-bottom: .75rem;
}

/* Marcador de dado pendente — some quando o campo é preenchido em config.php */
.pendente {
  display: inline-block;
  border: 1.5px dashed var(--pendente);
  color: var(--pendente);
  background: rgba(194, 65, 12, .06);
  border-radius: 6px;
  padding: 0 .4em;
  font-size: .85em;
  font-family: var(--sans);
  font-weight: 500;
}
.nota-interna { display: block; padding: .6rem .8rem; margin-top: 1rem; line-height: 1.5; }

/* ─── BOTÕES ─────────────────────────────────────────────── */
.btn { border-radius: 999px; font-weight: 600; padding: .65rem 1.4rem; }
.btn-lg { padding: .85rem 1.7rem; font-size: 1rem; }
.btn-principal { background: var(--cobre); color: #fff; border: 1px solid var(--cobre); }
.btn-principal:hover, .btn-principal:focus { background: var(--cobre-escuro); border-color: var(--cobre-escuro); color: #fff; }
.btn-contorno { border: 1px solid var(--azul); color: var(--azul); background: transparent; }
.btn-contorno:hover { background: var(--azul); color: #fff; }

/* ─── CABEÇALHO ─────────────────────────────────────────────── */
/* No topo da página: vidro claro com logo azul. Ao rolar: vidro azul com logo branca. */
.topo {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(251, 252, 253, .72);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.topo.rolado {
  background: rgba(28, 68, 100, .78);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 8px 28px rgba(15, 36, 56, .22);
}
.topo .navbar { padding: .7rem 0; }
.marca { position: relative; display: block; line-height: 0; }
.logo { height: 52px; width: auto; transition: opacity .35s ease; }
.logo-branca { position: absolute; left: 0; top: 0; opacity: 0; }
.topo.rolado .logo-azul { opacity: 0; }
.topo.rolado .logo-branca { opacity: 1; }
.topo.rolado .nav-link, .topo.rolado .navbar-toggler { color: #fff; }
.topo.rolado .nav-link:hover, .topo.rolado .nav-link:focus { color: #e9c3a2; }
@media (max-width: 575.98px) { .logo { height: 48px; } }
.monograma {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: var(--azul); color: var(--areia);
  font-family: var(--serifa); font-size: 1.05rem; letter-spacing: .04em;
}
.nav-link { color: var(--texto); font-weight: 500; font-size: .95rem; }
.nav-link:hover, .nav-link:focus { color: var(--cobre-escuro); }
.navbar-toggler { border: 0; font-size: 1.8rem; color: var(--tinta); padding: 0 .25rem; }
.navbar-toggler:focus { box-shadow: none; }
@media (max-width: 991.98px) {
  .navbar-nav { padding: 1rem 0 .5rem; }
  .navbar-nav .btn { margin-top: .5rem; width: 100%; }
}

/* ─── INÍCIO ─────────────────────────────────────────────── */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); background: linear-gradient(180deg, var(--papel) 0%, var(--areia) 100%); }
.hero .lead { font-size: 1.15rem; color: var(--suave); max-width: 38em; margin-top: 1.25rem; }
.credenciais { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.credenciais li { display: flex; align-items: center; gap: .55rem; font-size: .95rem; color: var(--suave); }
.credenciais i { color: var(--cobre); font-size: 1.15rem; }
.credenciais strong { color: var(--tinta); font-weight: 600; }

.retrato, .foto-consultorio { position: relative; margin: 0; }
.retrato img, .foto-consultorio img { width: 100%; height: auto; border-radius: var(--raio); display: block; object-fit: cover; }
.retrato img { aspect-ratio: 840 / 892; background: var(--azul); }
.foto-consultorio img { aspect-ratio: 4 / 5; }
.retrato-placeholder {
  aspect-ratio: 4 / 5; border-radius: var(--raio);
  background:
    radial-gradient(circle at 30% 20%, rgba(176, 118, 74, .18), transparent 55%),
    linear-gradient(160deg, var(--azul) 0%, var(--tinta) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  padding: 1.5rem; text-align: center;
}
.foto-consultorio .retrato-placeholder { aspect-ratio: 4 / 5; }
.retrato-placeholder .pendente { color: #fed7aa; border-color: #fdba74; background: rgba(0, 0, 0, .15); }
.retrato-placeholder > i { font-size: 3rem; color: rgba(237, 241, 245, .7); }
.monograma-grande { width: 120px; height: 120px; font-size: 2.6rem; background: rgba(237, 241, 245, .1); border: 1px solid rgba(237, 241, 245, .3); }
.retrato figcaption {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem;
  background: var(--papel); border-radius: 10px; padding: .75rem 1rem;
  box-shadow: var(--sombra); display: flex; flex-direction: column; line-height: 1.35;
}
.retrato figcaption strong { font-family: var(--serifa); font-weight: 500; color: var(--tinta); }
.retrato figcaption span { font-size: .85rem; color: var(--suave); }

/* ─── SEÇÕES ─────────────────────────────────────────────── */
.secao { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.secao-areia { background: var(--areia); }
.secao-escura { background: var(--tinta); color: rgba(237, 241, 245, .82); }
.secao-escura h2, .secao-escura h3 { color: var(--areia); }
.secao-escura .sobretitulo { color: #d9a77f; }
.secao-escura a { color: #e9c3a2; }
.secao-escura a:hover { color: #fff; }
.cabecalho-secao { max-width: 44rem; margin-bottom: 3rem; }
.cabecalho-secao p:not(.sobretitulo) { color: var(--suave); }
.estreito { max-width: 820px; }

/* Tratamentos */
.cartao {
  height: 100%; background: #fff; border: 1px solid var(--linha); border-radius: var(--raio);
  padding: 1.75rem; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.cartao:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: #c9d3de; }
.cartao > i {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--areia); color: var(--azul); font-size: 1.35rem; margin-bottom: 1.1rem;
}
.cartao h3 { margin-bottom: .5rem; }
.cartao p { color: var(--suave); margin: 0; font-size: 1rem; }

/* Sobre */
.subtitulo { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: #d9a77f !important; margin-bottom: 1.25rem; }
.linha-formacao { list-style: none; padding: 0 0 0 1.25rem; margin: 0; border-left: 1px solid rgba(237, 241, 245, .2); }
.linha-formacao li { position: relative; padding-bottom: 1.25rem; display: flex; flex-direction: column; }
.linha-formacao li:last-child { padding-bottom: 0; }
.linha-formacao li::before {
  content: ""; position: absolute; left: calc(-1.25rem - 5px); top: .55em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--cobre);
}
.linha-formacao strong { color: var(--areia); font-weight: 600; }
.linha-formacao span { font-size: .95rem; }
.lista-publicacoes { list-style: none; padding: 0; margin: 0; }
.lista-publicacoes li { display: flex; gap: 1.25rem; padding: .9rem 0; border-top: 1px solid rgba(237, 241, 245, .12); }
.lista-publicacoes .ano { font-family: var(--serifa); color: #d9a77f; min-width: 3rem; }
.lista-publicacoes a, .lista-publicacoes .titulo-pub { display: block; line-height: 1.4; color: var(--areia); text-decoration: none; }
.lista-publicacoes a:hover { text-decoration: underline; }
.lista-publicacoes small { font-size: .85rem; font-style: italic; }

/* Como funciona */
.etapas { list-style: none; padding: 0; }
.etapa { height: 100%; padding-top: 1.25rem; border-top: 2px solid var(--linha); }
.etapa .numero { font-family: var(--serifa); font-size: 2.4rem; color: var(--cobre); line-height: 1; display: block; margin-bottom: .75rem; }
.etapa p { color: var(--suave); font-size: 1rem; margin: 0; }

/* Informações (endereço, contato) */
.lista-info { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.lista-info li { display: flex; gap: .9rem; padding: .65rem 0; align-items: flex-start; }
.lista-info i { color: var(--cobre); font-size: 1.2rem; line-height: 1.5; }
.lista-info-clara { margin-top: 0; }
.lista-info-clara span { color: var(--areia); }

/* Dúvidas */
.perguntas details { border-bottom: 1px solid var(--linha); }
.perguntas summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-family: var(--serifa); font-size: 1.2rem; color: var(--tinta);
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.5rem; color: var(--cobre); transition: transform .2s;
}
.perguntas details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.perguntas details p { color: var(--suave); padding-bottom: 1.25rem; margin: 0; }

/* Contato */
.form-contato .form-label { color: var(--areia); font-size: .9rem; font-weight: 500; }
.form-contato .form-label small { color: rgba(237, 241, 245, .6); }
.form-contato .form-control, .form-contato .form-select {
  background-color: rgba(255, 255, 255, .06); border: 1px solid rgba(237, 241, 245, .2);
  color: var(--areia); border-radius: 10px; padding: .7rem .9rem;
}
.form-contato .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23edf1f5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-contato .form-select option { color: var(--texto); }
.form-contato .form-control:focus, .form-contato .form-select:focus {
  background-color: rgba(255, 255, 255, .1); border-color: var(--cobre); box-shadow: 0 0 0 .2rem rgba(176, 118, 74, .25); color: #fff;
}
.form-contato .form-control.is-invalid { border-color: #f87171; }
.form-aviso { margin: .75rem 0 0; font-size: .9rem; min-height: 1.4em; color: #fecaca; }
.mapa { margin-top: 1.5rem; border-radius: var(--raio); overflow: hidden; aspect-ratio: 16 / 10; background: var(--azul); }
.mapa iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ─── RODAPÉ ─────────────────────────────────────────────── */
.rodape { background: #0a1a2a; color: rgba(237, 241, 245, .6); padding: 2.5rem 0; font-size: .88rem; }
.rodape p { margin: 0 0 .25rem; }
.rodape-logo { height: 56px; width: auto; margin-bottom: 1rem; }
.rodape-nome { font-family: var(--serifa); color: var(--areia); font-size: 1.1rem; }

/* ─── WHATSAPP FLUTUANTE ─────────────────────────────────── */
.whatsapp-flutuante {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; font-size: 1.7rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.whatsapp-flutuante:hover { color: #fff; transform: scale(1.06); }

/* ─── ANIMAÇÃO DE ENTRADA ─────────────────────────────────── */
.js .revelar { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .revelar.visivel { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .revelar { opacity: 1; transform: none; transition: none; }
  .cartao, .whatsapp-flutuante { transition: none; }
}
