/* ==========================================
   Announcement Top Bar (Original)
   ========================================== 
.top-bar {
  width: 100%;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 101;
  max-height: 40px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

html.dark-mode .top-bar,
body.dark-mode .top-bar {
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-bar.dismissed {
  max-height: 0;
  opacity: 0;
  border-bottom: none;
}

.top-bar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px var(--side-gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: clamp(10px, 1.1vw, 12.5px);
  max-width: 85%;
}

.top-bar-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 5px;
  border-radius: 4px;
}

.top-bar-text {
  color: var(--text-muted);
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-action {
  color: var(--text-main);
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.top-bar-arrow {
  width: 12px;
  height: 12px;
}

.top-bar-close {
  position: absolute;
  right: var(--side-gutter);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-bar-close svg {
  width: 12px;
  height: 12px;
} */

/* ==============================================================================
   HEADER NAVBAR & RESPONSIVE DRAWER SYSTEM
   ============================================================================== */
.header-wrapper {
  width: 100%;
  max-width: 1160px;
  padding: clamp(12px, 2.5vw, 24px) clamp(14px, 3vw, 24px) 0;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 100;
  box-sizing: border-box;
}

.navbar {
  background-color: var(--nav-bg);
  border-radius: var(--radius-xl);
  height: clamp(58px, 6vw, 74px);
  padding: 0 clamp(10px, 1.8vw, 18px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Left: Desktop Links & Exact Staggered Hamburger Box --- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
}

.desktop-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-body);
  color: var(--nav-text);
  font-size: clamp(0.8125rem, 1vw, 0.875rem);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
}

.nav-link.active {
  background-color: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 600;
  padding: 8px 16px;
}

/* Hamburger White Squircle Button */
.nav-hamburger-box {
  display: none; /* Shown on <= 1024px */
  background-color: #ffffff;
  color: #1f2328;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: none;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-hamburger-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.nav-hamburger-box:active {
  transform: scale(0.95);
}

.hamburger-icon-staggered {
  width: 22px;
  height: 22px;
  display: block;
}

/* --- Center: Logo --- */
.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-link {
  display: flex;
  align-items: center;
}

.header-logo-img {
  width: clamp(38px, 4.5vw, 48px);
  height: clamp(38px, 4.5vw, 48px);
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.header-logo-img:hover {
  transform: scale(1.05);
}

/* --- Right: Dropdown, Theme Toggle & CTA --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.2vw, 12px);
  justify-self: end;
}

/* Desktop Dropdown */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  color: var(--nav-text);
  font-family: var(--font-body);
  font-size: clamp(0.8125rem, 1vw, 0.875rem);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.dropdown-arrow-svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

.nav-dropdown-wrapper.open .dropdown-arrow-svg {
  transform: rotate(180deg);
}

.nav-dropdown-btn:hover,
.nav-dropdown-wrapper.open .nav-dropdown-btn {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
}

.desktop-dropdown-menu {
  position: absolute;
  top: calc(100% + 20px);
  right: 0;
  width: 190px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--shadow-md);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 110;
}

.nav-dropdown-wrapper.open .desktop-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item-link {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--lime-600);
}

[data-theme="dark"] .dropdown-item-link:hover {
  color: var(--lime-500);
}

/* --- Premium Vector Theme Toggle (44px Squircle) --- */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  transition: all var(--transition-fast);
  overflow: hidden;
  box-sizing: border-box;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.theme-icon-stage {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn.animating .theme-icon-stage {
  transform: rotate(360deg) scale(1.18);
}

.theme-svg {
  position: absolute;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Light Theme: Show Moon */
html[data-theme="light"] .theme-svg-moon,
:root:not([data-theme="dark"]) .theme-svg-moon {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="light"] .theme-svg-sun,
:root:not([data-theme="dark"]) .theme-svg-sun {
  opacity: 0;
  transform: scale(0.3) rotate(-90deg);
  pointer-events: none;
}

/* Dark Theme: Show Sun */
html[data-theme="dark"] .theme-svg-sun {
  opacity: 1;
  transform: scale(1);
  color: var(--lime-500, #a8ff1a);
}

html[data-theme="dark"] .theme-svg-moon {
  opacity: 0;
  transform: scale(0.3) rotate(90deg);
  pointer-events: none;
}

/* Lime Nav CTA */
.btn-lime-nav {
  background-color: var(--lime-500);
  color: #000000;
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 1vw, 0.875rem);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn-lime-nav:hover {
  background-color: var(--lime-400);
  transform: translateY(-1px);
}

/* ==============================================================================
   DRAWER & BACKDROP (HIGH STACKING CONTEXT & GUARANTEED DISPLAY)
   ============================================================================== */
.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 84vw);
  height: 100vh;
  background-color: var(--card-bg, #ffffff);
  border-right: 1px solid var(--border-default, #e5e7eb);
  box-shadow: 12px 0 35px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  transform: translate3d(-100%, 0, 0);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  transform: translate3d(0, 0, 0) !important;
}

.mobile-drawer-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default, #e5e7eb);
  flex-shrink: 0;
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full, 9999px);
}

.drawer-brand-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #000000);
}

.mobile-drawer-close-btn {
  background: var(--bg-tertiary, #f1f3f5);
  border: 1px solid var(--border-default, #e5e7eb);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--text-primary, #000000);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-drawer-close-btn svg {
  width: 16px;
  height: 16px;
}

.mobile-drawer-close-btn:hover {
  background: var(--border-default, #e5e7eb);
}

.mobile-drawer-content {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #000000);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mobile-nav-link svg {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary, #8c939d);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background-color: var(--bg-tertiary, #f1f3f5);
}

.mobile-nav-link.active {
  font-weight: 700;
  color: #16a34a;
}

[data-theme="dark"] .mobile-nav-link.active {
  color: var(--lime-500, #a8ff1a);
}

/* Mobile Accordion */
.mobile-accordion-group {
  margin-top: 4px;
}

.mobile-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: transparent;
  border: none;
  font-family: var(--font-body, sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary, #000000);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-accordion-chevron {
  width: 15px;
  height: 15px;
  color: var(--text-tertiary, #8c939d);
  transition: transform 0.25s ease;
}

.mobile-accordion-group.active .mobile-accordion-chevron {
  transform: rotate(180deg);
}

.mobile-accordion-panel {
  max-height: 0;
  overflow: hidden;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-accordion-group.active .mobile-accordion-panel {
  max-height: 200px;
}

.mobile-sub-link {
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.85rem;
  color: var(--text-secondary, #5f6368);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mobile-sub-link:hover {
  color: var(--text-primary, #000000);
}

.mobile-drawer-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default, #e5e7eb);
}

.btn-lime-drawer {
  width: 100%;
  background-color: var(--lime-500, #a8ff1a);
  color: #000000;
  font-family: var(--font-body, sans-serif);
  font-size: 0.925rem;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--lime-glow, rgba(168, 255, 26, 0.25));
  text-decoration: none;
  box-sizing: border-box;
}

.btn-lime-drawer svg {
  width: 15px;
  height: 15px;
}

/* MOBILE (<= 600px) */
@media (max-width: 600px) {
    /* Header adjustments */
  .desktop-nav-links,
  .nav-dropdown-wrapper,
  .header-cta-desktop {
    display: none;
  }

  .nav-hamburger-box {
    display: inline-flex;
  }

  .navbar {
    padding: 0 10px;
  }
}

/* TABLET (601px to 1024px) */
@media (max-width: 1024px) and (min-width: 601px) {
    /* Navbar Header */
  .desktop-nav-links,
  .nav-dropdown-wrapper {
    display: none;
  }

  .nav-hamburger-box {
    display: inline-flex;
  }
}