/* ═══════════════════════════════════════════════════════════════════
   ASTRO 360 — nav.css
   Réplica EXATA da estrutura do giraodeumbanda.com.br
   Adaptado: paleta lilás+dourado + Fraunces/Inter Tight + logo nova
   ═══════════════════════════════════════════════════════════════════ */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 4, 25, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
  padding: 6px 0;
}

#navbar.scrolled {
  background: rgba(10, 4, 25, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.45);
  padding: 0;
  border-bottom: 1px solid rgba(232, 198, 104, 0.12);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ═══ LOGO ═══ */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo .logo-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}

.nav-logo .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(232, 198, 104, 0.4));
  transition: all 350ms ease;
  display: block;
}

.nav-logo:hover .logo-mark img {
  filter: drop-shadow(0 0 20px rgba(232, 198, 104, 0.7));
  transform: rotate(8deg);
}

.nav-logo .logo-text {
  font-family: var(--serif-display, 'Fraunces'), serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.nav-logo .logo-gu { color: var(--white, #fff); }
.nav-logo .logo-dash {
  color: rgba(217, 208, 245, 0.35);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 1px;
  margin: 0 2px;
}
.nav-logo .logo-mac { color: var(--gold-bright, #e8c668); }

/* ═══ MENU CENTRAL ═══ */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans, 'Inter Tight'), sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(217, 208, 245, 0.72);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 22px 13px;
  white-space: nowrap;
  transition: color 250ms;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover { color: var(--white, #fff); }

.nav-item.active > .nav-link {
  color: var(--gold-bright, #e8c668);
}

.nav-item.active > .nav-link::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold, #c9a449), var(--gold-bright, #e8c668));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(232, 198, 104, 0.6);
}

.nav-arrow {
  font-size: 0.5rem;
  opacity: 0.5;
  transition: transform 250ms, opacity 250ms;
}

.nav-item.has-dropdown:hover .nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-item.has-dropdown:hover > .nav-link { color: var(--white, #fff); }

/* ═══ CTA NO MENU (Entrar/Prévia) ═══ */
.nav-link--cta {
  color: var(--gold-bright, #e8c668) !important;
  border: 1px solid rgba(232, 198, 104, 0.4);
  border-radius: 50px;
  padding: 8px 20px !important;
  margin-left: 8px;
  transition: all 250ms;
}

.nav-link--cta:hover {
  background: rgba(232, 198, 104, 0.15) !important;
  border-color: var(--gold-bright, #e8c668);
  color: var(--gold-bright, #e8c668) !important;
}

/* ═══ DROPDOWN ═══ */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms, transform 300ms, visibility 300ms;
  z-index: 100;
  min-width: 540px;
  padding-top: 0;
}

.dropdown--sm { min-width: 280px; }

.nav-item.has-dropdown:hover > .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-inner {
  background: rgba(17, 8, 38, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 198, 104, 0.15);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.dropdown--sm .dropdown-inner { padding: 18px 20px; }

.dropdown-col { min-width: 200px; }

.dropdown-heading {
  display: block;
  font-family: var(--mono, 'JetBrains Mono'), monospace;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-bright, #e8c668);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(232, 198, 104, 0.12);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans, 'Inter Tight'), sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(217, 208, 245, 0.78);
  padding: 9px 12px;
  border-radius: 8px;
  transition: all 200ms;
  text-decoration: none;
}

.dropdown-link i,
.dropdown-link .icon {
  width: 18px;
  font-size: 0.85rem;
  color: var(--gold, #c9a449);
  opacity: 0.85;
}

.dropdown-link:hover {
  color: var(--gold-bright, #e8c668);
  background: rgba(232, 198, 104, 0.08);
}

.dropdown-link:hover i,
.dropdown-link:hover .icon { opacity: 1; }

/* ═══ DROPDOWN FEATURED CARD ═══ */
.dropdown-featured {
  min-width: 220px;
  flex-shrink: 0;
}

.dropdown-featured-inner {
  background: linear-gradient(135deg, rgba(54, 32, 90, 0.6), rgba(29, 17, 56, 0.8));
  border: 1px solid rgba(232, 198, 104, 0.2);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dropdown-featured-tag {
  display: inline-block;
  font-family: var(--mono, 'JetBrains Mono'), monospace;
  font-size: 0.58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-bright, #e8c668);
  margin-bottom: 12px;
}

.dropdown-featured-text {
  font-family: var(--serif-display, 'Fraunces'), serif;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--lilas-mist, #d9d0f5);
  margin: 0;
}

/* ═══ HAMBURGUER ═══ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: rgba(232, 198, 104, 0.08);
  border: 1px solid rgba(232, 198, 104, 0.25);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 200ms;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--gold-bright, #e8c668);
  border-radius: 2px;
  transition: all 300ms;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══ MOBILE DRAWER ═══ */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 340px;
  max-width: 88vw;
  height: 100vh;
  background: linear-gradient(180deg, #110826 0%, #1d1138 100%);
  border-left: 1px solid rgba(232, 198, 104, 0.18);
  z-index: 1100;
  transition: right 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.open { right: 0; }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 25, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  z-index: 1050;
  transition: all 300ms;
}

.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(232, 198, 104, 0.12);
  position: sticky;
  top: 0;
  background: rgba(17, 8, 38, 0.98);
  backdrop-filter: blur(20px);
  z-index: 2;
}

.drawer-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(232, 198, 104, 0.4));
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-brand .logo-text {
  font-family: var(--serif-display, 'Fraunces'), serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.drawer-close {
  width: 36px;
  height: 36px;
  background: rgba(232, 198, 104, 0.08);
  border: 1px solid rgba(232, 198, 104, 0.25);
  color: var(--gold-bright, #e8c668);
  font-size: 1.3rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.drawer-close:hover { background: rgba(232, 198, 104, 0.16); }

.drawer-body {
  padding: 18px;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  color: rgba(217, 208, 245, 0.85);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 200ms;
  margin-bottom: 2px;
}

.drawer-link:hover {
  background: rgba(232, 198, 104, 0.08);
  color: var(--gold-bright, #e8c668);
}

.drawer-group {
  border-bottom: 1px solid rgba(232, 198, 104, 0.08);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.drawer-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  color: var(--lilas-fog, #e9e3ff);
  font-family: var(--sans, 'Inter Tight'), sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 10px;
}

.drawer-group-toggle:hover { background: rgba(232, 198, 104, 0.05); }

.drawer-group-toggle i,
.drawer-group-toggle .chevron {
  font-size: 0.7rem;
  color: var(--gold, #c9a449);
  transition: transform 250ms;
}

.drawer-group.open .drawer-group-toggle i,
.drawer-group.open .drawer-group-toggle .chevron {
  transform: rotate(180deg);
}

.drawer-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
  padding-left: 12px;
}

.drawer-group.open .drawer-group-items { max-height: 500px; }

.drawer-group-items a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: rgba(217, 208, 245, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: all 200ms;
}

.drawer-group-items a:hover {
  background: rgba(232, 198, 104, 0.06);
  color: var(--gold-bright, #e8c668);
}

.drawer-group-items a i,
.drawer-group-items a .icon {
  width: 18px;
  font-size: 0.85rem;
  color: var(--gold, #c9a449);
  opacity: 0.85;
}

.drawer-divider {
  height: 1px;
  background: rgba(232, 198, 104, 0.12);
  margin: 14px 0;
}

.drawer-cta {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--gold, #c9a449) 0%, var(--gold-bright, #e8c668) 100%);
  color: var(--lilas-void, #0a0419);
  font-weight: 600;
  padding: 14px 18px;
  border-radius: 100px;
  text-decoration: none;
  margin-top: 12px;
  box-shadow: 0 0 20px rgba(232, 198, 104, 0.3);
}

/* ═══ USER LOGADO ═══ */
.nav-user-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(232, 198, 104, 0.06);
  border: 1px solid rgba(232, 198, 104, 0.2);
  border-radius: 100px;
  padding: 5px 14px 5px 5px;
  color: var(--lilas-fog, #e9e3ff);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
  transition: all 200ms;
}

.nav-user-button:hover {
  background: rgba(232, 198, 104, 0.14);
  border-color: rgba(232, 198, 104, 0.4);
}

.nav-user-pic {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user-pic-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold, #c9a449), var(--gold-bright, #e8c668));
  color: var(--lilas-void, #0a0419);
  font-weight: 700;
  font-size: 0.8rem;
}

.nav-user-arrow {
  font-size: 0.65rem;
  opacity: 0.7;
}

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: rgba(17, 8, 38, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(232, 198, 104, 0.18);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 250ms;
  z-index: 200;
}

.nav-user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-user-dropdown-header {
  padding: 8px 12px 12px;
  border-bottom: 1px solid rgba(232, 198, 104, 0.1);
  margin-bottom: 8px;
}

.nav-user-dropdown-header strong {
  display: block;
  color: var(--gold-bright, #e8c668);
  font-family: var(--serif-display, 'Fraunces'), serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 500;
}

.nav-user-dropdown-header small {
  display: block;
  color: rgba(217, 208, 245, 0.55);
  font-size: 0.72rem;
  margin-top: 2px;
}

.nav-user-dropdown a,
.nav-user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  color: rgba(217, 208, 245, 0.82);
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 200ms;
}

.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover {
  background: rgba(232, 198, 104, 0.08);
  color: var(--gold-bright, #e8c668);
}

#logoutBtn {
  border-top: 1px solid rgba(232, 198, 104, 0.1);
  margin-top: 6px;
  padding-top: 12px;
  color: rgba(244, 67, 54, 0.85);
}

#logoutBtn:hover {
  background: rgba(244, 67, 54, 0.08);
  color: #ff6b6b;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
  .nav-menu { display: none; }
  .nav-user-button { display: none; }
  .nav-toggle { display: flex; }
  .nav-container { padding: 0 20px; }
}

@media (max-width: 600px) {
  .nav-container { padding: 0 16px; height: 60px; }
  .nav-logo .logo-text { font-size: 0.78rem; }
  .nav-logo .logo-mark { width: 38px; height: 38px; }
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: rgba(17, 8, 38, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 198, 104, 0.3);
  color: var(--lilas-fog, #e9e3ff);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  z-index: 9999;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(244, 67, 54, 0.5); color: #ff6b6b; }
.toast.success { border-color: rgba(76, 175, 80, 0.5); color: #4caf50; }
