/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design System)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lora:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
  /* Colors */
  --color-primary: #1C3D5E;
  --color-primary-foreground: #FFFFFF;
  --color-accent: #2E7D5B;
  --color-accent-soft: #E7F5EC;
  --color-accent-foreground: #FFFFFF;
  --color-background: #FDFDFB;
  --color-secondary: #F4F6F5;
  --color-card: #FFFFFF;
  --color-foreground: #16202A;
  --color-muted-foreground: #5C6670;
  --color-border: #E3E7E5;
  --color-error: #d32f2f;

  /* Typography */
  --font-heading: 'Lora', serif;
  --font-body: 'Inter', sans-serif;

  /* Shapes & Elevation */
  --radius-card: 1.25rem;
  --radius-pill: 9999px;
  --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-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Layout */
  --container-width: 1200px;
  --transition: all 0.3s ease;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-foreground);
  background-color: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--color-muted-foreground); }

/* Layout Utilities */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-padding { padding: 5rem 0; }
@media (min-width: 1024px) { .section-padding { padding: 7rem 0; } }

.bg-secondary { background-color: var(--color-secondary); }
.bg-primary { background-color: var(--color-primary); color: var(--color-primary-foreground); }
.bg-primary h2, .bg-primary p { color: var(--color-primary-foreground); }

.text-center { text-align: center; }

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-accent-foreground);
}
.btn-accent:hover { background-color: #236347; transform: translateY(-2px); }

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
}
.btn-primary:hover { background-color: #122a42; transform: translateY(-2px); }

.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background-color: var(--color-primary); color: var(--color-primary-foreground); }

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   SHARED COMPONENTS
   ========================================================================== */
/* Header & Nav */
.site-header {
  position: fixed;
  top: 1rem;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  width: 95%;
  max-width: var(--container-width);
  margin: 0 auto;
  background-color: var(--color-card);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo img { width: 32px; height: 32px; object-fit: contain; }
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.25rem;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .main-nav { display: flex; } }

.main-nav a.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}
.main-nav a.nav-link:hover { color: var(--color-primary); }
.main-nav a.nav-link.active {
  color: var(--color-primary);
}
.main-nav a.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
@media (min-width: 1024px) { .mobile-menu-toggle { display: none; } }

/* Mobile Menu Panel */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100vh;
  background: var(--color-card);
  z-index: 1001;
  padding: 5rem 2rem;
  box-shadow: var(--shadow-hover);
  transition: left 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-menu.open { left: 0; }
.mobile-menu a { font-size: 1.25rem; font-weight: 500; }
.mobile-menu .btn { margin-top: 1rem; width: max-content; }
.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  padding: 4rem 0 2rem;
  border-top: 4px solid var(--color-accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 { color: var(--color-primary-foreground); font-size: 1.125rem; margin-bottom: 1.5rem; }
.footer-col p { color: #a3b8cc; font-size: 0.9rem; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul a { color: #a3b8cc; font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--color-accent); }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a svg { width: 24px; height: 24px; fill: currentColor; }
.social-links a:hover { color: var(--color-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  font-size: 0.875rem;
  color: #a3b8cc;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* Cards (Programs, Blog, etc) */
.card {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.icon-box {
  width: 48px;
  height: 48px;
  background-color: var(--color-accent-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.icon-box svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-accent);
  stroke-width: 2;
  fill: none;
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.9rem; }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.form-error { color: var(--color-error); font-size: 0.8rem; margin-top: 0.25rem; display: none; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* Page Header Band */
.page-header {
  background-color: var(--color-primary);
  color: white;
  padding: 10rem 0 4rem; /* accounts for sticky nav */
  text-align: center;
}
.breadcrumb { font-size: 0.875rem; color: #a3b8cc; margin-bottom: 1rem; }
.page-header h1 { color: white; margin-bottom: 0; }

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   PAGE-SPECIFIC STYLES
   ========================================================================== */
/* Home Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(28,61,94,0.7), rgba(28,61,94,0.8)), url('assets/hero-image.jpg') center/cover;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}
.hero-content {
  max-width: 700px;
  color: white;
}
.hero h1 { color: white; }
.hero h1 span { color: var(--color-accent); display: block; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  padding: 0.25rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* Stats Bar */
.stats-bar {
  background-color: var(--color-primary);
  padding: 3rem 0;
  color: white;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-item h3 { color: white; font-size: 2rem; margin-bottom: 0.5rem; }

/* Marquees */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 2rem 0;
  background: var(--color-background);
}
.marquee-container::before, .marquee-container::after {
  content: '';
  position: absolute;
  top: 0; width: 100px; height: 100%;
  z-index: 2;
}
.marquee-container::before {
  left: 0; background: linear-gradient(to right, var(--color-background), transparent);
}
.marquee-container::after {
  right: 0; background: linear-gradient(to left, var(--color-background), transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollLeft 30s linear infinite;
}
.marquee-track.reverse { animation: scrollRight 40s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

.text-marquee .marquee-track {
  gap: 2rem; align-items: center; font-size: 1.5rem; font-family: var(--font-heading); color: var(--color-primary);
}
.text-marquee .star { color: var(--color-accent); font-size: 1rem; }

.image-marquee .marquee-track { gap: 1rem; padding-bottom: 1rem; }
.image-marquee img {
  height: 250px; width: 350px; object-fit: cover;
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
  .image-marquee img { width: 100%; height: auto; margin-bottom: 1rem;}
}

@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scrollRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 992px) { .split-section { grid-template-columns: 1fr 1fr; } }
.split-img { border-radius: var(--radius-card); box-shadow: var(--shadow-md); }

/* Blog Cards */
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.blog-card-top { height: 4px; background-color: var(--color-accent); width: 100%; }
.blog-card-content { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-tag { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--color-accent); margin-bottom: 0.5rem; }
.blog-footer {
  margin-top: auto; padding-top: 1.5rem; border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; color: var(--color-muted-foreground);
}
.blog-footer svg { width: 16px; height: 16px; margin-right: 0.5rem; vertical-align: middle; }

/* Filter Bar */
.filter-bar {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem; border-radius: var(--radius-pill); border: 1px solid var(--color-primary);
  background: transparent; color: var(--color-primary); font-family: var(--font-body); cursor: pointer; transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: white; }

/* Gallery Masonry */
.gallery-grid {
  column-count: 1; column-gap: 1.5rem;
}
@media (min-width: 640px) { .gallery-grid { column-count: 2; } }
@media (min-width: 1024px) { .gallery-grid { column-count: 3; } }

.gallery-item {
  break-inside: avoid; margin-bottom: 1.5rem; position: relative; border-radius: var(--radius-card); overflow: hidden; cursor: pointer;
}
.gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.gallery-overlay {
  position: absolute; inset: 0; background: rgba(28,61,94,0.7); opacity: 0; transition: opacity 0.3s ease;
  display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; text-align: center; padding: 1rem;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item.hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-img { max-width: 90%; max-height: 80vh; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.lightbox-caption { color: white; margin-top: 1rem; font-size: 1.125rem; }
.lightbox-close { position: absolute; top: 2rem; right: 2rem; background: none; border: none; color: white; font-size: 3rem; cursor: pointer; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; color: white; font-size: 2rem; padding: 1rem; cursor: pointer; border-radius: 50%; }
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

/* Timeline */
.timeline { border-left: 2px solid var(--color-primary); padding-left: 2rem; margin-top: 2rem; }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.35rem; top: 0.25rem; width: 12px; height: 12px; background: var(--color-accent); border-radius: 50%; border: 3px solid var(--color-background);
}
.timeline-year { font-weight: 700; color: var(--color-primary); font-size: 1.25rem; margin-bottom: 0.25rem; }

/* Program List Details */
.program-block { padding: 5rem 0; border-bottom: 1px solid var(--color-border); }
.program-block:last-child { border-bottom: none; }
.program-list { margin: 1.5rem 0; padding-left: 0; }
.program-list li { position: relative; padding-left: 2rem; margin-bottom: 0.75rem; }
.program-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--color-accent); font-weight: bold;
}

/* Accordion (FAQ) */
.accordion-item { border: 1px solid var(--color-border); border-radius: 0.5rem; margin-bottom: 1rem; overflow: hidden; }
.accordion-header {
  width: 100%; padding: 1.25rem; text-align: left; background: var(--color-card); border: none;
  font-family: var(--font-heading); font-size: 1.125rem; color: var(--color-primary); font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; border-left: 4px solid transparent; transition: var(--transition);
}
.accordion-header.active { border-left-color: var(--color-accent); }
.accordion-icon { transition: transform 0.3s ease; }
.accordion-header.active .accordion-icon { transform: rotate(180deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; background: var(--color-card); }
.accordion-header.active + .accordion-body { padding: 0 1.25rem 1.25rem; max-height: 500px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.page-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--color-border); color: var(--color-primary); font-weight: 600;
}
.page-btn.active, .page-btn:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* Utility */
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }