/* ===================== Reset & Global ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
  overflow-x: auto;
}

:root {
  --ait-header-extra-offset: 0px;
}

/* Global fix for fixed header overlap on page top sections */
body > section.pt-24 {
  padding-top: calc(6rem + var(--ait-header-extra-offset)) !important;
}

body > section.pt-40 {
  padding-top: calc(10rem + var(--ait-header-extra-offset)) !important;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===================== Animations ===================== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.animate-blink, .blink {
  animation: blink 1.2s infinite;
}

@keyframes inceptia-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.inceptia-marquee {
  width: 100%;
  background: linear-gradient(90deg, #111827, #1f2937);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
}

.inceptia-marquee-track {
  display: inline-block;
  padding-left: 100%;
  animation: inceptia-scroll 32s linear infinite;
}

.inceptia-marquee-track a {
  color: #facc15;
  font-size: 17px;
  font-weight: 700;
  margin: 0 14px;
  text-decoration: none;
}

.inceptia-marquee-track a:hover {
  color: #fde68a;
  text-decoration: underline;
}

.inceptia-marquee-track span {
  color: #d1d5db;
}

/* ===================== Header & Navigation ===================== */
.header {
  background: linear-gradient(to right, #e0f7fa, #ede7f6);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border-bottom: 4px solid #3b82f6;
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 50;
  transition: background 0.5s ease-in-out;
  overflow: visible !important;
}

.header img {
  max-height: 100px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 20px;
  position: relative;
  z-index: 50;
}

.header, .nav {
  overflow: visible !important;
}

.logo img {
  max-width: 300px;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
}

.nav-link:hover {
  background-color: #2563eb;
  color: white;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.2);
  transform: scale(1.05);
}

.nav-link.active {
  color: #1e3a8a;
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 4px;
  font-weight: 700;
}

/* ===================== Dropdowns ===================== */
.dropdown {
  position: relative;
}

.dropdown-btn {
  all: unset;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 10px;
  transition: background-color 0.3s ease-in-out;
}

.dropdown-btn:hover {
  background-color: #e0e7ff;
}

/* Main dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-top: 2px;
  display: none;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 50;
  min-width: 220px;   /* optional: keep minimum width */
  width: max-content; 
  
}

.dropdown-menu.active,
.group:hover > .dropdown-menu {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Dropdown items */
.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: #f3f4f6;
}

/* Nested dropdowns */
.dropdown-menu .dropdown-menu {
  position: absolute;       /* keeps it outside normal flow */
  top: 0;                   /* align with parent menu top */
  left: 100%;               /* flyout to the right */
  min-width: 200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: none;            /* hidden by default */
  flex-direction: column;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  z-index: 9999;
  pointer-events: auto;     /* ensure hover works */
}

/* Reduce font size and padding for Students Life dropdown */
.dropdown-menu .group > .dropdown-menu {
    font-size: 0.90rem;  /* smaller font */
    padding: 6px 12px;    /* smaller padding */
    line-height: 1.3;     /* tighter line spacing */
}


/* Nested dropdown fix */
.dropdown-menu .group:hover > .dropdown-menu {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  top: 0;
  left: 100%;
  z-index: 999 !important; /* Ensure it appears above main dropdown */
}

.dropdown-menu .dropdown-menu.flip-left {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 8px;
}

.dropdown-menu .dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu .dropdown-menu::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}

/* ===================== Mobile Menu ===================== */
.mobile-menu-button {
  display: none;
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background-color: white;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 50;
}

.mobile-menu a {
  padding: 12px;
  text-align: center;
  display: block;
  color: #333;
  text-decoration: none;
}

.mobile-menu:not(.hidden) {
  display: flex;
}

/* ===================== Container ===================== */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ===================== Sidebar ===================== */
.sidebar-link {
  display: block;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
  text-decoration: none;
}

.sidebar-link:hover {
  background-color: #2563eb;
  color: white;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
}

/* ===================== Buttons ===================== */
.apply-now-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0a75ad;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 40;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.apply-now-button:hover {
  background-color: #075b91;
}

.filter-btn {
  background: #2563eb;
  color: white;
  padding: 10px 15px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
}

.filter-btn:hover,
.filter-btn.active {
  background: #1e40af;
}

/* ===================== Gallery ===================== */
.gallery-image,
.gallery-video {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.gallery-image:hover,
.gallery-video:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ===================== Hero Section ===================== */
.hero-section {
  padding-top: 140px;
  height: 800px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Hero mode after intro video finishes */
#heroSection.banner-active {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: var(--hero-banner-viewport-height, calc(100vh - 220px)) !important;
  min-height: 280px !important;
  max-height: var(--hero-banner-viewport-height, calc(100vh - 220px)) !important;
  background: #000;
  overflow: hidden;
}

#heroSection.banner-active #heroContent {
  display: none;
}

#heroSection.banner-active #heroDarkOverlay {
  display: none;
}

#heroSection.banner-active #heroCounselingBanner {
  display: none;
}

#heroSection.banner-active #heroBannerImage {
  position: relative !important;
  inset: auto !important;
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  background: #000;
  object-fit: contain;
  opacity: 1 !important;
}

body.hero-banner-mode .apply-now-button {
  opacity: 0;
  pointer-events: none;
}

/* ===================== Footer ===================== */
.footer {
  width: 100%;
  background-color: #1a202c;
  padding: 20px;
  text-align: center;
  clear: both;
  position: relative;
}

/* ===================== Misc ===================== */
.text-shadow {
  text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.nav-wrapper > a,
.nav-wrapper > div {
  display: inline-flex;
  align-items: center;
  height: 64px;
  line-height: 1;
  white-space: nowrap;
}

.group {
  padding-bottom: 2px;
}

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
  .nav-wrapper {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    display: none; /* hide desktop links */
  }
}

@media (max-width: 768px) {
  .mobile-menu {
    display: none;
  }

  .mobile-menu:not(.hidden) {
    display: flex;
  }

  /* Mobile dropdowns */
  /*.dropdown-menu,*/
  /*.dropdown-menu .dropdown-menu {*/
  /*  position: static;*/
  /*  display: none;*/
  /*  max-height: none;*/
  /*  overflow: visible;*/
  /*  box-shadow: none;*/
  /*  border: none;*/
  /*  width: 100%;*/
  /*}*/

  .dropdown.open > .dropdown-menu,
  .dropdown-menu .group.open > .dropdown-menu {
    display: flex;
  }
}

/* Flip dropdown upwards if it would go below the viewport */
.dropdown-menu.flip-up {
  bottom: 100%;      /* position above the button */
  top: auto !important;         /* override top */
  margin-top: 0;     /* remove original top margin */
  margin-bottom: 2px;/* small gap from button */
}
