/* ================= RESET & BASE ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ================= ASTRO VARIABLES ================= */
:root {
  --astro-bg: linear-gradient(90deg, #0b0e17, #11162a);
  --astro-panel: #11162a;
  --astro-gold: #d4af37;
  --astro-gold-soft: rgba(212,175,55,.25);
  --astro-text: #f2f2f2;
  --astro-muted: #cfcfcf;
}

/* ================= HEADER ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--astro-bg);
  border-bottom: 1px solid rgba(212,175,55,.25);
  backdrop-filter: blur(8px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--astro-gold), transparent);
}

.header-wrap {
  max-width: 1300px;
  margin: auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ================= LOGO ================= */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(212,175,55,.45));
}

.logo span {
  font-size: 18px;
  font-weight: 800;
  color: var(--astro-gold);
  letter-spacing: .4px;
}

/* ================= NAV ================= */
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a,
.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 17px; /* ⬅ increased from 14px */
  font-weight: 600;
  color: var(--astro-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

/* Chakra underline hover */
.nav a::after,
.dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--astro-gold), transparent);
  transform: translateX(-50%);
  transition: width .3s ease;
}

.nav a:hover::after,
.dropdown:hover .dropdown-toggle::after {
  width: 120%;
}

/* ================= ACCESSIBILITY ================= */
.nav a:focus-visible,
.dropdown-toggle:focus-visible,
.burger:focus-visible {
  outline: 3px solid var(--astro-gold-soft);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ================= DROPDOWN ================= */
.dropdown {
  position: relative;
  padding: 10px 0;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--astro-panel);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  border: 1px solid rgba(212,175,55,.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  z-index: 10000;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(120deg, transparent, rgba(212,175,55,.35), transparent);
  opacity: .6;
  pointer-events: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.arrow {
  font-size: 10px;
  color: var(--astro-gold);
  transition: transform .3s ease;
}

.dropdown:hover .arrow {
  transform: rotate(180deg);
}

/* ================= GRID ================= */
.dropdown-grid {
  display: grid;
  gap: 10px;
}

.states-grid {
  grid-template-columns: repeat(5, 1fr);
  width: 760px;
}

.pooja-list {
  grid-template-columns: 1fr;
  width: 260px;
}

.dropdown-grid a {
  font-size: 14px;
  font-weight: 500;
  color: var(--astro-muted);
  padding: 10px 14px;
  border-radius: 8px;
  transition: all .25s ease;
  white-space: nowrap;
}

.dropdown-grid a:hover {
  background: rgba(212,175,55,.12);
  color: var(--astro-gold);
  padding-left: 18px;
}

/* ================= BURGER ================= */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--astro-gold);
  border-radius: 2px;
  transition: .3s;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px,5px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px,-5px);
}

/* ================= MOBILE ================= */
@media (max-width: 950px) {
  .burger { display: flex; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--astro-panel);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 26px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 40px rgba(0,0,0,.6);
  }

  .nav.active {
    transform: translateX(0);
  }

  .dropdown-menu {
    position: static;
    transform: none;
    width: 100% !important;
    box-shadow: none;
    border: none;
    padding: 10px 0;
    display: none;
    background: transparent;
  }

  .dropdown-menu.active {
    display: block;
  }

  .states-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= REDUCED MOTION ================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ================= UPPER HEADER ================= */
.top-header {
  background: #111;
  color: #fff;
  font-size: 17px;
}

.top-header-wrap {
  max-width: 1200px;
  margin: auto;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.top-header a {
  color: #f4c430;
  text-decoration: none;
  font-weight: 600;
}

.top-header a:hover {
  text-decoration: underline;
}

.top-header .sep {
  margin: 0 8px;
  opacity: .6;
}

@media (max-width: 768px) {
  .top-header-wrap {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}

/* ================= FINAL MOBILE BURGER FIX ================= */
@media (max-width: 950px) {

  .site-header {
    position: sticky !important;
    top: 0;
  }

  .nav {
    position: absolute !important;
    top: 100%;
    right: 0;
    height: calc(100vh - 70px);
    transform: translateX(100%);
  }

  .nav.active {
    transform: translateX(0);
  }

  .dropdown-menu .states-grid {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px;
  }

  .dropdown-menu .states-grid::-webkit-scrollbar {
    width: 6px;
  }

  .dropdown-menu .states-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
    border-radius: 10px;
  }

  .dropdown-menu .states-grid::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,.6);
    border-radius: 10px;
  }

  .dropdown-menu .states-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(212,175,55,.9);
  }
}
