/* ==========================================================================
   DESIGN TOKENS & SYSTEM ROOT
   ========================================================================== */
:root {
  --primary: #1B4D8E;
  --accent: #D4A017;
  --light-bg: #F7F9FC;
  --dark-bg: #0D2545;
  --text: #1A1A2E;
  --muted: #6B7280;
  --white: #FFFFFF;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   BASE & CORE TYPOGRAPHY
   ========================================================================== */
body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
}

/* ==========================================================================
   REUSABLE UTILITIES & LAYOUT PATTERNS
   ========================================================================== */
.section-padding { 
  padding-block: clamp(60px, 8vw, 100px); 
}

.eyebrow { 
  font-family: var(--font-body); 
  font-size: 0.875rem; 
  text-transform: uppercase; 
  letter-spacing: 2px; 
  color: var(--accent); 
  display: block; 
  margin-bottom: 0.5rem; 
  text-align: center; 
}

.section-title { 
  text-align: center; 
  font-weight: 700; 
  margin-bottom: 1rem; 
}

.title-underline { 
  width: 60px; 
  height: 4px; 
  background-color: var(--accent); 
  margin: 0 auto clamp(30px, 5vw, 50px) auto; 
}

/* Accessible Navigation Skip Link */
.skip-link { 
  position: absolute; 
  top: -40px; 
  left: 0; 
  background: var(--accent); 
  color: var(--white); 
  padding: 8px; 
  z-index: 10000; 
  transition: top 0.2s; 
}
.skip-link:focus { 
  top: 0; 
}

/* ==========================================================================
   BUTTON ARCHITECTURE
   ========================================================================== */
.btn-custom { 
  border: 2px solid var(--primary); 
  color: var(--primary); 
  background: transparent; 
  padding: 10px 24px; 
  font-weight: 600; 
  border-radius: 4px; 
  transition: all 0.3s ease; 
  text-decoration: none; 
  display: inline-block; 
}
.btn-custom:hover { 
  background-color: var(--accent); 
  border-color: var(--accent); 
  color: var(--white); 
}
.btn-filled { 
  background-color: var(--primary); 
  color: var(--white); 
  border-color: var(--primary); 
}
.btn-filled:hover { 
  background-color: var(--accent); 
  border-color: var(--accent); 
  color: var(--white); 
}
.btn-enroll { 
  background-color: var(--accent); 
  color: var(--white); 
  padding: 12px 30px; 
  font-weight: 600; 
  border-radius: 4px; 
  text-decoration: none; 
  display: inline-block; 
  transition: background 0.3s ease; 
}
.btn-enroll:hover { 
  background-color: var(--primary); 
  color: var(--white); 
}

/* ==========================================================================
   GLOBAL NAVIGATION COMPONENT
   ========================================================================== */
.navbar { 
  transition: background-color 0.3s ease, padding 0.3s ease; 
}
.navbar.scrolled, .navbar.inner-page-nav { 
  background-color: var(--dark-bg) !important; 
  padding-block: 10px; 
}
.navbar-brand { 
  font-family: var(--font-display); 
  font-weight: 700; 
  color: var(--white) !important; 
  font-size: 1.5rem; 
}
.navbar-brand span { 
  color: var(--accent); 
}
.nav-link { 
  color: rgba(255,255,255,0.8) !important; 
  font-weight: 500; 
  margin-inline: 10px; 
  position: relative; 
}
.nav-link:hover, .nav-link.active { 
  color: var(--white) !important; 
}
.nav-link.active::after { 
  content: ''; 
  position: absolute; 
  bottom: -4px; 
  left: 0; 
  width: 100%; 
  height: 2px; 
  background-color: var(--accent); 
}
.navbar-toggler { 
  border-color: rgba(255,255,255,0.5); 
}
.navbar-toggler-icon { 
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); 
}

/* ==========================================================================
   HOMEPAGE SPECIFIC COMPONENTS
   ========================================================================== */
/* Hero Layer Slider */
.hero-slider .item { 
  height: 100vh; 
  min-height: 600px; 
  position: relative; 
  background-size: cover; 
  background-position: center; 
}
.hero-overlay { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(to top, rgba(13,37,69,0.9), rgba(27,77,142,0.4)); 
}
.hero-caption { 
  position: absolute; 
  inset: 0; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  color: var(--white); 
  padding: 20px; 
  z-index: 2; 
}
.hero-caption h1, .hero-caption h2 { 
  color: var(--white); 
  font-size: clamp(2.5rem, 6vw, 4.5rem); 
  font-weight: 700; 
  opacity: 0; 
  transform: translateY(30px); 
  animation: fadeInUp 0.8s forwards 0.4s; 
}
.hero-caption .eyebrow { 
  color: var(--accent); 
  opacity: 0; 
  transform: translateY(30px); 
  animation: fadeInUp 0.8s forwards 0.2s; 
}
.hero-caption p { 
  font-size: clamp(1.1rem, 2vw, 1.5rem); 
  max-width: 600px; 
  margin-bottom: 2rem; 
  opacity: 0; 
  transform: translateY(30px); 
  animation: fadeInUp 0.8s forwards 0.6s; 
}
.hero-caption .btn-custom { 
  opacity: 0; 
  transform: translateY(30px); 
  animation: fadeInUp 0.8s forwards 0.8s; 
  border-color: var(--white); 
  color: var(--white); 
}
.hero-caption .btn-custom:hover { 
  background-color: var(--accent); 
  border-color: var(--accent); 
}

@keyframes fadeInUp { 
  to { opacity: 1; transform: translateY(0); } 
}

/* Academy Grid Cards */
.academy-card { 
  background: var(--white); 
  border: none; 
  border-radius: 8px; 
  overflow: hidden; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
  transition: transform 0.3s ease, box-shadow 0.3s ease; 
  height: 100%; 
  border-top: 4px solid transparent; 
}
.academy-card:hover { 
  transform: translateY(-8px); 
  box-shadow: 0 12px 30px rgba(0,0,0,0.1); 
  border-top-color: var(--accent); 
}
.badge-category { 
  background-color: var(--primary); 
  color: var(--white); 
  font-size: 0.75rem; 
  font-weight: 600; 
  padding: 4px 12px; 
  border-radius: 4px; 
  display: inline-block; 
  margin-bottom: 10px; 
}

/* High-Performance Fluid Image Gallery */
.gallery-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 20px; 
}
.gallery-item { 
  position: relative; 
  overflow: hidden; 
  border-radius: 8px; 
  aspect-ratio: 4/3; 
}
.gallery-item img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 0.5s ease; 
}
.gallery-item:hover img { 
  transform: scale(1.05); 
}

/* Feedback Carousel Cards */
.testimonial-card { 
  background: var(--white); 
  padding: 40px; 
  border-radius: 8px; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
  border-left: 5px solid var(--accent); 
  margin: 15px; 
}
.star-rating { 
  color: var(--accent); 
  margin-top: 15px; 
}

/* ==========================================================================
   INNER PAGE ARCHITECTURE LAYOUTS
   ========================================================================== */
.inner-hero { 
  background: linear-gradient(rgba(13,37,69,0.85), rgba(13,37,69,0.85));
  padding-block: 80px 40px; 
  color: var(--white); 
  text-align: center; 
  margin-top: 56px; 
}
.inner-hero h1 { 
  color: var(--white); 
  font-weight: 700; 
}
.breadcrumb-custom { 
  color: rgba(255,255,255,0.6); 
  font-size: 0.9rem; 
}
.breadcrumb-custom a { 
  color: var(--accent); 
  text-decoration: none; 
}

/* Block Variants (About Page) */
.vision-block { 
  background: var(--light-bg); 
  border-radius: 12px; 
  padding: 40px; 
  border-top: 4px solid var(--accent); 
}
.focus-card { 
  padding: 30px; 
  background: #fff; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
  border-radius: 8px; 
  height: 100%; 
  transition: transform 0.3s ease; 
}
.focus-card:hover { 
  transform: translateY(-5px); 
}
.icon-box { 
  width: 50px; 
  height: 50px; 
  background: rgba(27,77,142,0.1); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border-radius: 8px; 
  color: var(--primary); 
  margin-bottom: 20px; 
  font-weight: bold; 
  font-size: 1.25rem; 
}

/* Academic Stream Detail Elements */
.academy-block { 
  border-bottom: 1px solid rgba(0,0,0,0.05); 
}
.academy-block:last-of-type { 
  border-bottom: none; 
}
.stream-list { 
  list-style: none; 
  padding-left: 0; 
}
.stream-list li { 
  padding: 10px; 
  background: var(--light-bg); 
  margin-bottom: 8px; 
  border-left: 3px solid var(--primary); 
  border-radius: 0 4px 4px 0; 
  font-size: 0.95rem; 
}

/* Contact Validation Layout Rules */
.form-control:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 0.25rem rgba(212,160,23,0.25); 
}
.error-hint { 
  color: #dc3545; 
  font-size: 0.85rem; 
  display: none; 
  margin-top: 4px; 
}
.map-container { 
  position: relative; 
  border-radius: 8px; 
  overflow: hidden; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}

/* ==========================================================================
   GLOBAL FOOTER LAYER
   ========================================================================== */
footer { 
  background-color: var(--dark-bg); 
  color: rgba(255,255,255,0.7); 
  font-size: 0.95rem; 
}
footer h4 { 
  color: var(--white); 
  font-size: 1.25rem; 
  font-weight: 600; 
  margin-bottom: 1.5rem; 
  position: relative; 
  padding-bottom: 10px; 
}
footer h4::after { 
  content: ''; 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  width: 30px; 
  height: 2px; 
  background-color: var(--accent); 
}
footer a { 
  color: rgba(255,255,255,0.7); 
  text-decoration: none; 
  transition: color 0.3s ease; 
}
footer a:hover { 
  color: var(--accent) !important; 
}
.footer-bottom { 
  border-top: 1px solid rgba(255,255,255,0.1); 
  padding-top: 20px; 
  margin-top: 40px; 
}

/* ==========================================================================
   INTERSECTION OBSERVER TARGETS & ACCESSIBILITY GUARDRAILS
   ========================================================================== */
.scroll-animate { 
  opacity: 0; 
  transform: translateY(40px); 
  transition: opacity 0.8s ease, transform 0.8s ease; 
}
.scroll-animate.is-visible { 
  opacity: 1; 
  transform: translateY(0); 
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { 
    animation-delay: -1ms !important; 
    animation-duration: 1ms !important; 
    animation-iteration-count: 1 !important; 
    background-attachment: scroll !important; 
    scroll-behavior: auto !important; 
    transition-duration: 0s !important; 
    transition-delay: 0s !important; 
  }
}