/* ==========================================================================
   DentRisk Kids — estilos base compartilhados
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --navy: #173a63;
  --navy-dark: #102847;
  --blue: #2f8fd1;
  --teal: #17b3c7;
  --teal-dark: #119aab;
  --pink: #ff5f8f;
  --yellow: #ffcd3c;
  --green: #4cb050;
  --purple: #9b6bd4;
  --bg: #f5faff;
  --card-bg: #ffffff;
  --text: #22314a;
  --text-light: #5b6b80;
  --border: #e3edf7;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --shadow-soft: 0 10px 30px rgba(23, 58, 99, 0.10);
  --shadow-hover: 0 16px 40px rgba(23, 58, 99, 0.18);

  --max-width: 1120px;
  --font-heading: 'Baloo 2', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--text-light); }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------- Header / navegação -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header { transition: transform 0.25s ease; }
html.hdr-hidden .site-header { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.site-header .header-compacto { justify-content: flex-start; gap: 28px; }
@media (max-width: 980px) { .site-header .header-compacto { justify-content: space-between; } }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--navy);
}

.brand img { height: 64px; width: auto; }

/* .brand-word ("DentRisk") herda a cor do contexto: navy no cabeçalho claro,
   branco no rodapé escuro — só as letras de "Kids" têm cor fixa da marca. */

/* Cada letra de "Kids" segue a cor da logo oficial. */
.brand .kids .k { color: var(--blue); }
.brand .kids .i { color: var(--yellow); }
.brand .kids .d { color: var(--pink); }
.brand .kids .s { color: var(--green); }

nav.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  row-gap: 8px;
  flex-wrap: wrap;
}

nav.main-nav a {
  color: var(--navy);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

nav.main-nav a:hover,
nav.main-nav a:focus-visible {
  background: var(--bg);
  color: var(--teal-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

nav.main-nav a.active {
  background: var(--navy);
  color: #fff;
}

.nav-switch {
  border: 2px solid var(--teal);
  color: var(--teal-dark) !important;
}

.nav-switch:hover { background: var(--teal) !important; color: #fff !important; }

/* -------------------- Seletor de idioma (bandeiras) -------------------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 10px;
  margin-left: 6px;
  border-left: 1px solid var(--border);
}
.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: none;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  filter: grayscale(70%);
  transition: opacity 0.2s, filter 0.2s, transform 0.15s, border-color 0.2s;
}
.lang-btn:hover { opacity: 0.8; transform: translateY(-1px); }
.lang-btn.active { opacity: 1; filter: none; border-color: var(--teal); background: var(--bg); }

@media (max-width: 980px) {
  .lang-switch { border-left: none; border-top: 1px solid var(--border); padding: 10px 0 0; margin: 4px 0 0; justify-content: center; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 38px;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--navy);
}

@media (max-width: 980px) {
  nav.main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding-top: 10px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { text-align: center; }
  .site-header .container { flex-wrap: wrap; }
  .nav-toggle { display: block; flex: none; }
}

/* celular: logo + nome menores para o botão do menu ficar na mesma linha */
@media (max-width: 560px) {
  .site-header .container { gap: 8px; }
  .brand { font-size: 1.15rem; gap: 8px; min-width: 0; }
  .brand img { height: 46px; }
}

/* -------------------- Botões -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-hover); text-decoration: none; }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-primary { background: var(--navy); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--navy-dark); }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* -------------------- Seções / cartões -------------------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-title { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-title p { margin-top: 10px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: #e6fbfd;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.grid {
  display: grid;
  gap: 26px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
}
.badge-green { background: #e5f6e6; color: #2f7a33; }
.badge-yellow { background: #fff6df; color: #9a7500; }
.badge-red { background: #fde6e9; color: #b3273f; }
.badge-teal { background: #e6fbfd; color: var(--teal-dark); }

/* -------------------- Hero decorativo -------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 90px;
}

.confetti-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.confetti-bg span {
  position: absolute;
  border-radius: 4px;
  opacity: 0.55;
  animation: float 6s ease-in-out infinite;
}

/* Camada de confete cobrindo a página inteira (dentro de #conteudo). As
   seções de conteúdo real precisam de position:relative + z-index:1 (feito
   inline em cada página) para ficarem visualmente por cima desta camada. */
#conteudo { position: relative; }
#conteudo > .confetti-bg.confetti-page { position: absolute; inset: 0; }
#conteudo > :not(.confetti-bg) { position: relative; z-index: 1; }

/* Fundo padrão de todas as páginas: azul claro com manchas suaves coloridas */
body.publico, body.profissionais {
  background:
    radial-gradient(520px 380px at 8% 12%, rgba(47,143,209,.13), transparent 70%),
    radial-gradient(560px 420px at 92% 18%, rgba(255,95,143,.10), transparent 70%),
    radial-gradient(520px 400px at 78% 62%, rgba(255,205,60,.12), transparent 70%),
    radial-gradient(480px 360px at 14% 78%, rgba(76,176,80,.09), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(12deg); }
}

/* -------------------- Rodapé -------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-dark), #0b1f38);
  color: #cfe0f2;
  padding: 52px 0 24px;
  margin-top: 64px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Fita colorida no topo, ecoando as cores da marca (K-i-d-s) */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--pink), var(--green));
}

/* As mesmas "linhas de circuito" (esquerda) e "pixels" (direita) que aparecem
   ao lado do dente na logo, aqui continuando pela área azul do rodapé —
   bem discretas, só uma textura de fundo atrás do conteúdo real. */
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat, no-repeat;
  background-position: left 6px top 14px, right 6px top 14px;
  background-size: 200px auto, 200px auto;
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="260" height="240" viewBox="0 0 260 240"><g fill="none" stroke="%2317b3c7" stroke-width="3" stroke-linecap="round" stroke-opacity="0.4"><path d="M10 40 H60 L80 20 H130"/><path d="M10 80 H45 L65 100 H120"/><path d="M10 120 H70 L90 140 H140"/><path d="M10 160 H50 L70 180 H110"/></g><g fill="%232f8fd1" opacity="0.45"><circle cx="10" cy="40" r="5"/><circle cx="130" cy="20" r="5"/><circle cx="10" cy="80" r="5"/><circle cx="120" cy="100" r="5"/><circle cx="10" cy="120" r="5"/><circle cx="140" cy="140" r="5"/><circle cx="10" cy="160" r="5"/><circle cx="110" cy="180" r="5"/></g></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="260" height="240" viewBox="0 0 260 240"><g opacity="0.5"><rect x="210" y="10" width="14" height="14" fill="%2317b3c7"/><rect x="230" y="30" width="10" height="10" fill="%232f8fd1"/><rect x="190" y="30" width="12" height="12" fill="%23ffcd3c"/><rect x="215" y="50" width="16" height="16" fill="%239b6bd4"/><rect x="170" y="55" width="10" height="10" fill="%2317b3c7"/><rect x="240" y="60" width="12" height="12" fill="%234cb050"/><rect x="195" y="75" width="10" height="10" fill="%23ff5f8f"/><rect x="150" y="80" width="8" height="8" fill="%232f8fd1"/><rect x="220" y="90" width="10" height="10" fill="%2317b3c7"/><rect x="130" y="100" width="8" height="8" fill="%23ffcd3c"/><rect x="180" y="105" width="8" height="8" fill="%234cb050"/><rect x="110" y="120" width="6" height="6" fill="%2317b3c7"/><rect x="150" y="130" width="6" height="6" fill="%239b6bd4"/><rect x="90" y="140" width="6" height="6" fill="%232f8fd1"/></g></svg>');
}

.site-footer .container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: 30px;
}

.site-footer .container > div:first-child { flex: 1 1 240px; }

.site-footer .brand img { filter: drop-shadow(0 0 16px rgba(23, 179, 199, 0.45)); }

.site-footer .container > div strong {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 8px;
}
.site-footer .container > div strong::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 28px; height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.site-footer a { color: #cfe0f2; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }

.site-footer .container > div a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 2.3;
  transition: color 0.2s, transform 0.2s;
}
.site-footer .container > div a::after {
  content: "→";
  opacity: 0;
  color: var(--teal);
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.site-footer .container > div a:hover {
  transform: translateX(3px);
  text-decoration: none;
}
.site-footer .container > div a:hover::after { opacity: 1; transform: translateX(0); }

.site-footer small { color: #93a8c2; display: block; margin-top: 18px; }

/* Precisa do prefixo ".site-footer" pra empatar em especificidade com
   ".site-footer .container" (que põe display:flex nela também, já que
   este elemento carrega as duas classes) e daí vencer por vir depois. */
.site-footer .footer-disclaimer {
  display: block;
  position: relative;
  z-index: 1;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 4px;
  padding-top: 22px;
  font-size: 0.85rem;
  color: #93a8c2;
  line-height: 1.9;
}
/* Ícone "i" embutido no início do texto (não em flex) — assim o parágrafo
   segue o fluxo normal de texto e quebra linha certinho em telas estreitas. */
.footer-disclaimer::before {
  content: "i";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #cfe0f2;
  font-family: var(--font-heading);
  font-weight: 800;
  font-style: italic;
  font-size: 0.8rem;
}
.footer-disclaimer a { font-weight: 700; color: #cfe0f2; }
.footer-disclaimer a:hover { color: #fff; }

@media (max-width: 640px) {
  .site-footer { border-radius: 22px 22px 0 0; text-align: center; }
  .site-footer .container { flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  .site-footer .container > div:first-child { flex-basis: auto; width: 100%; }
  .site-footer .brand { justify-content: center; }
  .site-footer .container > div strong { padding-bottom: 12px; }
  .site-footer .container > div strong::after { left: 50%; transform: translateX(-50%); }
  .site-footer .container > div a { justify-content: center; }
  /* Em telas estreitas a marca fica centralizada, então as linhas/pixels nos
     dois cantos ficariam colados no texto — melhor esconder e manter só a
     fita colorida do topo. */
  .site-footer::after { display: none; }
}

/* -------------------- Utilidades de animação (reveal ao rolar) -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* -------------------- Acessibilidade -------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* -------------------- Mascotes flutuantes (decoração) -------------------- */
.floaters {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.floaters img {
  position: absolute;
  filter: drop-shadow(0 8px 12px rgba(23, 58, 99, 0.14));
  will-change: transform;
}
.floaters .float-a { width: 56px; top: 10%; left: 4%; animation: floatBob 8s ease-in-out infinite; }
.floaters .float-b { width: 42px; top: 66%; left: 90%; animation: floatBobRev 10s ease-in-out infinite; animation-delay: 1.2s; }
.floaters .float-c { width: 50px; top: 80%; left: 8%; animation: floatBob 9.5s ease-in-out infinite; animation-delay: 2.5s; }
.floaters .float-d { width: 38px; top: 14%; left: 92%; animation: floatBobRev 7.5s ease-in-out infinite; animation-delay: 0.6s; }
.floaters .float-astro { width: 76px; top: 22%; left: -12%; animation: floatTravel 26s linear infinite; }

@keyframes floatBob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(5deg); }
}
@keyframes floatBobRev {
  0%, 100% { transform: translateY(0) rotate(7deg); }
  50% { transform: translateY(18px) rotate(-6deg); }
}
@keyframes floatTravel {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  25%  { transform: translate(32vw, -46px) rotate(5deg); }
  50%  { transform: translate(64vw, 20px) rotate(-6deg); }
  75%  { transform: translate(96vw, -30px) rotate(6deg); }
  100% { transform: translate(128vw, 0) rotate(-8deg); }
}

@media (max-width: 700px) {
  .floaters .float-a, .floaters .float-b, .floaters .float-c, .floaters .float-d { display: none; }
  .floaters .float-astro { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .floaters img { animation: none !important; }
}

/* -------------------- Componentes: stepper, tabs, accordion -------------------- */
.stepper { display: flex; flex-direction: column; gap: 18px; }
.step {
  display: none;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}
.step.active { display: block; animation: fadein 0.4s ease; }
@keyframes fadein { from { opacity: 0; transform: translateX(12px);} to {opacity: 1; transform: translateX(0);} }

.step-dots { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.step-dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: none; background: var(--border); cursor: pointer;
  padding: 0;
}
.step-dots button.active { background: var(--teal); width: 28px; border-radius: 999px; }

.step-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 12px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tab-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--navy);
  transition: all 0.2s;
}
.tab-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein 0.35s ease; }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}
.accordion-header {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-header .icon { transition: transform 0.25s; }
.accordion-item.open .accordion-header .icon { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 22px;
}
.accordion-item.open .accordion-body { padding-bottom: 20px; }

/* Alertas de destaque */
.alert {
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border-left: 6px solid var(--teal);
  background: #e6fbfd;
  margin: 20px 0;
}
.alert-warning { border-color: var(--yellow); background: #fff8e2; }
.alert-danger { border-color: var(--pink); background: #ffeef2; }
.alert strong { color: var(--navy); }
