/* ═══════════════════════════════════════════════════════════════════
   HILLYGO — Premium Navbar Styles
   Architecture: Pill floating navbar · Glassmorphism · Mega Menu
   Token System matched to hillyGo.css design language
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Tokens ────────────────────────────────────────────────────── */
:root {
  --hg-nav-height: 80px;
  --hg-nav-radius: 0px;
  --promo-bar-height: 0px;
  --hg-nav-top: var(--promo-bar-height);
  --hg-nav-bg: rgba(255, 255, 255, 0.92);
  --hg-nav-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  --hg-nav-shadow-scrolled: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  --hg-nav-border: 1px solid rgba(0, 0, 0, 0.08);
  --hg-nav-blur: blur(20px);

  --hg-link-color: #111111;
  --hg-link-hover: #8CB42E;
  --hg-link-size: 12.5px;
  --hg-link-weight: 500;
  --hg-link-tracking: 0.2px;

  --hg-accent: #8CB42E;
  --hg-primary: #111111;
  --hg-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --hg-duration: 0.22s;
}

/* ── Base Navbar ─────────────────────────────────────────────────── */
.hg-navbar,
#hillygo-nav {
  position: fixed;
  top: var(--hg-nav-top);
  left: 0;
  width: 100%;
  /* No height here — let the inner content define it */
  background: var(--hg-nav-bg);
  backdrop-filter: var(--hg-nav-blur);
  -webkit-backdrop-filter: var(--hg-nav-blur);
  border-bottom: var(--hg-nav-border);
  box-shadow: var(--hg-nav-shadow);
  z-index: 2000;
  transition:
    box-shadow var(--hg-duration) var(--hg-ease),
    background var(--hg-duration) var(--hg-ease),
    border-color var(--hg-duration) var(--hg-ease);
  overflow: visible;
}

/* Scrolled state */
.hg-navbar.hg-scrolled,
#hillygo-nav.hg-scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(0,0,0,0.08);
  box-shadow: var(--hg-nav-shadow-scrolled);
}

/* ── Inner Layout ────────────────────────────────────────────────── */
.hg-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Left / Right columns */
.hg-nav-left {
  display: flex;
  align-items: center;
  flex: 1;
}

.hg-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex: 1;
}



.hg-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity var(--hg-duration);
}

.hg-logo:hover { opacity: 0.85; }

.hg-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* ── Back Button ─────────────────────────────────────────────────── */
.hg-back-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0,0,0,0.06);
  color: var(--hg-primary, #263A46);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hg-back-btn:active {
  transform: scale(0.92);
}

.hg-back-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--hg-accent, #8CB42E);
}

/* ── Nav Links ───────────────────────────────────────────────────── */
.hg-personal-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 12px;
}

.hg-icon-link {
  color: #4a4a4a;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
}

.hg-icon-link:hover {
  transform: scale(1.1);
  color: var(--hg-accent);
  background: rgba(140, 180, 46, 0.08);
}

.hg-icon-link.active {
  color: var(--hg-accent);
  background: rgba(140, 180, 46, 0.1);
}

.hg-icon-link.hg-heart-icon:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.hg-icon-link.hg-heart-icon.active {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.hg-nav-link {
  font-family: 'Inter', sans-serif;
  font-size: var(--hg-link-size);
  font-weight: var(--hg-link-weight);
  letter-spacing: var(--hg-link-tracking);
  color: var(--hg-link-color);
  text-decoration: none;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition:
    color var(--hg-duration) var(--hg-ease),
    background var(--hg-duration) var(--hg-ease);
  white-space: nowrap;
  user-select: none;
  position: relative;
}

.hg-nav-link:hover {
  color: var(--hg-link-hover);
  background: rgba(140, 180, 46, 0.06);
}

/* Active page */
.hg-nav-link.hg-nav-active {
  color: var(--hg-accent);
  font-weight: 500;
}

/* Generic Dropdown Chevron Animation */
.hg-chevron {
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.hg-explore-active .hg-chevron,
.hg-lang-active .hg-chevron,
.hg-user-active .hg-chevron {
  transform: rotate(180deg);
  color: var(--hg-accent);
}

/* chevron icon in link */
.hg-chevron {
  flex-shrink: 0;
  transition: transform var(--hg-duration) var(--hg-ease);
}

.hg-explore-trigger:hover .hg-chevron,
.hg-explore-active .hg-chevron {
  transform: rotate(180deg);
  color: var(--hg-accent);
}

.hg-explore-trigger.hg-explore-active {
  color: var(--hg-accent);
  background: rgba(140, 180, 46, 0.08);
}

/* ── Language Button ─────────────────────────────────────────────── */
.hg-lang-btn {
  background: none;
  border: 1.5px solid rgba(27, 43, 48, 0.16);
  border-radius: 50px;
  color: var(--hg-link-color);
  font-family: 'Inter', sans-serif;
  font-size: var(--hg-link-size);
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 0.36rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition:
    border-color var(--hg-duration),
    color var(--hg-duration),
    background var(--hg-duration);
  white-space: nowrap;
  margin-left: 4px;
}

.hg-lang-btn:hover {
  border-color: var(--hg-accent);
  color: var(--hg-accent);
  background: rgba(140, 180, 46, 0.06);
}

.hg-lang-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ── Sign In Button ──────────────────────────────────────────────── */
.hg-signin-btn {
  background: var(--hg-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 6px;
  transition:
    background var(--hg-duration),
    transform var(--hg-duration),
    box-shadow var(--hg-duration);
}

.hg-signin-btn:hover {
  background: var(--hg-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(140, 180, 46, 0.4);
}

/* ── Hamburger (mobile only) ─────────────────────────────────────── */
.hg-mobile-controls {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.hg-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background var(--hg-duration);
}

.hg-hamburger:hover { background: rgba(0,0,0,0.06); }

.hg-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--hg-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--hg-ease), opacity 0.3s;
}

/* ── Lang dropdown ─── */
.hg-lang-wrapper {
  position: relative;
}

@keyframes hg-dropdown-fade {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hg-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  min-width: 160px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px;
  z-index: 5000;
  overflow: hidden;
  animation: hg-dropdown-fade 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: top center;
}

.hg-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background var(--hg-duration);
}

.hg-lang-option:hover {
  background: rgba(140, 180, 46, 0.07);
}

.hg-lang-option.active {
  background: rgba(140, 180, 46, 0.1);
}

.hg-lang-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.hg-lang-code {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--hg-accent);
}

/* ── Mega Menu ───────────────────────────────────────────────────── */
.hg-mega-menu {
  position: absolute;
  top: calc(var(--hg-nav-height) + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.98);
  width: min(900px, 96vw);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out,
    visibility 0.3s;
  z-index: 100;
  pointer-events: none;
}

.hg-mega-menu.hg-mega-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: all;
}

.hg-mega-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 2rem 3rem;
  gap: 2rem;
}

.hg-mega-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  padding-right: 2rem;
}

.hg-mega-col:last-child,
.hg-mega-col-last {
  border-right: none;
  padding-right: 0;
}

.hg-mega-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--hg-accent);
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f0f0f0;
}

.hg-mega-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0.75rem 0.6rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--hg-duration);
  margin-bottom: 2px;
}

.hg-mega-icon-plate {
  width: 32px;
  height: 32px;
  background: rgba(140, 180, 46, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--hg-duration);
}

.hg-mega-icon-plate i {
  font-size: 12px;
  color: var(--hg-accent);
  transition: color var(--hg-duration);
}

.hg-mega-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hg-mega-title {
  font-size: 14px;
  font-weight: 500;
  color: #111111;
}

.hg-mega-desc {
  font-size: 11px;
  color: #888;
}

.hg-mega-link:hover {
  background: rgba(140, 180, 46, 0.04);
  transform: translateY(-2px);
}

.hg-mega-link:hover .hg-mega-icon-plate {
  background: var(--hg-accent);
}

.hg-mega-link:hover .hg-mega-icon-plate i {
  color: #fff;
}

.hg-mega-link.active {
  background: rgba(140, 180, 46, 0.05);
}

.hg-mega-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background-color: var(--hg-accent);
  border-radius: 2px;
}

/* CTA Card in mega menu */
.hg-mega-cta-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(140, 180, 46, 0.08), rgba(140, 180, 46, 0.03));
  border: 1.5px solid rgba(140, 180, 46, 0.2);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s var(--hg-ease);
}

.hg-mega-cta-card:hover {
  background: linear-gradient(135deg, rgba(140, 180, 46, 0.14), rgba(140, 180, 46, 0.06));
  border-color: var(--hg-accent);
  transform: translateY(-2px);
}

.hg-mega-cta-icon {
  width: 42px;
  height: 42px;
  background: var(--hg-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hg-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.hg-mega-cta-card strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--hg-primary);
  margin-bottom: 2px;
}

.hg-mega-cta-card span {
  font-size: 11px;
  color: #888;
}

/* ── Mobile Overlay ──────────────────────────────────────────────── */
.hg-mobile-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 3000;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hg-mobile-overlay.active {
  transform: translateX(0);
}

.hg-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid #f0f0f0;
}

.hg-mobile-close {
  background: #f5f5f5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

.hg-mobile-close:hover { background: #eee; }

.hg-mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.6rem;
  flex: 1;
}

.hg-mobile-link {
  display: block;
  padding: 1rem 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--hg-primary);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  letter-spacing: -0.01em;
  transition: color 0.2s, padding-left 0.2s;
}

.hg-mobile-link:hover {
  color: var(--hg-accent);
  padding-left: 8px;
}

.hg-mobile-footer {
  padding: 1.5rem 1.6rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid #f0f0f0;
}

.hg-mobile-signin {
  width: 100%;
  padding: 1rem;
  background: var(--hg-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hg-mobile-signin:hover {
  background: var(--hg-accent);
  transform: translateY(-1px);
}

.hg-mobile-host-btn {
  display: block;
  text-align: center;
  padding: 0.9rem;
  border: 2px solid var(--hg-accent);
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--hg-accent);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.hg-mobile-host-btn:hover {
  background: var(--hg-accent);
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hg-nav-right {
    display: none !important;
  }

  .hg-mobile-controls {
    display: flex !important;
  }
  
  .hg-nav-inner {
    padding: 0 16px !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 72px !important;
  }

  .hg-nav-left {
    display: flex !important;
    flex: 1 !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .hg-navbar,
  #hillygo-nav {
    width: 100% !important;
    max-width: none !important;
    top: calc(var(--promo-bar-height, 0px)) !important;
  }
}

@media (max-width: 600px) {
  .hg-mega-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Promo Bar offset  ─────────────────────────────────────────────── */
/* The CSS var --promo-bar-height is set dynamically by PromoBar.jsx */
.hg-navbar,
#hillygo-nav {
  top: var(--hg-nav-top);
}

/* ── Auth State: Logged-in user section ─────────────────────────────── */
.hg-nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 6px;
}

.hg-nav-user-greeting {
  color: var(--hg-accent);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--hg-link-size);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  transition: opacity var(--hg-duration);
}

.hg-nav-user-greeting:hover {
  opacity: 0.8;
}

/* Outlined variant of the sign-in/logout button */
.hg-signin-btn.hg-signin-btn--outline {
  background: transparent;
  border: 1.5px solid var(--hg-accent);
  color: var(--hg-accent);
  margin-left: 0;
}

.hg-signin-btn.hg-signin-btn--outline:hover {
  background: var(--hg-accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(140, 180, 46, 0.4);
}

/* Right-aligned language dropdown (mobile variant) */
.hg-lang-dropdown--right {
  right: 0;
  left: auto;
}

/* Mega menu link with top margin */
.hg-mega-link--mt {
  margin-top: 1rem;
}

/* Mobile header logo */
.hg-mobile-header-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* ── Quick-access icon buttons (Favourites, Support) ── */
.hg-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--hg-link-color);
  font-size: 15px;
  text-decoration: none;
  transition: color var(--hg-duration), background var(--hg-duration);
  flex-shrink: 0;
  margin-left: 2px;
}
.hg-icon-btn:hover {
  color: var(--hg-accent);
}
.hg-icon-btn:hover {
  color: var(--hg-accent);
  background: rgba(140, 180, 46,0.08);
}

/* Right-side action cluster */
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Text+icon link buttons */
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #4a4a4a;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
  color: #111;
}
  color: #777;
  font-size: 16px;
}

  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 5px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
  margin-left: 8px;
}
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: #fafafa;
}
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e3f2fd; /* light blue */
  color: #1976d2; /* darker blue */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* Logged-in user */
  position: relative;
}

  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 5px;
  border-radius: 24px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: box-shadow 0.2s;
  margin-left: 8px;
}

.hg-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 10px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease-in-out;
}

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

.hg-dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.hg-dropdown-link:hover {
  background: rgba(140, 180, 46, 0.07);
  color: var(--hg-accent);
}

.hg-dropdown-link i {
  width: 16px;
  text-align: center;
  color: var(--hg-accent);
}

.hg-dropdown-link.logout-btn {
  border-top: 1px solid #eee;
  margin-top: 4px;
  padding-top: 14px;
}

.hg-dropdown-link.logout-btn:hover {
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
}

.hg-dropdown-link.logout-btn i {
  color: #ef4444;
}
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8CB42E; /* gold */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 13px;
}
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

/* Mobile: hide actions, show hamburger */
@media (max-width: 768px) {
  .hg-hamburger   { display: flex; }
}
@media (min-width: 769px) {
  .hg-hamburger { display: none; }
}




