
:root {
  --forest: #0d3d25;
  --forest-mid: #166534;
  --forest-light: #1e8449;
  --cream: #faf6ee;
  --parchment: #f2ead8;
  --gold: #c8973a;
  --gold-light: #e8b94a;
  --text-dark: #0a2518;
  --text-mid: #3a5a45;
  --text-light: #7a9a82;
  --white: #ffffff;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { 
  scroll-behavior: smooth; 
  font-size: 16px; 
  overflow-x: hidden;
  background: var(--cream); /* Prevents the OS from showing stark white behind transparent scrollbars */
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
  max-width: 100%; /* Strictly contain to viewport minus vertical scrollbar */
  cursor: none;
}

/* Custom Cursor */
.cursor {
  width: 10px; height: 10px;
  background: var(--gold-light);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.15s ease;
  box-shadow: 0 0 8px rgba(232, 185, 74, 0.8); /* Adds a bright glow */
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--gold-light);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transition: all 0.35s cubic-bezier(.23,1,.32,1);
  opacity: 0.85;
}
body:hover .cursor, body:hover .cursor-ring { opacity: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar:horizontal { height: 0; display: none; } /* Strictly kill horizontal scrollbar track */
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(22, 100, 52, 0.6); border-radius: 4px; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 5vw;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  transition: all 0.5s cubic-bezier(.23,1,.32,1);
}
nav.scrolled {
  background: rgba(13,61,37,0.97);
  backdrop-filter: blur(12px);
  height: 60px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.2);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--forest);
  box-shadow: 0 4px 12px rgba(200,151,58,0.3);
  transition: transform 0.3s ease;
}
.nav-logo:hover .nav-logo-icon { transform: rotate(10deg) scale(1.05); }
.nav-logo-text { color: white; }
.nav-logo-text strong { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 600; letter-spacing: 0.02em; }
.nav-logo-text span { font-size: 0.65rem; color: rgba(255,255,255,0.6); letter-spacing: 0.1em; text-transform: uppercase; }

.nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.25s;
}
.nav-links a:hover { color: white; background: rgba(255,255,255,0.12); }

.nav-cta {
  display: flex; align-items: center; gap: 12px;
}
.btn-apply {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--forest) !important;
  font-weight: 500 !important;
  padding: 8px 20px !important;
  border-radius: 24px !important;
  box-shadow: 0 4px 16px rgba(200,151,58,0.35);
  transition: all 0.3s !important;
}
.btn-apply:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,151,58,0.45) !important; background: rgba(255,255,255,0.12) !important; }

.hamburger {
  display: none;
  background: none; border: none; cursor: none;
  padding: 8px;
  flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 24px; height: 1.5px;
  background: white;
  transition: all 0.35s cubic-bezier(.23,1,.32,1);
  transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 999;
  background: var(--forest);
  display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 24px;
  padding-top: 100px; padding-bottom: 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(.23,1,.32,1);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  transition: all 0.25s;
  position: relative;
}
.mobile-nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width 0.3s;
}
.mobile-nav a:hover { color: white; }
.mobile-nav a:hover::after { width: 100%; }
.mobile-nav-cta {
  margin-top: 20px;
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--forest);
  border-radius: 40px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(200,151,58,0.4);
}

/* ===== HERO ===== */
#home {
  min-height: 100vh; /* Use min-height to allow content to expand */
  background: var(--forest);
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding-top: 72px; /* Offset for fixed navbar */
  box-sizing: border-box;
}

.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; /* Prevent JS-resized canvas from exceeding container */
}

.geometric-bg {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(60deg, rgba(200,151,58,0.04) 1px, transparent 1px),
    linear-gradient(-60deg, rgba(200,151,58,0.04) 1px, transparent 1px),
    linear-gradient(rgba(200,151,58,0.03) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 80px 80px;
  animation: gridShift 20s linear infinite;
}
@keyframes gridShift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 80px 80px, 80px 80px, 80px 80px; }
}

.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width: 600px; height: 600px; top: -200px; right: -100px; background: rgba(22,100,52,0.5); animation-delay: 0s; }
.orb2 { width: 400px; height: 400px; bottom: -100px; left: 10%; background: rgba(200,151,58,0.15); animation-delay: -3s; }
.orb3 { width: 300px; height: 300px; top: 30%; right: 20%; background: rgba(30,132,73,0.3); animation-delay: -5s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.arabic-pattern {
  position: absolute; right: 0; top: 0; bottom: 0; width: 45%;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; overflow: hidden;
  pointer-events: none;
}
.arabic-star {
  font-size: 55vw;
  color: rgba(255,255,255,0.02);
  line-height: 1;
  user-select: none;
  animation: starRotate 40s linear infinite;
  position: absolute;
}
@keyframes starRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-arch {
  position: absolute; right: -5%; top: 5%; bottom: 5%; width: 50%;
  border: 1px solid rgba(200,151,58,0.15);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  background: linear-gradient(180deg, rgba(200,151,58,0.05) 0%, transparent 70%);
}

.hero-content {
  position: relative; z-index: 10;
  padding: 0 5vw 100px; /* Keep horizontal padding, add bottom for stats */
  max-width: 700px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,151,58,0.15);
  border: 1px solid rgba(200,151,58,0.3);
  color: var(--gold-light);
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(.23,1,.32,1) 0.2s forwards;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 6px var(--gold); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.4} }

.hero-arabic {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: rgba(200,151,58,0.7);
  margin-bottom: 16px; line-height: 1.6;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(.23,1,.32,1) 0.4s forwards;
}

.hero-h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem); /* Adjusted font size */
  font-weight: 300;
  color: white;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px; /* Adjusted spacing */
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.9s cubic-bezier(.23,1,.32,1) 0.5s forwards;
}
.hero-h1 em { font-style: italic; color: var(--gold-light); }

.hero-sub {
  color: rgba(255, 255, 255, 0.838);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  line-height: 1.8; /* Increased for readability */
  margin-bottom: 32px; /* Adjusted spacing */
  max-width: 720px;
  opacity: 1; transform: translateY(20px);
  animation: fadeUp 0.9s cubic-bezier(.23,1,.32,1) 0.7s forwards;
}

.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 32px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s cubic-bezier(.23,1,.32,1) 0.9s forwards;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--forest);
  padding: 16px 36px; border-radius: 40px;
  font-weight: 500; font-size: 0.9rem; letter-spacing: 0.05em;
  text-decoration: none; border: none; cursor: none;
  box-shadow: 0 8px 32px rgba(200,151,58,0.4);
  transition: all 0.3s cubic-bezier(.23,1,.32,1);
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(200,151,58,0.5); }
.btn-outline {
  color: rgba(255,255,255,0.8);
  padding: 16px 36px; border-radius: 40px;
  font-size: 0.9rem; letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 10px;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.6); color: white; background: rgba(255,255,255,0.07); }

.hero-stats {
  position: absolute; bottom: 48px; left: 5vw; right: 5vw;
  display: flex; gap: 48px; z-index: 10;
  opacity: 0; animation: fadeUp 0.9s cubic-bezier(.23,1,.32,1) 1.1s forwards;
}
.hero-stat { }
.hero-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 600; color: white; line-height: 1;
}
.hero-stat-num span { color: var(--gold); }
.hero-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

.scroll-indicator {
  position: absolute; bottom: 40px; right: 5vw; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.4); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  animation: fadeIn 1s 1.5s both;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(200,151,58,0.6));
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ===== INNER PAGES HERO ===== */
.page-hero {
  position: relative;
  min-height: 45vh; /* Allows content to expand gracefully without internal scrolling */
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding-top: 72px; /* Offset for fixed navbar */
  padding-bottom: 40px; /* Provides breathing room below text */
  box-sizing: border-box;
  overflow: hidden; /* Keeps the glow overlay contained */

  background:
  linear-gradient(rgba(0,0,0,0.58), rgba(0,0,0,0.62)),
  url("../img/camimg.jpeg") center center/cover no-repeat;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(212,175,55,0.25), transparent 35%);
  pointer-events: none; /* Prevents the glow from interfering with clicks */
}
.page-hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  width: 90%;
  max-width: 850px;
  padding: 0;
}
.page-hero .hero-sub {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .page-hero {
    min-height: 40vh; /* Replaced fixed height for better mobile responsiveness */
    padding-top: 80px;
  }
}

#hero-admissions { height: 75vh; padding-top: 120px; background: linear-gradient(rgba(7,26,15,0.8), rgba(7,26,15,0.9)), url('https://picsum.photos/id/870/2000/1200') center/cover; }
.gallery-page-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* ===== SECTIONS COMMON ===== */
section { 
  position: relative; 
  overflow-x: hidden; /* Changed from clip to hidden for better browser support on Desktop */
}

.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.section-label::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--gold);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300; line-height: 1.1;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

/* ===== ABOUT ===== */
#about {
  background: var(--cream);
  padding: 120px 5vw;
}
.about-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.about-visual {
  position: relative;
}
.about-img-main {
  width: 100%; aspect-ratio: 4/5;
  background: var(--forest);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}
.about-img-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
  display: flex; align-items: center; justify-content: center;
}
.about-mosque-icon {
  font-size: 8rem; color: rgba(255,255,255,0.08);
  position: absolute; bottom: 20px; right: 20px;
}
.about-decor {
  position: absolute; top: -20px; left: -20px;
  width: 120px; height: 120px;
  border: 1px solid rgba(200,151,58,0.3);
  border-radius: 16px;
  background: rgba(200,151,58,0.05);
  z-index: -1;
}
.about-stat-card {
  position: absolute; bottom: 32px; left: -32px;
  background: white;
  border-radius: 20px;
  padding: 20px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  display: flex; align-items: center; gap: 16px;
}
.about-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--forest); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.about-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 600; color: var(--forest); line-height: 1; }
.about-stat-text { font-size: 0.75rem; color: var(--text-light); }

.about-year-badge {
  position: absolute; top: 32px; right: -24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--forest); border-radius: 14px;
  padding: 12px 20px; font-weight: 700;
  font-family: 'Cormorant Garamond', serif; font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(200,151,58,0.4);
}
.about-year-badge small { display: block; font-family: 'DM Sans', sans-serif; font-size: 0.6rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }

.about-content {}
.about-desc {
  font-size: 1.1rem; line-height: 1.8; color: var(--text-mid);
  margin: 24px 0 48px;
}

.about-pillars {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.pillar {
  background: white;
  border-radius: 20px; padding: 24px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s cubic-bezier(.23,1,.32,1);
  position: relative; overflow: hidden;
}
.pillar::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--forest), var(--forest-light));
  opacity: 0; transition: opacity 0.35s;
}
.pillar:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(13,61,37,0.12); }
.pillar:hover::before { opacity: 1; }
.pillar:hover .pillar-title, .pillar:hover .pillar-text { color: white; }
.pillar:hover .pillar-icon-wrap { background: rgba(255,255,255,0.15); color: white; }
.pillar-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--parchment); color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 1.1rem;
  transition: all 0.35s; position: relative;
}
.pillar-title { font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; position: relative; transition: color 0.35s; }
.pillar-text { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; position: relative; transition: color 0.35s; }

/* ===== COURSES ===== */
#courses {
  background: var(--forest);
  padding: 120px 5vw;
  position: relative; overflow: hidden;
}
#courses .section-title { color: white; }
.courses-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(200,151,58,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(30,132,73,0.15) 0%, transparent 40%);
}
.courses-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 64px;
}
#courses .section-label { color: rgba(200,151,58,0.8); }
#courses .section-label::before { background: rgba(200,151,58,0.8); }
.courses-link { color: rgba(255,255,255,0.5); font-size: 0.85rem; letter-spacing: 0.05em; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.25s; }
.courses-link:hover { color: var(--gold); }

.courses-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.course-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 36px 28px;
  position: relative; overflow: hidden;
  transition: all 0.4s cubic-bezier(.23,1,.32,1);
  cursor: none;
}
.course-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad, linear-gradient(90deg, var(--gold), var(--gold-light)));
}
.course-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-8px);
  box-shadow: 0 32px 64px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.15);
}
.course-icon-wrap {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 28px;
  background: rgba(255,255,255,0.08);
}
.course-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 400; color: white;
  margin-bottom: 6px; line-height: 1.2;
}
.course-meta {
  font-size: 0.75rem; color: rgba(200,151,58,0.8);
  letter-spacing: 0.05em; margin-bottom: 16px;
}
.course-desc {
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
  line-height: 1.7; margin-bottom: 32px;
}
.course-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: white; font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  padding: 10px 20px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s; background: none; cursor: none;
}
.course-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

/* ===== NOTICES ===== */
#notices {
  background: var(--parchment);
  padding: 120px 5vw;
}
.notices-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px;
  margin-top: 56px;
}
.notice-main {
  background: white; border-radius: 28px; padding: 48px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s;
}
.notice-main:hover { box-shadow: 0 24px 60px rgba(13,61,37,0.1); transform: translateY(-4px); }
.notice-date-big {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5rem; font-weight: 300; color: var(--forest);
  line-height: 1; opacity: 0.12;
  position: absolute; top: 20px; right: 40px;
}
.notice-tag {
  display: inline-block; padding: 4px 14px; border-radius: 12px;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 20px;
}
.tag-event { background: rgba(200,151,58,0.12); color: var(--gold); }
.tag-notice { background: rgba(22,100,52,0.1); color: var(--forest-mid); }
.notice-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem; font-weight: 400; line-height: 1.2;
  color: var(--text-dark); margin-bottom: 12px;
}
.notice-body { color: var(--text-mid); font-size: 0.92rem; line-height: 1.7; margin-bottom: 32px; }
.notice-date-text { font-size: 0.8rem; color: var(--text-light); display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.notice-action {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--forest); color: white;
  padding: 14px 28px; border-radius: 24px;
  font-size: 0.85rem; text-decoration: none;
  transition: all 0.3s; border: none; cursor: none;
}
.notice-action:hover { background: var(--forest-light); transform: translateY(-2px); }
.notice-action-outline {
  background: transparent; border: 1px solid var(--forest);
  color: var(--forest);
}
.notice-action-outline:hover { background: var(--forest); color: white; }

.notices-sidebar { display: flex; flex-direction: column; gap: 20px; }
.notice-small {
  background: white; border-radius: 20px; padding: 28px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s; cursor: default;
  display: flex; gap: 20px; align-items: flex-start;
}
.notice-small:hover { box-shadow: 0 12px 40px rgba(13,61,37,0.08); transform: translateX(4px); }
.notice-date-block {
  min-width: 52px; text-align: center;
  background: var(--parchment); border-radius: 12px; padding: 10px 8px;
}
.notice-date-block .day { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 600; color: var(--forest); line-height: 1; }
.notice-date-block .month { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.notice-small-title { font-weight: 500; font-size: 0.92rem; margin-bottom: 6px; }
.notice-small-desc { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }

/* ===== GALLERY ===== */
#gallery {
  background: var(--cream);
  padding: 120px 5vw;
}
.gallery-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; }
.gallery-link { color: var(--text-dark); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.05em; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color 0.3s; }
.gallery-link:hover { color: var(--gold); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}
.gallery-item {
  border-radius: 20px; overflow: hidden;
  position: relative; cursor: none;
  background: var(--parchment);
}
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.6s cubic-bezier(.23,1,.32,1);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,61,37,0.8) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s;
  display: flex; align-items: flex-end; padding: 24px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-label { color: white; font-size: 0.85rem; transform: translateY(8px); transition: transform 0.4s; }
.gallery-item:hover .gallery-item-label { transform: translateY(0); }
.gallery-placeholder {
  width: 100%; padding-top: 75%;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
  position: relative;
}
.gallery-placeholder-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,0.1);
}

/* ===== ADMISSIONS ===== */
#admissions {
  background: var(--forest);
  padding: 120px 5vw;
  position: relative; overflow: hidden;
}
.admissions-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(200,151,58,0.08) 0%, transparent 60%);
}
.admissions-layout {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start;
  position: relative; z-index: 1;
}
#admissions .section-title { color: white; }
#admissions .section-label { color: rgba(200,151,58,0.8); }
#admissions .section-label::before { background: rgba(200,151,58,0.8); }
.admissions-sub { color: rgba(255,255,255,0.55); font-size: 1rem; line-height: 1.7; margin: 24px 0 48px; }

.admit-facts {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
}
.admit-fact {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 20px;
}
.admit-fact-label { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(200,151,58,0.7); margin-bottom: 8px; }
.admit-fact-val { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; color: white; }

.admission-form {
  background: white; border-radius: 28px; padding: 48px;
}
.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 400; margin-bottom: 32px; color: var(--text-dark);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: span 2; }
.form-field label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); font-weight: 500; }
.form-field input, .form-field select, .form-field textarea {
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px; padding: 14px 18px;
  font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
  color: var(--text-dark); outline: none;
  transition: all 0.25s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--forest-mid);
  background: white;
  box-shadow: 0 0 0 3px rgba(22,100,52,0.08);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-submit {
  width: 100%; margin-top: 8px;
  background: linear-gradient(135deg, var(--forest), var(--forest-light));
  color: white; border: none; border-radius: 16px;
  padding: 18px; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: none; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(22,100,52,0.4); }

/* ===== CAREER ===== */
#career {
  background: var(--parchment);
  padding: 120px 5vw;
}
.career-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.career-card {
  background: white; border-radius: 24px; padding: 36px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.4s cubic-bezier(.23,1,.32,1);
  position: relative; overflow: hidden;
}
.career-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--forest), var(--forest-light));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s;
}
.career-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(13,61,37,0.12); }
.career-card:hover::after { transform: scaleX(1); }
.career-type { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.career-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; margin-bottom: 16px; line-height: 1.2; }
.career-desc { font-size: 0.85rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 32px; }
.career-footer { display: flex; justify-content: space-between; align-items: center; }
.career-salary { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--forest); font-weight: 600; }
.career-apply {
  background: var(--forest); color: white;
  padding: 10px 22px; border-radius: 20px;
  font-size: 0.8rem; text-decoration: none; border: none; cursor: none;
  transition: all 0.3s;
}
.career-apply:hover { background: var(--forest-light); transform: scale(1.05); }

/* ===== LIFE ===== */
#life {
  background: var(--cream);
  padding: 120px 5vw;
}
.life-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; margin-top: 56px; }
.life-quote-block {
  background: var(--forest);
  border-radius: 28px; padding: 56px;
  position: relative; overflow: hidden;
}
.life-quote-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 8rem; line-height: 0.6; color: rgba(200,151,58,0.2);
  position: absolute; top: 30px; left: 36px;
}
.life-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem; font-style: italic; font-weight: 300;
  color: white; line-height: 1.5; position: relative; z-index: 1;
  margin-bottom: 32px;
}
.life-quote-author {
  font-size: 0.85rem; color: rgba(200,151,58,0.8);
  letter-spacing: 0.05em; position: relative; z-index: 1;
}
.life-times { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.life-time { background: white; border-radius: 16px; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid rgba(0,0,0,0.06); /* Prevent tight text collision on mobile */ }
.life-time-label { font-size: 0.9rem; color: var(--text-mid); }
.life-time-val { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--forest); font-weight: 600; }
.life-visual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.life-visual-cell {
  aspect-ratio: 1;
  border-radius: 20px;
  background: var(--parchment);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s; cursor: default;
}
.life-visual-cell:hover { background: var(--forest); transform: scale(1.03); }

/* ===== FACILITIES ===== */
#facilities {
  background: var(--forest);
  padding: 120px 5vw;
}
#facilities .section-title { color: white; }
#facilities .section-label { color: rgba(200,151,58,0.8); }
#facilities .section-label::before { background: rgba(200,151,58,0.8); }
.facilities-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 64px; }
.facility-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 36px 20px;
  text-align: center; transition: all 0.4s cubic-bezier(.23,1,.32,1);
  cursor: default;
}
.facility-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-8px);
  border-color: rgba(200,151,58,0.3);
}
.facility-icon { font-size: 2.5rem; color: var(--gold); margin-bottom: 16px; }
.facility-name { font-size: 0.85rem; color: rgba(255,255,255,0.75); font-weight: 400; }

/* ===== WELFARE ===== */
#welfare {
  background: var(--cream);
  padding: 120px 5vw;
}
.welfare-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
.welfare-card {
  background: white; border-radius: 24px; padding: 32px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s;
}
.welfare-card:hover { transform: translateY(-6px); box-shadow: 0 20px 56px rgba(13,61,37,0.1); }
.welfare-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--parchment); color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
  transition: all 0.35s;
}
.welfare-card:hover .welfare-icon { background: var(--forest); color: white; }
.welfare-title { font-weight: 500; margin-bottom: 10px; }
.welfare-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

/* ===== LIBRARY ===== */
#library {
  background: var(--parchment);
  padding: 120px 5vw;
}
.library-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; }
.library-stats { display: flex; gap: 32px; flex-wrap: wrap; /* Safe wrapping for small mobile */ }
.lib-stat { text-align: right; }
.lib-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2.5rem; font-weight: 600; color: var(--forest); line-height: 1; }
.lib-stat-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.library-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.book-card {
  background: white; border-radius: 20px; padding: 28px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.35s; cursor: default;
  text-align: center;
}
.book-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(13,61,37,0.1); }
.book-emoji { font-size: 3.5rem; margin-bottom: 16px; display: block; }
.book-title { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; margin-bottom: 6px; }
.book-cat { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }

/* ===== CONTACT ===== */
#contact {
  background: var(--cream);
  padding: 120px 5vw;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; }
.contact-info {}
.contact-detail { margin-top: 48px; display: flex; flex-direction: column; gap: 32px; }
.contact-item {}
.contact-item-label { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); margin-bottom: 8px; }
.contact-item-val { font-size: 1.05rem; color: var(--text-dark); line-height: 1.5; word-break: break-word; /* Stop long emails from overflowing */ }
.contact-item-val a { color: var(--forest); text-decoration: none; transition: color 0.25s; }
.contact-item-val a:hover { color: var(--forest-light); }
.contact-socials { display: flex; gap: 12px; margin-top: 48px; flex-wrap: wrap; /* Safe wrapping for icons */ }
.social-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--parchment); color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; text-decoration: none;
  border: 1px solid rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.social-btn:hover { background: var(--forest); color: white; transform: translateY(-3px); }
.contact-form-wrap {
  background: var(--forest);
  border-radius: 28px; padding: 48px;
}
.contact-form-wrap .form-field label { color: rgba(255,255,255,0.5); }
.contact-form-wrap .form-field input,
.contact-form-wrap .form-field textarea {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
  color: white;
}
.contact-form-wrap .form-field input::placeholder,
.contact-form-wrap .form-field textarea::placeholder { color: rgba(255,255,255,0.3); }
.contact-form-wrap .form-field input:focus,
.contact-form-wrap .form-field textarea:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(200,151,58,0.5);
  box-shadow: 0 0 0 3px rgba(200,151,58,0.1);
}
.contact-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--forest); border: none; border-radius: 16px;
  padding: 18px; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: none; transition: all 0.3s; margin-top: 8px;
}
.contact-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(200,151,58,0.4); }

/* ===== FOOTER ===== */
#footer,footer {
  background: #071a0f;
  color: rgba(255,255,255,0.5);
  padding: 80px 5vw 40px;
  overflow-x: hidden; /* Stop footer content from bleeding on desktop */
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 60px;
  margin-bottom: 64px;
}
.footer-brand {}
.footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; color: white; font-weight: 400; margin-bottom: 16px;
}
.footer-tagline { font-size: 0.85rem; line-height: 1.7; max-width: 260px; }
.footer-col-title {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.3); margin-bottom: 24px;
}
.footer-links { display: flex; flex-direction: column; gap: 14px; }
.footer-links a {
  color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 0.88rem; transition: color 0.25s;
}
.footer-links a:hover { color: white; }
.footer-newsletter {}
.newsletter-input-wrap {
  display: flex; margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; overflow: hidden;
}
.newsletter-input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: none; color: white; padding: 14px 18px;
  font-family: 'DM Sans', sans-serif; font-size: 0.85rem;
  outline: none;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-btn {
  background: var(--gold); color: var(--forest);
  border: none; padding: 14px 20px;
  font-size: 0.85rem; font-weight: 600; cursor: none;
  transition: background 0.25s;
}
.newsletter-btn:hover { background: var(--gold-light); }
.newsletter-note { font-size: 0.75rem; color: rgba(255,255,255,0.3); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; /* Allow footer text to wrap naturally on tiny screens */
  font-size: 0.78rem;
}
.footer-bottom-right { display: flex; gap: 24px; }
.footer-bottom-right a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.25s; }
.footer-bottom-right a:hover { color: rgba(255,255,255,0.7); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: all 0.8s cubic-bezier(.23,1,.32,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0; transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(.23,1,.32,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0; transform: translateX(40px);
  transition: all 0.8s cubic-bezier(.23,1,.32,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(7,26,15,0.95); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.lightbox-overlay.open { opacity: 1; pointer-events: all; }
.lightbox-inner { max-width: 900px; width: 90%; position: relative; }
.lightbox-inner img { width: 100%; border-radius: 20px; display: block; }
.lightbox-close {
  position: absolute; top: -48px; right: 0;
  background: none; border: none; color: white; font-size: 2rem;
  cursor: none; opacity: 0.7; transition: opacity 0.25s;
}
.lightbox-close:hover { opacity: 1; }

/* ===== SUCCESS STATE ===== */
.success-state {
  text-align: center; padding: 60px 40px;
}
.success-icon { font-size: 4rem; color: var(--gold); margin-bottom: 20px; display: block; }
.success-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; margin-bottom: 12px; color: var(--text-dark); }
.success-sub { color: var(--text-mid); font-size: 0.95rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .facilities-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .about-layout, .admissions-layout, .notices-grid, .contact-layout, .life-layout { grid-template-columns: 1fr; }
  .about-stat-card { left: 0; }
  .about-year-badge { right: 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(1) { grid-column: span 2; }
  .gallery-item:nth-child(4) { grid-column: span 1; }
  .career-grid { grid-template-columns: 1fr 1fr; }
  .welfare-grid { grid-template-columns: 1fr 1fr; }
  .library-grid { grid-template-columns: 1fr 1fr; }
  .library-header, .gallery-header { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .admit-facts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  nav { padding: 0 6vw; }
  .courses-grid { grid-template-columns: 1fr; }
  .career-grid { grid-template-columns: 1fr; }
  .welfare-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .facilities-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: span 1; }
  #about, #courses, #notices, #gallery, #admissions, #career, #life, #facilities, #welfare, #library, #contact { padding: 80px 6vw; }
  footer { padding: 60px 6vw 32px; }
  .hero-content { text-align: center; padding-bottom: 80px; }
  .hero-h1 { font-size: clamp(2.5rem, 10vw, 3rem); line-height: 1.15; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .btn-primary, .btn-outline { padding: 14px 28px; font-size: 0.85rem; }
  .hero-stats { display: none; }
  .scroll-indicator { display: none; }
  .admission-form { padding: 28px; }
  .contact-form-wrap { padding: 28px; }
  .about-pillars { grid-template-columns: 1fr; }
  .gallery-item:nth-child(1) { grid-column: span 1; grid-row: span 1; }
}

/* Disable cursor on touch devices */
@media (max-width: 900px), (pointer: coarse) {
  .cursor, .cursor-ring {
    display: none !important;
  }
  body, button, a, [onclick] {
    cursor: auto !important;
  }
}
