/* ============================================================
   HEADER KIDZENITH - CSS CONSOLIDADO
   Local sugerido: substituir as regras de header do CSS base
   (ou salvar como css/header.css carregado após o base)

   REGRA DE CORES: toda cor referencia os tokens do :root /
   [data-theme="dark"] declarados no CSS base. Este arquivo
   NÃO redeclara o :root - ele apenas consome os tokens.

   Tokens usados:
   --bg-site, --navbar--normal, --navbar--hover, --purple,
   --purple-bg, --btn-secondary-border, --border--transparente--cinza,
   --text-note, --dark, --white

   Estrutura (igual ao mockup): logo | menu | botão (+ toggle tema)
   ============================================================ */

/* ------------------------------------------------------------
   NAVBAR (desktop) - card arredondado light/dark
   ------------------------------------------------------------ */
:root {
  /* CORES TEMA LIGHT (Padrão) */
  --bg-site: #ffffff;
  --navbar--normal: #0A121A;
  --navbar--hover: #1E40AF;
  --header-title: #1e40af;
  --header-text: #15253F;
  --header-text2: #15253F;
  --header-desc: #15253F;
  --btn-secondary-border: #d8d7ec;
  --text-note: #666d7a;
  --border: #1E40AF;
  --border--roxa-azul: rgba(30, 64, 175, 1);
  --border--transparente--cinza: rgba(235, 237, 255, 1);
  --purple: rgba(158, 163, 230, 1);
  --blue: #1E40AF;
  --blue-mid: #00AAFF;
  --blue-light: #9CCDFF;
  --blue-bg: rgba(30, 64, 175, 0.1);
  --blue-bg2: rgba(30, 64, 175, 0.05);
  --blue-bg3: rgba(30, 64, 175, 0.2);
  --blue-bg3: rgba(235, 237, 255, 1);
  --purple-bg: #EBEDFF;
  --green: #00FDA9;
  --dark: #15253F;
  --dark-sec: #405560;
  --grey: #6B7582;
  --grey-b: #5C6068;
  --border: #E5E7EB;
  --border-b: #EBEDFF;
  --white: #FFFFFF;
  --orange: #EE6C56;
  --link-color: #78BCFF;
  --qo-bg: #FDF8EC;
  --qo-amber: #F5B841;
  --pmi-pink: #F2789F;
  --li-cream: #FDF8EC;
  --li-row: #F8E8A4;
}

/* CORES TEMA DARK (Ativado pelo seu JS) */
[data-theme="dark"] {
  --bg-site: #15253F;
  --navbar--normal: #FFFFFF;
  --navbar--hover: #0080FF;
  --header-title: #64B2FF;
  --header-text: #15253F;
  --header-text2: #15253F;
  --header-desc: #050505;
  --btn-secondary-border: var(--header-title);
  --text-note: #ffffff;
  --border: #1E40AF;
  --border--roxa-azul: rgba(0, 128, 255, 0.5);
  --border--transparente--cinza: rgba(76, 76, 76, 1);
  --purple: rgba(158, 163, 230, 1);
  --blue: #0080FF;
  --blue-mid: #00AAFF;
  --blue-light: #9CCDFF;
  --blue-bg: rgba(30, 64, 175, 0.1);
  --blue-bg2: rgba(30, 64, 175, 0.05);
  --blue-bg3: rgba(30, 64, 175, 0.2);
  --blue-bg4: rgba(235, 237, 255, 0.1);
  --purple-bg: rgb(22, 40, 74);
  --green: #00FDA9;
  --dark: #ffffff;
  --dark-sec: rgba(255, 255, 255, 0.5);
  --grey: rgba(255, 255, 255, 0.5);
  --grey-b: #ffffff;
  --border: #E5E7EB;
  --border-b: #EBEDFF;
  --white: #FFFFFF;
  --orange: #EE6C56;
  --link-color: #78BCFF;
  --qo-bg: #1E2A45;
  --pmi-pink: #F2789F;
  --li-cream: #1E2A45;
  --li-row: #7D7040;
}


.navbar {
  background: transparent;
  padding: 14px 28px;
  top: 0;
  z-index: 50;
    margin: 0 auto;
}

.navbar__container {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Mantém logo na esq. e botões na dir. */
  position: relative; /* Necessário para ancorar o menu central */
  gap: 28px;
  background: var(--bg-site);
  border-radius: 16px;
  padding: 10px 18px;
}

/* 1. LOGO */
.navbar__brand {
  flex-shrink: 0;
}

.navbar__brand img {
  width: 180px;
  height: auto;
  display: block;
}

/* 2. MENU */
.navbar__nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 auto; /* Divide o espaço livre entre a esquerda e direita */
}

.navbar__nav a {
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  color: var(--navbar--normal);
  transition: color 0.2s ease;
}

.navbar__nav > .navbar__item > a:hover,
.navbar__nav > .navbar__item > a.is-active {
  color: var(--navbar--hover);
}

/* 3. BOTÃO (CTA + toggle de tema) */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-left: 24px;
}

.navbar__cta {
  min-height: 48px;
  padding: 0 38px;
  background: var(--purple);
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(138, 128, 255, 0.24); /* sombra da cor --purple */
  border-radius: 5px;
  cursor: pointer;
}

.navbar__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.navbar__toggle span {
  width: 18px;
  height: 2px;
  background: var(--navbar--normal);
  display: block;
}

/* ------------------------------------------------------------
   DROPDOWNS (desktop)
   ------------------------------------------------------------ */

.navbar__item {
  position: relative;
  list-style: none;
}

.navbar__item--has-dropdown > .navbar__parent {
  cursor: pointer;
}

.navbar__dropdown {
  list-style: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  background: var(--bg-site);
  border: 1px solid var(--border--transparente--cinza);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(21, 37, 63, 0.14); /* sombra da cor --dark (light) */
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}

/* Ponte invisível que cobre o vão entre o link e o card,
   evitando que o dropdown feche ao mover o mouse até ele */
.navbar__dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.navbar__item--has-dropdown:hover > .navbar__dropdown,
.navbar__item--has-dropdown:focus-within > .navbar__dropdown,
.navbar__item--has-dropdown.is-open > .navbar__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.navbar__dropdown li {
  list-style: none;
}

.navbar__dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  color: var(--navbar--normal);
  white-space: nowrap;
  transition: background 0.15s ease;
}

.navbar__dropdown a:hover,
.navbar__dropdown a:focus-visible,
.navbar__dropdown a.is-active {
  background: var(--purple-bg);
  color: var(--navbar--normal);
}

/* ------------------------------------------------------------
   THEME TOGGLE
   ------------------------------------------------------------ */

.theme-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.theme-toggle__track {
  width: 54px;
  height: 28px;
  border-radius: 999px;
  background: var(--purple-bg);
  border: 1px solid var(--btn-secondary-border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--bg-site);
  box-shadow: 0 2px 8px rgba(31, 42, 68, 0.16); /* sombra da cor --dark (light) */
  transition: transform 0.25s ease;
}

.theme-toggle__icon {
  position: relative;
  z-index: 2;
  font-size: 11px;
  line-height: 1;
  color: var(--navbar--normal);
}

html[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(26px);
}

/* ------------------------------------------------------------
   PAINEL MOBILE
   ------------------------------------------------------------ */

.navbar-mobile {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

.navbar-mobile.is-open {
  display: block;
}

.navbar-mobile__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 23, 0.55); /* escurecimento do fundo (overlay) */
}

.navbar-mobile__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(92vw, 360px);
  height: 100dvh;
  background: var(--bg-site);
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 24px rgba(21, 37, 63, 0.12); /* sombra da cor --dark (light) */
}

.navbar-mobile__top {
  display: flex;
  justify-content: space-between;
  margin-block: 32px;
}

.navbar-mobile__close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--btn-secondary-border);
  border-radius: 8px;
  background: var(--bg-site);
  color: var(--navbar--normal);
  font-size: 20px;
  cursor: pointer;
}

.navbar-mobile__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.navbar-mobile__brand img {
  width: 140px;
  height: auto;
  display: block;
}

/* Área rolável da navegação (mantém CTA/tema/social fixos embaixo) */
.navbar-mobile__navwrap {
  overflow-y: auto;
  min-height: 0;
}

.navbar-mobile__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.navbar-mobile__nav a {
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  color: var(--navbar--normal);
  padding: 14px 12px;
  border-radius: 10px;
  display: block;
}

.navbar-mobile__nav a:hover,
.navbar-mobile__nav a.is-active {
  background: var(--purple-bg);
}

/* Grupos expansíveis (abrem um abaixo do outro, independentes) */
.navbar-mobile__group {
  list-style: none;
}

.navbar-mobile__group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.2;
  color: var(--navbar--normal);
  padding: 14px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.navbar-mobile__group-toggle:hover {
  background: var(--purple-bg);
}

.navbar-mobile__chevron {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.navbar-mobile__group.is-open .navbar-mobile__chevron {
  transform: rotate(180deg);
}

.navbar-mobile__sublist {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 14px;
}

.navbar-mobile__group.is-open .navbar-mobile__sublist {
  display: flex;
}

.navbar-mobile__sublist a {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--navbar--normal);
  padding: 11px 12px;
  border-radius: 8px;
}

.navbar-mobile__sublist a:hover,
.navbar-mobile__sublist a.is-active {
  background: var(--purple-bg);
}

/* CTA do painel mobile */
.navbar-mobile__cta {
  margin-top: 18px;
  min-height: 48px;
  background: var(--purple);
  color: var(--white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: start;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  padding-left: 16px;
  position: relative;
  cursor: pointer;
}

.navbar-mobile__cta-line {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: #FFA17E; /* [PENDENTE: sem token correspondente no root - criar token ou confirmar cor] */
  border-radius: 2px;
}

.navbar-mobile__theme {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.navbar-mobile__social {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 26px;
}

.navbar-mobile__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-mobile__social img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.navbar-mobile__copyright {
  margin-top: 18px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dark);
}

/* ------------------------------------------------------------
   TROCA DE LOGO E ÍCONES POR TEMA
   ------------------------------------------------------------ */

.kz__logo {
  width: 220px;
  height: auto;
}

.kz__logo--light {
  display: block !important;
}

.kz__logo--dark {
  display: none !important;
}

[data-theme="dark"] .kz__logo--light {
  display: none !important;
}

[data-theme="dark"] .kz__logo--dark {
  display: block !important;
}

.social-icon--light {
  display: inline-block;
}

.social-icon--dark {
  display: none;
}

[data-theme="dark"] .social-icon--light {
  display: none;
}

[data-theme="dark"] .social-icon--dark {
  display: inline-block;
}

/* ------------------------------------------------------------
   RESPONSIVO
   ------------------------------------------------------------ */

/* TABLET / MOBILE */
@media (max-width: 900px) {
  .navbar {
    padding: 10px 12px;
  }

  .navbar__container {
    gap: 12px;
    padding: 8px 12px;
  }

  .navbar__brand img {
    width: 135px;
  }

  .navbar__nav,
  .navbar__actions {
    display: none;
  }

  .navbar__toggle {
    display: inline-flex;
  }
}

/* MOBILE MENOR */
@media (max-width: 640px) {
  .navbar-mobile__panel {
    width: 100%;
    max-width: 100%;
    padding: 16px 14px 24px;
  }

  .navbar-mobile__brand img {
    width: 125px;
  }

  .navbar-mobile__cta {
    font-size: 14px;
    min-height: 44px;
  }

  .navbar-mobile__copyright {
    font-size: 11px;
  }
}

