/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Colors */
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #1e88e5;
  --accent: #64b5f6;
  --accent-light: #e3f2fd;

  --bg-dark: #121212;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;

  --text-dark: #1e293b;
  --text-muted: #475569;
  --text-light: #ffffff;
  --text-gray-light: #e0e0e0;

  --success: #1565c0;
  --error: #d32f2f;
  --warning: #fbc02d;

  /* Fonts */
  --font-main: 'Poppins', sans-serif;

  /* Layout & Spacing */
  --max-width: 1200px;
  --header-height: 80px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(21, 101, 192, 0.1), 0 10px 10px -5px rgba(21, 101, 192, 0.04);
  --shadow-inset: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BASE & RESET STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.2rem;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  margin: 0.75rem auto 0 auto;
  border-radius: 2px;
}

/* ==========================================================================
   LAYOUT MODULES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

.bg-white-section {
  background-color: var(--bg-white);
}

.bg-accent-section {
  background-color: var(--accent-light);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: all var(--transition-normal);
  width: 100%;
}

header.scrolled {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header-logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.2rem 1rem 0.6rem 1rem;
  width: 100%;
  background-color: #ffffff;
}

.logo-centered-link {
  display: inline-flex;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.logo-centered-link:hover {
  transform: scale(1.03);
}

.logo-centered-img {
  height: 110px;
  max-height: 110px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto;
  padding: 0.6rem 1.5rem;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.04);
  position: relative;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo {
  height: 55px;
  width: 55px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.school-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.1;
}

.school-location {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 0.25rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

/* Dropdown styling */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  border-top: 3px solid var(--primary);
}

.dropdown-item a {
  display: block;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item a:hover,
.dropdown-item a.active {
  background-color: var(--accent-light);
  color: var(--primary-dark);
}

/* Dropdown visibility on hover for desktop */
@media (min-width: 992px) {
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile Nav Toggle */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: var(--primary-dark);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* Hamburger Open Animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================================================
   HERO BANNER & SLIDER
   ========================================================================== */
.hero-slider-container {
  position: relative;
  height: 80vh;
  min-height: 500px;
  max-height: 800px;
  width: 100%;
  overflow: hidden;
  background-color: #000;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-slow);
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-light);
  width: 90%;
  max-width: 800px;
  z-index: 3;
  opacity: 0;
  transform: translate(-50%, -40%);
  transition: all 0.8s ease;
}

.slide.active .slide-content {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.slide-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.25rem);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
}

.slide-title {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.slide-text {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  margin-bottom: 2rem;
  font-weight: 300;
  color: var(--text-gray-light);
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(21, 101, 192, 0.4);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(13, 71, 161, 0.6);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Slider arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-arrow:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-light);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

/* Slider dots */
.slider-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.dot.active {
  background-color: var(--primary-light);
  width: 30px;
  border-radius: 6px;
}

/* ==========================================================================
   PAGE BANNER TEMPLATE (For subpages)
   ========================================================================== */
.page-banner {
  height: 350px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--text-light);
}

.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(13, 71, 161, 0.85) 0%, rgba(21, 101, 192, 0.6) 100%);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.banner-title {
  color: var(--text-light);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.banner-subtitle {
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

.breadcrumbs {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-gray-light);
}

.breadcrumbs a {
  color: var(--accent-light);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* ==========================================================================
   HOME PAGE SECTIONS
   ========================================================================== */

/* Welcome Section */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.welcome-img-container {
  position: relative;
}

.welcome-img {
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}

.welcome-img-container::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-top: 5px solid var(--primary-light);
  border-left: 5px solid var(--primary-light);
  border-top-left-radius: var(--border-radius-sm);
  z-index: 1;
}

.welcome-img-container::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  border-bottom: 5px solid var(--primary-light);
  border-right: 5px solid var(--primary-light);
  border-bottom-right-radius: var(--border-radius-sm);
  z-index: 1;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.welcome-tagline {
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.welcome-title {
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 1.5rem;
  font-size: 2.2rem;
  line-height: 1.25;
}

.welcome-title::after {
  margin: 0.5rem 0 0 0;
}

.welcome-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Programs Section */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.program-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid rgba(21, 101, 192, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary);
  transition: height var(--transition-fast);
  z-index: 1;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.program-card:hover::before {
  height: 8px;
}

.program-badge {
  align-self: flex-start;
  background-color: var(--accent-light);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.program-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.program-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Notifications Section */
.notifications-banner {
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 6rem 0;
  text-align: center;
  color: var(--text-light);
}

.notifications-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 71, 161, 0.85);
  backdrop-filter: blur(3px);
}

.notifications-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.notifications-title {
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.notifications-title::after {
  background-color: var(--text-light);
  margin-top: 0.5rem;
}

.notifications-box {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2.5rem;
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(10px);
}

.notifications-box p {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   ABOUT US PAGE
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.about-intro-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-dark);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.stat-card {
  background-color: var(--bg-white);
  padding: 2.5rem 1.5rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(21, 101, 192, 0.05);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.stat-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 0.5rem;
}

/* ==========================================================================
   MESSAGE PAGES (Headmaster & Founder)
   ========================================================================== */
.message-container {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.message-sidebar {
  text-align: center;
}

.message-photo-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.message-photo {
  width: 100%;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  object-fit: cover;
  border: 4px solid var(--bg-white);
}

.message-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 1rem;
}

.message-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.message-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.message-body p {
  margin-bottom: 1.5rem;
}

.message-signature {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(21, 101, 192, 0.15);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

/* ==========================================================================
   MISSION & VISION PAGE
   ========================================================================== */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.mv-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(21, 101, 192, 0.05);
  transition: all var(--transition-normal);
  position: relative;
}

.mv-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.mv-icon {
  width: 70px;
  height: 70px;
  background-color: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2.2rem;
  color: var(--primary);
}

.mv-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.mv-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

/* ==========================================================================
   SCHOOL ANTHEM PAGE
   ========================================================================== */
.anthem-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

.anthem-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 4rem 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(21, 101, 192, 0.08);
  position: relative;
  text-align: center;
}

.anthem-card::before {
  content: "🎵";
  font-size: 3rem;
  color: var(--primary-light);
  opacity: 0.15;
  position: absolute;
  top: 30px;
  left: 30px;
}

.anthem-lyrics {
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-dark);
  font-family: inherit;
  white-space: pre-line;
}

.anthem-section {
  margin-bottom: 2.5rem;
}

.anthem-chorus {
  background-color: var(--accent-light);
  padding: 2rem;
  border-radius: var(--border-radius-md);
  margin: 2rem 0;
  font-weight: 500;
  font-style: italic;
}

/* ==========================================================================
   FACULTY PAGE
   ========================================================================== */
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.faculty-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(21, 101, 192, 0.05);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.faculty-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.faculty-img-container {
  position: relative;
  width: 100%;
  padding-top: 117%;
  /* Aspect ratio matching height/width for 375x441 */
  overflow: hidden;
  background-color: var(--bg-light);
  border: 10px solid #ffffff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faculty-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.faculty-card:hover .faculty-img {
  transform: scale(1.05);
}

.faculty-info {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.faculty-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.faculty-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.faculty-qualification {
  font-size: 0.8rem;
  color: var(--text-muted);
  background-color: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  display: inline-block;
  align-self: center;
}

/* ==========================================================================
   GALLERY PAGE
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1;
  cursor: pointer;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 71, 161, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(2px);
}

.gallery-icon {
  color: var(--text-light);
  font-size: 2rem;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-icon {
  transform: translateY(0);
}

/* Lightbox styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 4px solid var(--bg-white);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  color: var(--text-light);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.lightbox-nav:hover {
  background-color: var(--primary);
}

.lightbox-prev {
  left: -70px;
}

.lightbox-next {
  right: -70px;
}

@media (max-width: 768px) {
  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    right: 10px;
    top: 10px;
  }
}

/* ==========================================================================
   ADMISSION PAGE & ACADEMIC CALENDAR
   ========================================================================== */
.admission-content,
.calendar-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.admission-btn-wrapper {
  margin-bottom: 3rem;
}

.preview-container {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(21, 101, 192, 0.08);
  display: inline-block;
  max-width: 100%;
}

.admission-preview {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.calendar-preview {
  max-width: 800px;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.admission-note {
  margin-top: 2rem;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
  padding: 1.5rem;
  background-color: var(--accent-light);
  border-radius: var(--border-radius-md);
  border-left: 5px solid var(--primary);
}

/* ==========================================================================
   CONTACT US PAGE
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-panel {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  background-image: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.contact-info-panel h3 {
  color: var(--text-light);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.contact-info-panel h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent);
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-detail-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  background-color: rgba(255, 255, 255, 0.15);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.contact-text p,
.contact-text a {
  font-size: 0.95rem;
  color: var(--text-gray-light);
  line-height: 1.5;
}

.contact-text a:hover {
  color: var(--text-light);
  text-decoration: underline;
}

.contact-form-container {
  background-color: var(--bg-white);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(21, 101, 192, 0.05);
}

.contact-form-container h3 {
  color: var(--primary-dark);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 150px;
}

.form-alert {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-alert-success {
  background-color: var(--accent-light);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.form-alert-danger {
  background-color: #ffebee;
  color: var(--error);
  border-left: 4px solid var(--error);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  position: relative;
  background-image: linear-gradient(180deg, #0d253f 0%, #05101c 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-light);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-logo {
  height: 50px;
  width: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.footer-school-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-tagline {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer-about-text {
  font-size: 0.85rem;
  color: var(--text-gray-light);
  line-height: 1.6;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links-list a {
  font-size: 0.9rem;
  color: var(--text-gray-light);
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links-list a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-gray-light);
}

.footer-contact-icon {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.footer-contact-item a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background-color: var(--accent);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-gray-light);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary);
  color: var(--text-light);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  font-size: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Large Tablets & Small Desktops (992px to 1199px) */
@media (max-width: 1199px) {
  :root {
    --max-width: 960px;
  }

  .welcome-grid {
    gap: 2rem;
  }

  .faculty-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablets (768px to 991px) */
@media (max-width: 991px) {
  :root {
    --max-width: 720px;
    --header-height: 70px;
  }

  .section-padding {
    padding: 4rem 0;
  }

  /* Mobile Menu Styles */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 2.5rem;
    gap: 0;
    transition: left var(--transition-normal);
    overflow-y: auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-link {
    padding: 1rem 0;
    font-size: 1.05rem;
    width: 100%;
    justify-content: space-between;
  }

  .nav-link::after {
    display: none;
  }

  /* Dropdown mobile behaviour */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 0 0 1rem 1.5rem;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-top: none;
    min-width: 0;
  }

  .dropdown-menu.active {
    display: block;
  }

  .dropdown-item a {
    padding: 0.5rem 0;
  }

  /* Layout shifts */
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .welcome-img-container {
    max-width: 550px;
    margin: 0 auto;
  }

  .mv-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .message-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .message-sidebar {
    max-width: 320px;
    margin: 0 auto;
  }

  .faculty-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Mobile Phones (up to 767px) */
@media (max-width: 767px) {
  :root {
    --max-width: 540px;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .hero-slider-container {
    height: 70vh;
  }

  .slider-arrow {
    display: none;
    /* Hide navigation arrows on small mobile devices to save space */
  }

  .welcome-title {
    font-size: 1.8rem;
  }

  .stat-card {
    padding: 2rem 1rem;
  }

  .anthem-card {
    padding: 2.5rem 1.5rem;
  }

  .anthem-chorus {
    padding: 1.25rem;
    margin: 1.5rem 0;
  }

  .faculty-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 0 auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 0 auto;
  }

  .contact-info-panel,
  .contact-form-container {
    padding: 2rem 1.5rem;
  }
}