/* ═══════════════════════════════════════════════════════════
   BASE.CSS — estilos compartilhados por todo o site
   Importar este arquivo em TODOS os templates antes dos
   CSS específicos de página.
   ═══════════════════════════════════════════════════════════ */

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

/* ── VARIÁVEIS GLOBAIS ── */
:root {
  /* Paleta */
  --sky-top:    #dff4ff;
  --sky-mid:    #fef6ec;
  --sky-bot:    #fde8d8;
  --orange:     #e85d00;
  --orange-lt:  #ff9a3c;
  --yellow:     #ffd166;
  --yellow-lt:  #fff8e1;
  --text:       #2d2d2d;
  --text-muted: #888;
  --white:      #ffffff;

  /* Sombras e bordas */
  --card-shadow: 0 4px 20px rgba(0,0,0,.08);
  --radius-lg:   22px;
  --radius-md:   14px;

  /* Tipografia */
  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── BODY / FUNDO ── */
body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(180deg,
    var(--sky-top) 0%,
    var(--sky-mid) 60%,
    var(--sky-bot) 100%
  );
  background-attachment: fixed;
}

/* ── NAVBAR ── */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1.5px solid rgba(255,180,80,.2);
  padding: .65rem 2rem;
  display: flex; align-items: center; gap: 1rem;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800;
  color: var(--orange); text-decoration: none;
  display: flex; align-items: center; gap: .35rem;
  margin-right: 1rem;
}
.nav-links {
  display: flex; align-items: center; gap: .2rem;
  flex: 1;
}
.nav-links a {
  padding: .4rem .85rem; border-radius: 40px;
  font-size: .88rem; font-weight: 700;
  color: var(--text-muted); text-decoration: none;
  transition: background .15s, color .15s;
}

.nav-links a:hover,
.nav-links a.active { background: var(--yellow-lt); color: var(--orange); font-weight: 700; } /* Primeiro Nível (Seu código atual) */
.nav-links a.active2 { background: rgba(255, 154, 60, 0.18); color: rgba(232, 93, 0, 0.6); font-weight: 700; } /* Segundo Nível (Sub-menu Ativo) */ /* Raio menor para o sub-menu */

.nav-right {
  display: flex; align-items: center; gap: .6rem;
  margin-left: auto;
}
/* Grupo de botões CTA (visitor) */
.nav-cta { display: flex; gap: .6rem; }

/* ── BOTÕES ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; border-radius: 40px; border: none;
  font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.btn:hover  { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-lt));
  color: white;
  box-shadow: 0 4px 14px rgba(232,93,0,.3);
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--orange);
  color: var(--orange);
}
/* Tamanho hero (usado nas landing pages e CTAs grandes) */
.btn-hero {
  padding: .8rem 1.8rem;
  font-size: 1.05rem;
  border-radius: 50px;
}
/* Variante branca (sobre fundo laranja) */
.btn-white {
  background: white;
  color: var(--orange);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* ── SELETOR DE CRIANÇA (navbar logada) ── */
.child-selector {
  display: flex; align-items: center; gap: .5rem;
  background: white;
  border: 1.5px solid #ffe0b2;
  border-radius: 40px;
  padding: .35rem .9rem .35rem .5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,150,0,.1);
  transition: box-shadow .15s;
  font-family: var(--font-body);
  font-size: .88rem; font-weight: 700;
  color: var(--text);
  position: relative;
}
.child-selector:hover { box-shadow: 0 4px 14px rgba(255,150,0,.2); }

.child-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D, #FF9F5A);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.child-chevron { color: var(--text-muted); font-size: .7rem; margin-left: .2rem; }

/* Dropdown de crianças */
.child-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border-radius: var(--radius-md);
  border: 1.5px solid #ffe0b2;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  min-width: 200px; overflow: hidden; z-index: 300;
}
.child-selector:focus-within .child-dropdown,
.child-selector.open         .child-dropdown { display: block; }

.child-option {
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem 1rem; cursor: pointer; text-decoration: none;
  font-size: .88rem; font-weight: 700; color: var(--text);
  transition: background .12s;
}
.child-option:hover { background: var(--yellow-lt); }
.child-option.active { color: var(--orange); }
.child-option-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

/* Avatar do usuário (canto direito) */
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(124,58,237,.2);
}

/* ── TÍTULOS DE SEÇÃO ── */
.section-head {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800;
  color: var(--text); margin-bottom: .9rem;
  display: flex; align-items: center; gap: .5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800; text-align: center;
  color: var(--orange); margin-bottom: .5rem;
}
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: 1rem; margin-bottom: 2.5rem;
}

/* ── CARDS GENÉRICOS ── */
.widget {
  background: white; border-radius: var(--radius-lg);
  border: 1.5px solid #f0e6d0;
  box-shadow: var(--card-shadow);
  padding: 1.2rem;
}
.widget-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  color: var(--text); margin-bottom: .8rem;
  display: flex; align-items: center; gap: .4rem;
}

/* ── ANIMAÇÕES REUTILIZÁVEIS ── */
@keyframes floatIn {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes badgeFloat {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}
@keyframes bounce {
  0%,100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-10px) rotate(8deg); }
}
@keyframes twinkle {
  from { opacity: .2; transform: scale(.8); }
  to   { opacity: 1;  transform: scale(1.2); }
}

/* Estrelas de fundo (opcional, ativar via JS) */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
  position: absolute; background: white; border-radius: 50%;
  animation: twinkle var(--d, 2s) ease-in-out infinite alternate;
}

/* ── FOOTER ── */
footer {
  background: #2d2d2d; color: #aaa;
  padding: 2rem; text-align: center;
  font-size: .85rem;
}
footer a { color: var(--yellow); text-decoration: none; }

/* ── RESPONSIVO GLOBAL ── */
@media (max-width: 600px) {
  .navbar    { padding: .65rem 1rem; }
  .nav-links { display: none; }
}
