/*=========================== Top Header ==========================================================*/
.top-header-bar {
  background-color: #1e293b;
  color: #f1f5f9;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-contact-left {
  display: flex;
  gap: 1.5rem;
}

.top-contact-left a {
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.top-contact-left a:hover {
  color: #fff;
}

.top-contact-right .whatsapp-link {
  color: #10b981;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.top-contact-right .whatsapp-link:hover {
  color: #34d399;
}

/* Hide top bar on mobile — keeps navbar clean */
@media (max-width: 768px) {
  .top-header-bar {
    display: none !important;
  }
}

/*=========================== Main Navbar Structure ==========================================================*/
.navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.dashboard-navbar {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.main-nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}

/*=========================== Logo ==========================================================*/
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  /* Slightly narrower so center links have more breathing room */
  width: 200px;
  flex-shrink: 0;
}

.navbar-logo-img {
  height: 3.5rem;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  transition: transform 0.2s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/*=========================== Links ==========================================================*/
.nav-links {
  display: flex;
  align-items: center;
}

.center-links {
  /* Allow the center block to shrink/grow and use a smaller gap
     so all 8 items (Home, Subjects, Resources, How It Works,
     Features, Pricing, FAQ's, Contact Us) fit comfortably */
  flex: 1;
  justify-content: center;
  gap: 0.1rem;          /* tight gap — individual items have their own padding */
  flex-wrap: nowrap;
  overflow: visible;
}

.right-actions {
  gap: 1rem;
  /* Mirror the logo width so the center block stays truly centred */
  width: 200px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nav-link-item {
  text-decoration: none;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.875rem;   /* slightly smaller so all items fit on one line */
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;   /* horizontal padding gives click area & spacing */
  border-radius: 0.375rem;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link-item:hover {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
}

.active-link {
  color: #0ea5e9;
}

.dropdown-container {
  display: flex;
  align-items: center;
}

/*=========================== Get Started Button ==========================================================*/
.btn-get-started {
  background: #0ea5e9;
  color: white;
  padding: 0.6rem 1.6rem;
  border-radius: 9999px;
  text-decoration: none;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.btn-get-started:hover {
  background: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(14, 165, 233, 0.4);
}

.nav-button-secondary {
  background: white;
  color: #7c3aed;
  border: 2px solid #ddd6fe;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.0625rem;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-button-secondary:hover {
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.15);
  border-color: #c084fc;
}

/*=========================== User/Stars =====================================================*/
.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fef3c7;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.user-info svg {
  width: 1rem;
  height: 1rem;
  fill: #facc15;
  stroke: #f59e0b;
}

/*=========================== Mobile Menu =====================================================*/
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 2px solid #e0e7ff;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}

.mobile-menu .nav-link-item {
  font-size: 1rem;
  padding: 0.625rem 0.875rem;
  color: #1e293b;
  border-radius: 0.5rem;
}

.mobile-menu .nav-link-item:hover {
  background: #f0f9ff;
  color: #0ea5e9;
}

.mobile-menu .active-link {
  color: #0ea5e9;
}

/* Separator before action buttons */
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.mobile-menu-actions .btn-get-started {
  text-align: center;
  padding: 0.75rem 1.5rem;
}

.mobile-menu-actions .nav-button-secondary {
  justify-content: center;
  padding: 0.75rem 1.5rem;
}

/*=========================== Responsive =====================================================*/
@media (max-width: 1024px) {
  .main-nav-container {
    padding: 0 1.5rem;
  }

  /* On tablet, shrink font further so all links still fit */
  .center-links .nav-link-item {
    font-size: 0.8rem;
    padding: 0.3rem 0.4rem;
  }
}

/* Mobile Menu Button — hidden on desktop, shown on mobile */
.mobile-nav-button {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  align-items: center;
  justify-content: center;
  color: #0ea5e9;
  border-radius: 0.5rem;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-button:hover {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.mobile-dashboard-link {
  display: none;
}

@media (max-width: 768px) {
  /* Hide ALL desktop-only items: both nav-links and nav-actions */
  .nav-links.desktop-only,
  .nav-actions.desktop-only {
    display: none !important;
  }

  /* Show mobile menu when toggled (JSX renders it conditionally) */
  .mobile-menu {
    display: flex;
  }

  /* Show hamburger button */
  .mobile-nav-button {
    display: flex;
    margin-left: auto;
  }

  /* Tighten nav container padding on small screens */
  .main-nav-container {
    padding: 0 1rem;
    height: 4rem;
  }

  /* Logo slightly smaller on mobile */
  .navbar-logo-img {
    height: 2.75rem;
  }

  /* Full-width mobile menu items */
  .mobile-menu .btn-get-started {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-dashboard-link {
    display: flex !important;
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 2px solid #ddd6fe;
    background: white;
    color: #7c3aed;
    font-weight: 700;
    text-decoration: none;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.15);
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    z-index: 1001;
  }

  .mobile-dashboard-link:hover {
    background: #fdfbff;
    border-color: #c084fc;
    transform: translateY(-1px);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-actions.desktop-only.right-actions {
    margin-right: 1rem;
  }
}

/*=========================== END Navbar =================================================*/