/* ==========================================================================
   STICKY HEADER — Pragati Academy
   Only applies when .sticky-wrapper has .sticky (after scroll).
   Non-sticky (red bar) lives in style.css — untouched.

   Technique: .row → display:contents kills Bootstrap's row/col system.
   .container-fluid becomes the real flex container.
   This avoids the !important from Bootstrap's justify-content-between
   class on .row that was preventing centering.
   ========================================================================== */


/* --- 1. Bar appearance -------------------------------------------------- */

.header-layout1 .sticky-wrapper.sticky .menu-area {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  padding: 0;
  transition: background 0.3s, box-shadow 0.3s;
}


/* --- 2. Container = flex parent; Row = invisible ------------------------ */

.header-layout1 .sticky-wrapper.sticky .menu-area .container-fluid {
  display: flex !important;
  align-items: center;
  padding: 6px 24px;
}

.header-layout1 .sticky-wrapper.sticky .menu-area .row {
  display: contents !important;
}

.header-layout1 .sticky-wrapper.sticky .menu-area .col-auto {
  padding: 0 !important;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto;
}


/* --- 3. LOGO — left ----------------------------------------------------- */

.header-layout1 .sticky-wrapper.sticky .header-logo {
  display: block !important;
}

.header-layout1 .sticky-wrapper.sticky .header-logo img.header-brand-logo,
.header-layout1 .sticky-wrapper.sticky .header-logo img {
  height: 68px;
  max-height: 68px;
  width: auto;
  display: block;
}


/* --- 4. NAV — center ---------------------------------------------------- */

.header-layout1 .sticky-wrapper.sticky .menu-area .row > .col-auto:nth-child(2) {
  flex: 1 1 0% !important;
  display: flex !important;
  justify-content: center;
  min-width: 0;
}

.header-layout1 .sticky-wrapper.sticky .main-menu {
  padding-left: 0 !important;
}

.header-layout1 .sticky-wrapper.sticky .main-menu > ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li {
  flex: 0 0 auto;
  position: relative;
  margin: 0;
}

/* Academics mega menu needs static positioning even in sticky state */
.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li.menu-item-academics-mega {
  position: static !important;
}

.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a {
  display: block;
  padding: 22px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--title-color);
  white-space: nowrap;
  transition: color 0.25s;
}

.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a:hover {
  color: var(--theme-color);
}

.header-layout1 .sticky-wrapper.sticky
  .main-menu > ul > li.menu-item-has-children > a::after {
  color: var(--title-color);
}


/* --- 5. BUTTON — right -------------------------------------------------- */

@media (min-width: 1200px) {
  .header-layout1 .sticky-wrapper.sticky .menu-area .row > .col-auto:last-child {
    display: flex !important;
    align-items: center;
  }
}

.header-layout1 .sticky-wrapper.sticky .menu-area .global-btn {
  padding: 12px 24px;
  font-size: 14px;
  white-space: nowrap;
}


/* --- 6. Responsive: 1200–1399 px ---------------------------------------- */

@media (max-width: 1399px) and (min-width: 1200px) {
  .header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a {
    padding: 20px 10px;
    font-size: 14px;
  }

  .header-layout1 .sticky-wrapper.sticky .header-logo img.header-brand-logo,
  .header-layout1 .sticky-wrapper.sticky .header-logo img {
    height: 62px;
    max-height: 62px;
  }

  .header-layout1 .sticky-wrapper.sticky .menu-area .global-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}


/* --- 7. Responsive: 1200–1299 px (small laptop) ------------------------- */

@media (max-width: 1299px) and (min-width: 1200px) {
  .header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a {
    padding: 18px 7px;
    font-size: 13px;
  }

  .header-layout1 .sticky-wrapper.sticky .header-logo img.header-brand-logo,
  .header-layout1 .sticky-wrapper.sticky .header-logo img {
    height: 56px;
    max-height: 56px;
  }

  .header-layout1 .sticky-wrapper.sticky .menu-area .global-btn {
    padding: 9px 16px;
    font-size: 13px;
  }
}


/* --- 8. Responsive: 992–1199 px (tablet, no button, nav visible) -------- */

@media (max-width: 1199px) and (min-width: 992px) {
  .header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a {
    padding: 18px 8px;
    font-size: 13px;
  }

  .header-layout1 .sticky-wrapper.sticky .header-logo img.header-brand-logo,
  .header-layout1 .sticky-wrapper.sticky .header-logo img {
    height: 56px;
    max-height: 56px;
  }
}


/* --- 9. Responsive: < 992 px (mobile — hamburger replaces nav) ---------- */

@media (max-width: 991px) {
  .header-layout1 .sticky-wrapper.sticky .menu-area .container-fluid {
    padding: 8px 16px;
  }

  .header-layout1 .sticky-wrapper.sticky .menu-area .row > .col-auto:nth-child(2) {
    justify-content: flex-end;
  }

  .header-layout1 .sticky-wrapper.sticky .header-logo img.header-brand-logo,
  .header-layout1 .sticky-wrapper.sticky .header-logo img {
    height: 54px;
    max-height: 54px;
  }
}


/* --- 10. Active state + bottom-bar indicator (sticky) ------------------- */

/* Active item color — matches hover red */
.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li.active > a {
  color: var(--theme-color) !important;
}

/* Bottom-bar indicator base (sticky, white background) */
.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--theme-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Slide in on hover AND on active item */
.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a:hover::before,
.header-layout1 .sticky-wrapper.sticky .main-menu > ul > li.active > a::before {
  transform: scaleX(1);
}

/* Responsive adjustments for smaller sticky nav */
@media (max-width: 1299px) and (min-width: 1200px) {
  .header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a::before {
    left: 7px;
    right: 7px;
  }
}

@media (max-width: 1199px) and (min-width: 992px) {
  .header-layout1 .sticky-wrapper.sticky .main-menu > ul > li > a::before {
    left: 8px;
    right: 8px;
  }
}
