/**
 * CSI Bain Kodungaiyur — header (dark bar + gold accent, unified sticky on all pages)
 */

/* Full header sticks as one block on every page */
#header.site-header-edu {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #1a1a1a;
}

/* Theme uses absolute nav on home — override so layout matches inner pages */
.site-header-edu .header-bottom {
  position: relative !important;
  left: auto !important;
  width: 100%;
  background-color: #ffc107;
  padding: 5px 20px;
}

/* --- Dark header shell — top bar collapses on scroll (see .header-top-collapsed) --- */
.site-header-edu .header-top {
  background-color: #fc9928;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
 
  max-height: 120px;
  opacity: 1;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease,
    padding 0.3s ease,
    border-width 0.3s ease;
  padding: 8px 20px;
}

#header.site-header-edu.header-top-collapsed .header-top {
  max-height: 0;
  opacity: 0;

  border-bottom-width: 0;
  pointer-events: none;
  padding: 0 20px; 
}

@media (prefers-reduced-motion: reduce) {
  .site-header-edu .header-top {
    transition: none;
  }
}

.site-header-edu .ht-address ul li {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 16px;
}

.site-header-edu .ht-address ul li a { 
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  color: rgba(255, 255, 255, 0.92) !important;
}

.site-header-edu .ht-social ul li a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

.site-header-edu .ht-social ul li a:hover {
  color: #f39c12;
}

/* Top bar list — desktop: single horizontal row */
.site-header-edu .ht-top-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.site-header-edu .ht-top-list .ht-item {
  display: inline-flex;
  align-items: center;
  margin-right: 17px;
}

.site-header-edu .ht-top-list .ht-social-item {
  margin-left: auto;
  margin-right: 0;
}

.site-header-edu .ht-social ul {
  margin: 0;
  padding: 0;
}

.site-header-edu .header-bottom-inner {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Scrolled: subtle depth (same header chrome, all pages) */
#header.site-header-edu.header-is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#header.site-header-edu.header-is-scrolled .header-bottom-inner {
  border-color: rgba(255, 255, 255, 0.06);
}

/* Home: hero sat under absolute header before — reduce extra top padding */
body.site-home .slider-area .slider_item {
  padding-top: 48px;
}

/* Logo + nav: space-between on large screens */
.header-main-bar {
  width: 100%;
}

@media (min-width: 992px) {
  .header-main-bar {
    flex-wrap: nowrap;
  }
}

/* Nav links — default slate #374562; active: bg #374562 + white text */
.site-header-edu .main-menu nav ul li > a {
  color: #374562;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 6px;
}

.site-header-edu .main-menu nav ul li > a:hover {
  color: #374562 !important;
  background: rgba(55, 69, 98, 0.12) !important;
  box-shadow: none;
}

.site-header-edu .main-menu nav ul li.active > a {
  color: #ffffff !important;
  background: #374562 !important;
  box-shadow: none;
  border-radius: 10px;
}

.site-header-edu .main-menu nav ul li.active > a:hover {
  color: #ffffff !important;
  background: #374562 !important;
}

.site-header-edu .main-menu nav .submenu li a {
  color: #374562;
  text-transform: none;
  font-weight: bold;
  border-radius: 4px;
}

.site-header-edu .main-menu nav .submenu li > a:hover {
  color: #374562 !important;
  background-color: rgba(55, 69, 98, 0.08) !important;
}

.site-header-edu .main-menu nav .submenu li.active > a {
  color: #ffffff !important;
  background-color: #374562 !important;
  font-weight: 700;
}

/* Mobile SlickNav — match desktop active treatment */
.site-header-edu .slicknav_nav a {
  color: rgba(255, 255, 255, 0.95);
}

.site-header-edu .slicknav_nav a:hover {
  background: rgba(55, 69, 98, 0.35);
  color: #ffffff;
}

.site-header-edu .slicknav_nav li.active > a {
  color: #ffffff !important;
  background-color: #374562 !important;
}

.header-bottom-row {
  align-items: center;
}

.header-site-brand a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 24px;
}
.header-site-brand {
  flex: 0 0 auto;
}

.header-site-brand .logo img {
  max-height: 100px;
  width: auto;
}

@media (min-width: 1200px) {
  .header-site-brand .logo img {
    max-height: 100px;
  }
}

.header-site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

/* Desktop: flex nav — same vertical rhythm on all pages (scrolled or not) */
@media (min-width: 992px) {
  .header-bottom-row {
    flex-wrap: nowrap;
  }

  .main-menu {
    width: 100%;
    text-align: right;
  }

  .main-menu nav > ul#m_menu_active {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: stretch;
    row-gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    gap: 0;
  }

  .main-menu nav ul li {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .site-header-edu .main-menu nav ul li > a {
    white-space: nowrap;
    padding: 10px 10px;
    font-size: 12px;
    letter-spacing: 0.06em;
    font-weight: 700;
  }
}

@media (min-width: 1200px) {
  .main-menu nav > ul#m_menu_active {
    flex-wrap: nowrap;
  }

  .site-header-edu .main-menu nav ul li > a {
    padding: 10px 14px;
    font-size: 13px;
  }
}

@media (min-width: 1366px) {
  .site-header-edu .main-menu nav ul li > a {
    padding: 10px 18px;
    font-size: 13px;
  }
}

@media (min-width: 1600px) {
  .site-header-edu .main-menu nav ul li > a {
    padding: 10px 20px;
  }
}

/* --- Mobile / tablet: compact top bar + logo + menu row (desktop unchanged) --- */
@media (max-width: 991px) {
  .site-header-edu .header-top {
    max-height: 120px;
    padding: 8px 12px;
  }

  .site-header-edu .ht-top-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
  }

  .site-header-edu .ht-top-list .ht-item {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    min-width: 0;
  }

  .site-header-edu .ht-top-list .ht-item i {
    font-size: 13px;
    margin-right: 5px;
    flex-shrink: 0;
  }

  .site-header-edu .ht-location {
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }

  .site-header-edu .ht-phone {
    grid-column: 2;
    justify-self: end;
    text-align: right;
  }

  .site-header-edu .ht-email {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    line-height: 1.3;
    padding: 2px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  .site-header-edu .ht-pay {
    grid-column: 1;
    justify-self: start;
    font-weight: 600;
  }

  .site-header-edu .ht-social-item {
    grid-column: 2;
    justify-self: end;
    margin-left: 0;
  }

  .site-header-edu .ht-social {
    text-align: right;
    margin-top: 0;
  }

  .site-header-edu .ht-social ul li a {
    margin: 0 4px;
    font-size: 14px;
  }

  .site-header-edu .header-bottom {
    padding: 8px 12px;
  }

  .site-header-edu .header-main-bar {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .site-header-edu .header-site-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 52px);
  }

  .site-header-edu .header-site-brand .logo {
    text-align: left;
    margin: 0;
  }

  .site-header-edu .header-site-brand .logo img {
    max-height: 64px;
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
  }

  .site-header-edu .header-bottom-row > .d-lg-none {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    padding-left: 0;
    align-self: center;
  }

  .site-header-edu .slicknav_menu {
    margin: 0;
    padding: 0;
  }

  .site-header-edu .slicknav_btn {
    margin-top: 0 !important;
    padding: 8px 10px;
    float: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
  }

  /* Full-screen mobile menu overlay — keeps header height fixed */
  body.mobile-nav-open {
    overflow: hidden;
  }

  .site-header-edu #mobile_menu {
    position: relative;
    z-index: 2;
  }

  .site-header-edu .slicknav_menu {
    background: transparent !important;
    padding: 0 !important;
    overflow: visible;
  }

  .site-header-edu .slicknav_menu .slicknav_nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 10005;
    margin: 0;
    padding: 96px 20px 40px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #243044;
    clear: none;
  }

  .site-header-edu .slicknav_menu.slicknav_open .slicknav_nav {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    animation: cbkMobileNavIn 0.25s ease;
  }

  .site-header-edu .slicknav_nav .mobile-nav-close-item {
    position: fixed;
    top: 18px;
    right: 18px;
    width: auto;
    max-width: none;
    border: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 10030;
    pointer-events: auto;
  }

  .site-header-edu .mobile-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(36, 48, 68, 0.95);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 10031;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .site-header-edu .mobile-nav-close:hover,
  .site-header-edu .mobile-nav-close:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
    outline: none;
    transform: scale(1.05);
  }

  .site-header-edu .mobile-nav-close:active {
    transform: scale(0.96);
  }

  .site-header-edu .slicknav_nav > li {
    width: 100%;
    max-width: 360px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-header-edu .slicknav_nav > li:last-child {
    border-bottom: 0;
  }

  .site-header-edu .slicknav_nav a,
  .site-header-edu .slicknav_nav .slicknav_row {
    margin: 0;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.95);
  }

  .site-header-edu .slicknav_nav .slicknav_row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .site-header-edu .slicknav_nav .slicknav_arrow {
    float: none;
    margin: 0;
    font-size: 0.75em;
    color: #ffc107;
  }

  .site-header-edu .slicknav_nav ul {
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }

  .site-header-edu .slicknav_nav ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .site-header-edu .slicknav_nav ul a {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.88);
  }

  .site-header-edu .slicknav_nav a:hover,
  .site-header-edu .slicknav_nav .slicknav_row:hover {
    background: rgba(55, 69, 98, 0.55) !important;
    color: #ffffff !important;
    border-radius: 0;
  }

  .site-header-edu .slicknav_nav li.active > a,
  .site-header-edu .slicknav_nav li.active > .slicknav_row,
  .site-header-edu .slicknav_nav ul li.active > a {
    color: #ffffff !important;
    background-color: #374562 !important;
  }

  #header.site-header-edu {
    z-index: 10020;
  }
}

@keyframes cbkMobileNavIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header-edu .slicknav_menu.slicknav_open .slicknav_nav {
    animation: none;
  }
}

@media (max-width: 575px) {
  .site-header-edu .header-top {
    max-height: 130px;
    padding: 6px 10px;
  }

  .site-header-edu .ht-top-list {
    column-gap: 8px;
    row-gap: 5px;
  }

  .site-header-edu .ht-top-list .ht-item {
    font-size: 10px;
  }

  .site-header-edu .ht-email {
    font-size: 9px;
  }

  .site-header-edu .ht-top-list .ht-item i {
    font-size: 12px;
    margin-right: 4px;
  }

  .site-header-edu .ht-social ul li a {
    margin: 0 3px;
    font-size: 13px;
  }

  .site-header-edu .header-site-brand .logo img {
    max-height: 62px;
  }
}
