/* Active nav link underline indicator (modern bar style) */
#nav-links a.active {
  position: relative;
  color: #000;

}
/* Per-link pseudo underline removed to avoid duplicate with .nav-indicator */
/* Sliding single indicator (preferred for smooth transitions) */
.nav-indicator {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #ffc72c;
  border-radius: 0;
  transition: transform 280ms cubic-bezier(.2,.9,.2,1), width 280ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1001;
}
.nav-indicator.visible { opacity: 1 }
/* Header CTA button */
.header-btn {
  background: linear-gradient(to bottom, #ff0832 50%, #ff7324 100%);
  color: white;
  padding: clamp(0.5rem, 1vw, 0.8rem) clamp(0.8rem, 1.5vw, 1.5rem);
  font-size: clamp(0.75rem, 1.1vw, 1rem);
  border-radius: 40px;
  margin-left: clamp(0.3rem, 1vw, 1rem);
  min-width: clamp(90px, 12vw, 150px);
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  flex-shrink: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-btn:hover {
  transition: 0.2s ease;
  transform: scale(1.05);
}

.cta-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background-color: white;
  color: #ff0832;
  font-size: 1.5rem;
  border-radius: 50%;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta:hover {
  transform: scale(1.05);    /* subtle enlarge on hover */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#logo-img {
  width: clamp(40px, 5vw, 60px);
  height: auto;
  flex-shrink: 0;
  display: block;
  /* vertical-align removed because it is ignored for display:block; parent flex alignment controls vertical centering */
}


.logo-container {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.8vw, 0.5rem);
  flex: 0 0 auto;
  transition: transform 0.18s cubic-bezier(.4,2,.6,1), box-shadow 0.18s;
  min-width: 0;
  max-width: min(400px, 40%);
  overflow: visible;
}

.logo-container:hover {
  transform: scale(1.05);
}


header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 70px;
  height: auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.5rem, 1.5vw, 1rem) clamp(1rem, 3vw, 2rem);
  background: linear-gradient(to bottom, rgba(252,239,194,0.02) 0%, rgba(252,239,194,0.04) 30%, rgba(252,239,194,0.06) 100%);
  background-color: rgba(252,239,194,0.02);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  backdrop-filter: blur(12px) saturate(70%);
  border-bottom: none;
  border-radius: 0 0 32px 32px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.25s, background 0.25s, min-height 0.25s;
  overflow: visible;
  box-sizing: border-box;
  container-type: inline-size;
}

/* Decorative gradient overlay on top of frosted background */
header::before {
  content: '';
  position: absolute;
  inset: 0 0 0 0;
  pointer-events: none;
  /* subtle decorative gradient that sits above the translucent tint but below header content */
  background: linear-gradient(to bottom, transparent 0%, transparent 30%, #fcefc2 100%);
  border-radius: 0 0 32px 32px;
  z-index: 0;
}

/* Ensure header children (logo, nav, CTA) sit above the overlay */
header > * { position: relative; z-index: 1; }

.logo {
  font-weight: 530;
  font-size: clamp(15px, 1.8vw, 22px);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #000000;
  white-space: nowrap;
  overflow: visible;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

#navbar {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  overflow: visible;
}

#nav-links {
  display: flex;
  gap: clamp(8px, 2vw, 35px);
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  z-index: 1;
  flex-wrap: nowrap;
  position: relative;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

#nav-links li {
  position: relative;
}

#nav-links a {
  color: #333;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  font-weight: 500;
  text-decoration: none;
  padding: clamp(0.6rem, 0.8vw, 0.8rem) clamp(0.1rem, 0.3vw, 0.2rem) clamp(0.2rem, 0.5vw, 0.4rem);
  border-radius: 16px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  display: inline-block;
  white-space: nowrap;
  text-align: center;
  position: relative;
}

#nav-links a:hover,
#nav-links a:focus {
  color: #000000;
  transform: scale(1.08);
  outline: none;
}



.chat-header button {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.cta {
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

}

/* Burger button - hidden on desktop, shown on small screens */
.burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 1001;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}
.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.burger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Adaptive layout for tight spaces (high zoom/small screens) */
@media (max-width: 1300px) {
  header {
    flex-wrap: nowrap;
    min-height: 60px;
  }

  .logo-container {
    max-width: min(320px, 32%);
    overflow: visible;
  }

  #navbar {
    flex: 0 1 auto;
    min-width: 0;
  }

  #nav-links {
    gap: clamp(4px, 1vw, 12px);
    justify-content: space-between;
  }

  #nav-links a {
    font-size: clamp(0.65rem, 0.9vw, 0.75rem);
    padding: 0.1rem 0.3rem;
  }

  .header-btn {
    min-width: clamp(60px, 8vw, 100px);
    padding: clamp(0.3rem, 0.5vw, 0.5rem) clamp(0.5rem, 0.8vw, 0.8rem);
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    margin-left: clamp(0.2rem, 0.5vw, 0.5rem);
  }

  .logo {
    font-size: clamp(12px, 1.4vw, 16px);
  }

  #logo-img {
    width: clamp(25px, 3vw, 40px);
  }
}

/* Container-based responsive adjustments */
@container (max-width: 1400px) {
  #nav-links {
    gap: clamp(6px, 1.5vw, 20px);
  }

  #nav-links a {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    padding: 0.2rem 0.4rem;
  }

  .header-btn {
    min-width: clamp(70px, 10vw, 120px);
    padding: clamp(0.4rem, 0.6vw, 0.6rem) clamp(0.6rem, 1vw, 1rem);
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  }

  .logo {
    font-size: clamp(14px, 1.6vw, 20px);
  }

  .logo-container {
    max-width: min(350px, 38%);
  }

  #logo-img {
    width: clamp(30px, 3.5vw, 45px);
  }
}

/* Fallback media queries for browsers without container query support */
@media (max-width: 1400px) {
  #nav-links {
    gap: clamp(6px, 1.5vw, 20px);
  }

  #nav-links a {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    padding: 0.2rem 0.4rem;
  }

  .header-btn {
    min-width: clamp(70px, 10vw, 120px);
    padding: clamp(0.4rem, 0.6vw, 0.6rem) clamp(0.6rem, 1vw, 1rem);
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
  }

  .logo {
    font-size: clamp(14px, 1.6vw, 20px);
  }

  .logo-container {
    max-width: min(350px, 38%);
  }

  #logo-img {
    width: clamp(30px, 3.5vw, 45px);
  }
}

/* Mobile responsive styles - Activate earlier for better UX */
@media (max-width: 1250px) {
  header {
    min-height: 60px;
    height: auto;
    padding: 0.5rem 1rem;
    gap: 0.3rem;
  }

  .logo-container {
    max-width: calc(100% - 60px);
    overflow: visible;
  }

  .logo {
    white-space: nowrap;
    overflow: visible;
    font-size: clamp(14px, 4vw, 18px);
  }

  .burger {
    display: flex;
  }

  #navbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    padding-top: 65px;
    background: rgba(252, 239, 194, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 999;
  }

  #navbar.open {
    transform: translateX(0);
  }

  #navbar #nav-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 2rem 0;
    background: transparent;
  }

  #nav-links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  #nav-links a {
    display: block;
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
  }

  .nav-indicator {
    display: none;
  }

  .header-btn {
    display: none;
  }

  /* Mobile Enroll button inside menu */
  #nav-links .mobile-enroll-btn {
    display: block;
    width: calc(100% - 3rem);
    margin: 1.5rem auto;
    padding: 1rem 2rem;
    background: linear-gradient(to bottom, #ff0832 50%, #ff7324 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: bold;
    text-align: center;
    border-radius: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  #nav-links .mobile-enroll-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .logo {
    font-size: 16px;
  }

  #logo-img {
    width: 38px;
  }
}

@media (max-width: 768px) {
  header {
    height: 60px;
    padding: 0.5rem 0.75rem;
  }

  #navbar {
    padding-top: 60px;
  }

  .logo {
    font-size: 14px;
  }

  #logo-img {
    width: 35px;
  }
}

/* Reduce header size by 40% for large laptop screens */
@media (max-width: 1500px) {
  /* Scale header visuals down while keeping layout alignment */
  header {
    /* Expand declared width so scaled header fills viewport */
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  }

  /* Ensure fixed-position children remain above the scaled header */
  header > * { z-index: 2; }

  /* Slightly reduce logo size to match visual scale on browsers that don't apply transform precisely */
  #logo-img { width: calc(clamp(40px, 5vw, 60px) * 0.6); }

  /* Reduce CTA sizing to match scaled header (fallback for non-transform environments) */
  .header-btn {
    font-size: 10pt;
  }
  /* Reduce nav link density to fit scaled header */
  #nav-links a {
    font-size: 10pt;
  }
}



