/* FLOATING PILL-SHAPED HEADER WITH CYAN/BLUE GLOW EFFECT */
.header {
  position: fixed;
  top: 72px; /* Positioned below the ticker-bar by default */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 100;
  background: rgba(11, 20, 38, 0.82);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 15px rgba(14, 165, 233, 0.12);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.scrolled {
  top: 20px; /* Smooth transition closer to the top when scrolled */
  background: rgba(11, 20, 38, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 25px rgba(14, 165, 233, 0.22);
  border-color: rgba(14, 165, 233, 0.4);
}

.navbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 78px;
  padding: 0 32px;
  gap: 24px;
  width: 100%;
}

/* CIRCULAR LOGO FRAME */
.brand {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%; /* Circle shape */
  background: transparent;
  overflow: hidden;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-blue);
}

.site-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 1rem;
  color: var(--text);
}

.brand-text small {
  color: var(--muted-text);
  font-size: 0.75rem;
}

/* MENU LAYOUTS */
.nav-menu {
  display: contents;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  margin-left: 20px;
  margin-right: 20px;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

/* VERTICALLY STACKED LINKS (ICON + LABEL) */
.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-family: var(--font-subheading);
  color: var(--muted-text);
  text-decoration: none;
  transition: color var(--transition-base);
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform var(--transition-base);
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
  transition: transform var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover .nav-icon {
  transform: translateY(-1px);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* CIRCULAR SEARCH BUTTON */
.search-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(15, 30, 53, 0.5);
  color: var(--muted-text);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-base);
}

.search-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.search-btn:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-blue);
  transform: scale(1.05);
}

/* WHATSAPP LINK STYLE */
.whatsapp-link {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.24);
  background: rgba(15, 30, 53, 0.5);
  color: var(--primary);
  transition: all var(--transition-base);
}

.whatsapp-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.whatsapp-link:hover {
  transform: scale(1.05);
  background: rgba(14, 165, 233, 0.16);
  box-shadow: var(--shadow-blue);
}

/* PILL-SHAPED JOIN NOW BUTTON WITH ARROW ICON */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px; /* Pill shape */
  font-family: var(--font-subheading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gradient-gold);
  color: #04101c;
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(245, 197, 24, 0.3);
  transition: all var(--transition-base);
}

.btn-gold .btn-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  transition: transform var(--transition-base);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 197, 24, 0.5);
}

.btn-gold:hover .btn-icon {
  transform: translateX(4px);
}

/* MOBILE TOGGLE BUTTON */
.nav-toggle {
  position: relative;
  z-index: 3;
  display: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(15, 30, 53, 0.6);
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* NARROW DESKTOP SPACING AND TAGLINE CONTRACTION TO PREVENT OVERLAP */
@media (max-width: 1200px) {
  .brand-text small {
    display: none !important; /* Hide tagline to free up major horizontal space */
  }
}

@media (max-width: 1100px) {
  .whatsapp-link {
    display: none !important; /* Hide whatsapp link to save space */
  }
}

@media (max-width: 1050px) {
  .navbar {
    padding: 0 16px;
    gap: 12px;
  }
  .nav-center {
    gap: 6px;
    margin-left: 8px;
    margin-right: 8px;
  }
  .nav-link {
    padding: 6px 6px;
  }
  .nav-label {
    font-size: 0.65rem;
  }
  .brand-text strong {
    font-size: 0.85rem;
  }
  .nav-actions {
    gap: 8px;
  }
}

@media (max-width: 1000px) {
  .search-btn {
    display: none !important; /* Hide search button on smaller desktop widths to prevent layout breaking */
  }
}

/* RESPONSIVE NAVBAR OVERRIDES */
@media (max-width: 900px) {
  .header {
    top: 60px;
    width: calc(100% - 24px);
  }
  .header.scrolled {
    top: 12px;
  }
  .navbar {
    min-height: 70px;
    padding: 0 20px;
  }
  .brand-text small {
    display: none; /* Hide subtitle on small mobile screens to keep it clean */
  }
  .nav-toggle {
    display: block;
  }
  .nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(11, 20, 38, 0.98);
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(14, 165, 233, 0.2);
    transform: scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-open .nav-menu {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }
  .nav-center {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
  }
  .nav-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
    width: 100%;
  }
  .nav-actions .whatsapp-link,
  .nav-actions .search-btn {
    display: inline-grid !important;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .nav-actions .btn-gold {
    flex-grow: 1;
    padding: 10px 16px;
    font-size: 0.8rem;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .nav-center {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on very small mobile devices */
    gap: 12px;
  }
}
