/* =========================================================
   LISTIO nav.css
   Estilos incrementais de navegação — incluir em todas as páginas
   Complementa o CSS principal do header sem quebrar layout
   ========================================================= */

/* ── Desktop Dropdown ────────────────────────────────────── */
.nav__dropdown{
  position:relative;
  display:flex;
  align-items:center;
}

.nav__dropdown-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:44px;
  padding:0 12px;
  border-radius:12px;
  border:none;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-family:inherit;
  font-size:16px;
  font-weight:500;
  white-space:nowrap;
  transition:background 120ms ease, opacity 120ms ease;
}

.nav__dropdown-toggle:hover,
.nav__dropdown.is-open .nav__dropdown-toggle{
  background:rgba(0,0,0,.05);
  opacity:1;
}

.nav__dropdown-toggle .icon{
  transition:transform 180ms ease;
}

.nav__dropdown.is-open .nav__dropdown-toggle .icon{
  transform:rotate(180deg);
}

.nav__dropdown-menu{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  min-width:280px;
  max-width:360px;
  background:var(--white, #fff);
  border:1px solid rgba(0,0,0,.10);
  border-radius:18px;
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  opacity:0;
  pointer-events:none;
  transform:translateY(-6px);
  transition:opacity 140ms ease, transform 140ms ease;
  z-index:200;
  box-shadow:0 10px 30px rgba(41,41,41,.08);
}

.nav__dropdown.is-open .nav__dropdown-menu{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.nav__dropdown-menu a{
  display:flex;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  font-weight:500;
  line-height:1.35;
  opacity:.92;
  transition:background 100ms ease, opacity 100ms ease;
}

.nav__dropdown-menu a:hover{
  background:rgba(0,0,0,.05);
  opacity:1;
}

/* ── Language Switcher ───────────────────────────────────── */
.lang-switcher{
  position:relative;
  display:flex;
  align-items:center;
  flex:0 0 auto;
}

.lang-switcher__current{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:44px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.14);
  cursor:pointer;
  user-select:none;
  background:transparent;
  color:inherit;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
  transition:background 120ms ease, border-color 120ms ease;
}

.lang-switcher__current:hover{
  background:rgba(0,0,0,.05);
}

.lang-switcher__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:84px;
  background:var(--white, #fff);
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:4px;
  opacity:0;
  pointer-events:none;
  transform:translateY(-4px);
  transition:opacity 140ms ease, transform 140ms ease;
  z-index:200;
  box-shadow:0 10px 30px rgba(41,41,41,.08);
}

.lang-switcher.is-open .lang-switcher__menu{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.lang-switcher__menu a{
  display:block;
  padding:8px 12px;
  border-radius:10px;
  font-size:12px;
  font-weight:600;
  text-align:center;
  transition:background 100ms ease;
}

.lang-switcher__menu a:hover{
  background:rgba(0,0,0,.05);
}

.lang-switcher__menu a[aria-current="true"]{
  background:var(--lime, #BFF542);
  color:var(--charcoal, #292929);
}

/* ── Mobile Submenu accordion ────────────────────────────── */
.mobile-menu__item{
  display:grid;
  gap:0;
}

.mobile-menu__toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:44px;
  padding:12px 10px;
  border-radius:12px;
  font-weight:600;
  font-size:14px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(255,255,255,.55);
  color:inherit;
  cursor:pointer;
  font-family:inherit;
  transition:background 120ms ease, border-radius 120ms ease;
}

.mobile-menu__toggle:hover{
  background:rgba(255,255,255,.82);
}

.mobile-menu__item.is-open .mobile-menu__toggle{
  border-radius:12px 12px 0 0;
  border-bottom-color:transparent;
}

.mobile-menu__item.is-open .mobile-menu__toggle .icon{
  transform:rotate(180deg);
}

.mobile-menu__toggle .icon{
  transition:transform 200ms ease;
}

.mobile-menu__submenu{
  max-height:0;
  overflow:hidden;
  transition:max-height 240ms ease;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:0 4px;
  border:1px solid rgba(0,0,0,.08);
  border-top:none;
  border-radius:0 0 12px 12px;
  background:rgba(255,255,255,.35);
}

.mobile-menu__submenu a{
  font-size:13px !important;
  font-weight:500;
  border:none !important;
  border-radius:8px !important;
  background:transparent !important;
  padding:10px 12px !important;
}

.mobile-menu__submenu a:hover{
  background:rgba(255,255,255,.6) !important;
}

/* ── Mobile Language switcher ────────────────────────────── */
.mobile-lang{
  display:flex;
  gap:6px;
  padding:2px 0;
}

.mobile-lang a{
  flex:1;
  text-align:center;
  padding:9px 4px;
  border-radius:10px;
  font-size:12px !important;
  font-weight:600;
  border:1px solid rgba(0,0,0,.10) !important;
  background:rgba(255,255,255,.55) !important;
  transition:background 120ms ease, border-color 120ms ease;
}

.mobile-lang a:hover{
  background:rgba(255,255,255,.82) !important;
}

.mobile-lang a[aria-current="true"]{
  background:var(--lime, #BFF542) !important;
  border-color:transparent !important;
  color:var(--charcoal, #292929) !important;
}

/* ── Mobile Drawer + Overlay ─────────────────────────────── */

/* Hide mobile-menu direct children before nav.js moves them into .mobile-drawer.
   After nav.js runs the children are inside .mobile-drawer (position:fixed),
   so this rule no longer matches them — they display normally in the drawer. */
.mobile-menu > *:not(.mobile-overlay):not(.mobile-drawer){
  display:none !important;
}

/* Overlay escuro atrás do drawer */
.mobile-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(26,26,24,.50);
  z-index:299;
  -webkit-tap-highlight-color:transparent;
}

/* Drawer lateral */
.mobile-drawer{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:min(320px, 88vw);
  background:var(--surface, #F4F4F4);
  z-index:300;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:20px 16px 32px;
  overflow-y:auto;
  transform:translateX(100%);
  transition:transform 260ms cubic-bezier(.4,0,.2,1);
}

/* Estado aberto — controlado pelo body */
body.mobile-nav-open .mobile-overlay{
  display:block;
}

body.mobile-nav-open .mobile-drawer{
  transform:translateX(0);
}

/* Previne scroll do body enquanto menu aberto */
body.mobile-nav-open{
  overflow:hidden;
}

/* Links dentro do drawer */
.mobile-drawer > a{
  display:block;
  padding:12px 10px;
  border-radius:12px;
  font-size:14px;
  font-weight:600;
  color:var(--ink, #1A1A18);
  transition:background 100ms ease;
}

.mobile-drawer > a:hover{
  background:rgba(26,26,24,.06);
}

/* CTAs no fundo do drawer */
.mobile-ctas{
  display:grid;
  gap:10px;
  margin-top:auto;
  padding-top:16px;
}

.mobile-ctas .btn{
  width:100%;
  justify-content:center;
}

/* ── Responsive behavior ─────────────────────────────────── */
@media (max-width:979px){
  .mobile-toggle{
    display:inline-flex !important;
  }

  .nav,
  .header-ctas,
  .lang-switcher{
    display:none !important;
  }
}