/* =============================================================
   Crystal Haven Academy – Main Stylesheet
   Stack: Bootstrap 5.3.8 + Custom CSS
   Author: Crystal Haven Academy Web Team
   Sections:
     00. CSS Custom Properties (Design Tokens)
     01. Base & Typography
     02. Utility Classes
     03. Skip Link
     04. Top Bar
     05. Navbar
     06. Hero Section
     07. Stats Strip
     08. Section Shared Styles
     09. About Section
     10. Programme Cards
     11. Why Choose Us
     12. Facility Cards
     13. Gallery Grid
     14. Admissions Section
     15. Contact Section
     16. Footer
     17. Back-to-Top Button
     18. Image Placeholders
     19. Animations & Transitions
     20. Responsive Overrides
   ============================================================= */

/* ---------------------------------------------------------------
   00. CSS Custom Properties (Design Tokens)
--------------------------------------------------------------- */
:root {
  /* Brand colours */
  --cha-navy:        #0d1f3c;
  --cha-navy-light:  #1a3561;
  --cha-gold:        #c9a84c;
  --cha-gold-light:  #e0c46a;
  --cha-gold-dark:   #a07c2e;
  --cha-white:       #ffffff;
  --cha-cream:       #f9f6f0;
  --cha-grey-light:  #f4f5f7;
  --cha-grey:        #6b7280;
  --cha-text:        #1f2937;

  /* Typography */
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-py: 5rem;

  /* Radius */
  --radius-sm:  0.5rem;
  --radius-md:  1rem;
  --radius-lg:  1.5rem;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.16);

  /* Transitions */
  --transition: 0.28s ease;
}

/* ---------------------------------------------------------------
   01. Base & Typography
--------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  color: var(--cha-text);
  background-color: var(--cha-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--cha-navy);
  line-height: 1.25;
}

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

a:hover {
  color: var(--cha-gold);
}

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

/* ---------------------------------------------------------------
   02. Utility Classes
--------------------------------------------------------------- */
.text-gold       { color: var(--cha-gold) !important; }
.text-navy       { color: var(--cha-navy) !important; }
.text-white-75   { color: rgba(255,255,255,.78); }
.bg-light-cream  { background-color: var(--cha-cream) !important; }

.btn-gold {
  background-color: var(--cha-gold);
  border-color: var(--cha-gold);
  color: var(--cha-navy);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.btn-gold:hover,
.btn-gold:focus-visible {
  background-color: var(--cha-gold-dark);
  border-color: var(--cha-gold-dark);
  color: var(--cha-white);
  box-shadow: 0 4px 16px rgba(201,168,76,.4);
}

.btn-navy {
  background-color: var(--cha-navy);
  border-color: var(--cha-navy);
  color: var(--cha-white);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background-color var(--transition), box-shadow var(--transition);
}
.btn-navy:hover,
.btn-navy:focus-visible {
  background-color: var(--cha-navy-light);
  border-color: var(--cha-navy-light);
  color: var(--cha-white);
  box-shadow: 0 4px 16px rgba(13,31,60,.35);
}

/* ---------------------------------------------------------------
   03. Skip Link
--------------------------------------------------------------- */
.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--cha-gold);
  color: var(--cha-navy);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------
   04. Top Bar
--------------------------------------------------------------- */
.top-bar {
  background-color: var(--cha-navy);
  color: rgba(255,255,255,.75);
  font-size: 0.82rem;
  padding: 0.45rem 0;
  letter-spacing: 0.01em;
}

.top-bar-link {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: color var(--transition);
}
.top-bar-link:hover {
  color: var(--cha-gold);
}

/* ---------------------------------------------------------------
   05. Navbar
--------------------------------------------------------------- */
.cha-navbar {
  background-color: var(--cha-navy);
  padding: 0.9rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  transition: padding var(--transition), box-shadow var(--transition);
}

.cha-navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
}

/* Brand logo placeholder */
.brand-logo-placeholder {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--cha-gold) 0%, var(--cha-gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cha-navy);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand-logo-placeholder--sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 0.75rem;
}

.brand-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--cha-white);
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--cha-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cha-navbar .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.4rem 0.75rem !important;
  position: relative;
  transition: color var(--transition);
}

.cha-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--cha-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  border-radius: 2px;
}

.cha-navbar .nav-link:hover,
.cha-navbar .nav-link.active {
  color: var(--cha-gold) !important;
}

.cha-navbar .nav-link:hover::after,
.cha-navbar .nav-link.active::after {
  transform: scaleX(1);
}

/* Mobile nav */
@media (max-width: 991.98px) {
  .cha-navbar .navbar-collapse {
    background-color: var(--cha-navy-light);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.75rem;
  }
  .cha-navbar .nav-link::after { display: none; }
  .cha-navbar .nav-link {
    padding: 0.6rem 0.5rem !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .cha-navbar .nav-item:last-child .nav-link { border-bottom: none; }
  .cha-navbar .btn-gold { width: 100%; text-align: center; margin-top: 0.5rem; }
}

/* ---------------------------------------------------------------
   06. Hero Section
--------------------------------------------------------------- */

.hero-section {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      rgba(13, 31, 60, 0.72),
      rgba(13, 31, 60, 0.78)
    ),
    url("../images/school-building.jpg") center center / cover no-repeat;
  overflow: hidden;
}


/* Decorative geometric background shapes */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 80% 20%, rgba(201,168,76,.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(201,168,76,.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Pattern overlay */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-overlay {
  display: none; /* Used when a real background image is set */
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 2rem 1rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cha-gold);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--cha-white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.hero-subtext {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.85);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-cta .btn {
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  z-index: 2;
  transition: color var(--transition);
}
.hero-scroll-indicator:hover { color: var(--cha-gold); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* When a real hero image is available:
   .hero-section {
     background-image: url('../images/hero-bg.jpg');
     background-size: cover;
     background-position: center;
   }
   .hero-overlay {
     display: block;
     position: absolute;
     inset: 0;
     background: rgba(13,31,60,.65);
   }
*/

/* ---------------------------------------------------------------
   07. Stats Strip
--------------------------------------------------------------- */
.stats-strip {
  background: linear-gradient(90deg, var(--cha-gold-dark) 0%, var(--cha-gold) 50%, var(--cha-gold-dark) 100%);
  padding: 1.5rem 0;
}

.stat-item {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border-right: 1px solid rgba(13,31,60,.15);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cha-navy);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cha-navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------
   08. Section Shared Styles
--------------------------------------------------------------- */
.section-padding {
  padding: var(--section-py) 0;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cha-gold);
  margin-bottom: 0.6rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--cha-navy);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--cha-grey);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ---------------------------------------------------------------
   09. About Section
--------------------------------------------------------------- */

.about-image-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0;
}


.about-img-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}



.about-img-accent {
  position: relative;
  bottom: auto;
  right: auto;
  width: 100%;
  aspect-ratio: 4/3;
  margin-left: auto;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.about-img-main,
.about-img-accent {
  position: relative;
}

.about-img-main img,
.about-img-accent img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.about-badge {
  position: absolute;
  top: 1.5rem;
  right: -0.5rem;
  background: linear-gradient(135deg, var(--cha-gold) 0%, var(--cha-gold-dark) 100%);
  color: var(--cha-navy);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  line-height: 1.3;
  z-index: 2;
}
.about-badge i {
  font-size: 1.6rem;
}

.section-body {
  color: var(--cha-grey);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-pillars li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pillar-icon {
  min-width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--cha-navy) 0%, var(--cha-navy-light) 100%);
  color: var(--cha-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.about-pillars li strong {
  display: block;
  color: var(--cha-navy);
  margin-bottom: 0.15rem;
  font-size: 0.98rem;
}

.about-pillars li p {
  font-size: 0.9rem;
  color: var(--cha-grey);
  margin: 0;
}

/* ---------------------------------------------------------------
   10. Programme Cards
--------------------------------------------------------------- */
.programme-card {
  background: var(--cha-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.programme-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.programme-icon-wrap {
  width: 60px;
  height: 60px;
  background-color: var(--prog-color, #f0f0f0);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.programme-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cha-gold-dark);
  background-color: rgba(201,168,76,.12);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
}

.programme-title {
  font-size: 1.25rem;
  color: var(--cha-navy);
  margin-bottom: 0.6rem;
}

.programme-desc {
  font-size: 0.93rem;
  color: var(--cha-grey);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.programme-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cha-navy);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition), color var(--transition);
  margin-top: auto;
}

.programme-link:hover {
  color: var(--cha-gold);
  gap: 0.6rem;
}

/* ---------------------------------------------------------------
   11. Why Choose Us
--------------------------------------------------------------- */
.why-section {
  background: linear-gradient(
    135deg,
    var(--cha-navy) 0%,
    var(--cha-navy-light) 100%
  );
  position: relative;
  overflow: hidden;
}

.why-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.why-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  color: var(--cha-white);
  transition: background var(--transition), transform var(--transition);
  height: 100%;
}

.why-card:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-4px);
}

.why-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--cha-gold) 0%, var(--cha-gold-dark) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--cha-navy);
  margin-bottom: 1.1rem;
}

.why-card h3 {
  font-size: 1.1rem;
  color: var(--cha-white);
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.93rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  margin: 0;
}

/* ---------------------------------------------------------------
   12. Facility Cards
--------------------------------------------------------------- */
.facility-card {
  background: var(--cha-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.06);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.facility-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.facility-img {
  aspect-ratio: 16/9;
  flex-shrink: 0;
}

.facility-body {
  padding: 1.4rem 1.5rem;
  flex-grow: 1;
}

.facility-icon {
  font-size: 1.5rem;
  color: var(--cha-gold);
  display: block;
  margin-bottom: 0.6rem;
}

.facility-body h3 {
  font-size: 1.1rem;
  color: var(--cha-navy);
  margin-bottom: 0.5rem;
}

.facility-body p {
  font-size: 0.9rem;
  color: var(--cha-grey);
  margin: 0;
  line-height: 1.65;
}

/* ---------------------------------------------------------------
   13. Gallery Grid
--------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item .img-placeholder {
  aspect-ratio: 4/3;
  transition: transform 0.4s ease;
}

.gallery-item--large {
  grid-column: span 1;
  grid-row: span 2;
}

.gallery-item--large .img-placeholder {
  aspect-ratio: unset;
  height: 100%;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,31,60,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--cha-white);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .img-placeholder { transform: scale(1.04); }

@media (max-width: 767.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item--large {
    grid-column: span 2;
    grid-row: span 1;
  }
  .gallery-item--large .img-placeholder {
    aspect-ratio: 16/7;
    height: auto;
  }
}

.gallery-item .img-placeholder {
  position: relative;
}
.gallery-item .img-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 479.98px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item--large {
    grid-column: span 1;
  }
}

/* ---------------------------------------------------------------
   14. Admissions Section
--------------------------------------------------------------- */
.admissions-section {
  background: linear-gradient(
    135deg,
    var(--cha-navy-light) 0%,
    var(--cha-navy) 100%
  );
  padding: var(--section-py) 0;
  position: relative;
  overflow: hidden;
}

.admissions-section::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
  pointer-events: none;
}

.admissions-steps {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.adm-step {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.adm-step-num {
  min-width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--cha-gold) 0%, var(--cha-gold-dark) 100%);
  color: var(--cha-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-serif);
  flex-shrink: 0;
}

.adm-step strong {
  display: block;
  color: var(--cha-white);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.adm-step p {
  font-size: 0.9rem;
  color: rgba(255,255,255,.72);
  margin: 0;
  line-height: 1.6;
}

.admissions-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(201,168,76,.4);
}

/* ---------------------------------------------------------------
   15. Contact Section
--------------------------------------------------------------- */
.contact-card {
  background: var(--cha-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.07);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--cha-navy) 0%, var(--cha-navy-light) 100%);
  color: var(--cha-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 1rem;
}

.contact-card h3 {
  font-size: 1.05rem;
  color: var(--cha-navy);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--cha-grey);
  line-height: 1.65;
  margin: 0;
}

.contact-card a {
  color: var(--cha-grey);
}
.contact-card a:hover { color: var(--cha-navy); }

.contact-form-wrap {
  background: var(--cha-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,.07);
}

.contact-form-wrap h3 {
  font-size: 1.5rem;
  color: var(--cha-navy);
}

.form-control,
.form-select {
  border: 1.5px solid #e0e4ea;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: var(--cha-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--cha-navy);
  box-shadow: 0 0 0 3px rgba(13,31,60,.12);
  outline: none;
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--cha-text);
  margin-bottom: 0.4rem;
}

.map-placeholder {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 380px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.07);
}

/* Map embed — replaces the placeholder once a real embed is in place */
.map-section {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,.08);
}

.map-embed-wrap {
  position: relative;
  width: 100%;
  /* 16:5 aspect ratio on desktop — tall enough to be useful */
  padding-bottom: 38%;
  height: 0;
  overflow: hidden;
}

.map-embed-wrap iframe.map-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-directions-bar {
  background-color: var(--cha-navy);
  padding: 1rem 1.5rem;
}

.map-address-line {
  font-size: 0.9rem;
  color: rgba(255,255,255,.8);
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.map-address-line i {
  color: var(--cha-gold);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.btn-directions {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
}

/* Responsive — taller map on smaller screens where the aspect ratio
   would otherwise produce a very short, unusable map */
@media (max-width: 991.98px) {
  .map-embed-wrap {
    padding-bottom: 56%;   /* closer to 16:9 on tablet */
  }
}

@media (max-width: 575.98px) {
  .map-embed-wrap {
    padding-bottom: 75%;   /* portrait-friendly height on mobile */
  }
  .map-directions-bar {
    padding: 0.9rem 1rem;
  }
}

/* ---------------------------------------------------------------
   16. Footer
--------------------------------------------------------------- */
.site-footer {
  background-color: var(--cha-navy);
  color: rgba(255,255,255,.75);
}

.footer-top {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cha-white);
  line-height: 1.2;
}

.footer-brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cha-gold);
}

.footer-about {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.75);
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition);
}

.social-link:hover {
  background: var(--cha-gold);
  color: var(--cha-navy);
  border-color: var(--cha-gold);
}

.footer-heading {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cha-white);
  margin-bottom: 1.1rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--cha-gold);
  border-radius: 2px;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition), padding-left var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-links a:hover {
  color: var(--cha-gold);
  padding-left: 4px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,.65);
}

.footer-contact-list i {
  color: var(--cha-gold);
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.footer-contact-list a {
  color: rgba(255,255,255,.65);
}
.footer-contact-list a:hover { color: var(--cha-gold); }

.footer-bottom {
  padding: 1.2rem 0;
  font-size: 0.83rem;
  color: rgba(255,255,255,.45);
}

/* ---------------------------------------------------------------
   17. Back-to-Top Button
--------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--cha-gold);
  border: none;
  border-radius: 50%;
  color: var(--cha-navy);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(201,168,76,.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--cha-gold-dark);
  color: var(--cha-white);
}

/* ---------------------------------------------------------------
   18. Image Placeholders
--------------------------------------------------------------- */
.img-placeholder {
  background: linear-gradient(135deg, #e8ecf0 0%, #d1d8e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  position: relative;
}

.img-placeholder .placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #8fa0b4;
  user-select: none;
}

.img-placeholder .placeholder-inner i {
  font-size: 2.5rem;
  opacity: 0.5;
}

.img-placeholder .placeholder-inner span {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ---------------------------------------------------------------
   19. Animations & Transitions
--------------------------------------------------------------- */
/* Fade-in-up on scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: none; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in-up,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------
   20. Responsive Overrides
--------------------------------------------------------------- */

/* Tablet */
@media (max-width: 991.98px) {
  :root { --section-py: 4rem; }

  .about-image-stack {
    padding-bottom: 2.5rem;
    padding-right: 2.5rem;
  }

  .about-img-accent {
    width: 50%;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  :root { --section-py: 3rem; }

  .about-image-stack {
    padding-bottom: 3rem;
    padding-right: 2rem;
  }

  .about-img-accent {
    width: 48%;
  }

  .contact-form-wrap {
    padding: 1.5rem;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(13,31,60,.15);
    padding: 0.75rem;
  }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(13,31,60,.15); }
  .stat-item:last-child,
  .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

/* Small mobile */
@media (max-width: 479.98px) {
  .hero-heading { font-size: 2rem; }
  .about-img-accent { display: none; }
  .about-badge { top: auto; right: auto; bottom: 1rem; left: 50%; transform: translateX(-50%); flex-direction: row; }
}

/* ---------------------------------------------------------------
   21. Official logo rules
   ───────────────────────────────────────────────────────────────
   The logo is a JPEG with a white background (719 × 707 px,
   near-square). A white container with padding and a subtle
   border-radius makes the white background look intentional
   against the dark navy header and footer.
   object-fit: contain keeps the full logo visible with its
   original proportions — no cropping, no stretching.
   No colour filters are applied.
--------------------------------------------------------------- */

/* Container — provides the white background, padding and rounding */
.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 4px;
  width: 56px;      /* image 48px + 4px padding each side */
  height: 56px;
}

/* Smaller variant used in the footer */
.brand-logo-wrap--sm {
  width: 48px;
  height: 48px;
  padding: 3px;
}

/* The image itself — natural colours, no blend mode, no filters */
.brand-logo-img {
  width: 48px;
  height: 48px;
  min-width: 48px;
  object-fit: contain;
  object-position: center;
  display: block;
  flex-shrink: 0;
  mix-blend-mode: normal;
}

.brand-logo-img--sm {
  width: 42px;
  height: 42px;
  min-width: 42px;
}

/* ---------------------------------------------------------------
   22. WhatsApp Links
--------------------------------------------------------------- */

/* WhatsApp-coloured text links (contact card, form alert) */
.wa-link {
  color: #128c7e;        /* WhatsApp teal */
  text-decoration: none;
  transition: color var(--transition);
}
.wa-link:hover {
  color: #075e54;        /* darker WhatsApp green on hover */
}
.wa-link i {
  font-size: 0.95em;
}

/* Top-bar WhatsApp links get the same hover treatment as other top-bar links
   but with a subtle green tint on hover to distinguish them from the phone icon */
.top-bar-wa {
  color: rgba(255,255,255,.8);
}
.top-bar-wa:hover {
  color: #5dffa2;        /* light green — readable against the dark navy top bar */
}

/* Separator in the top bar between contact items */
.top-bar-sep {
  color: rgba(255,255,255,.35);
  margin: 0 0.1rem;
  user-select: none;
}

/* WhatsApp contact icon on the contact card — green background variant */
.contact-icon--wa {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: var(--cha-white);
}

/* ---------------------------------------------------------------
   23. Inner-page banner (used on all secondary pages)
--------------------------------------------------------------- */
.page-banner {
  background: linear-gradient(
    135deg,
    var(--cha-navy) 0%,
    var(--cha-navy-light) 60%,
    #1e3a5f 100%
  );
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

/* Subtle radial glow identical to hero decorative layer */
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 85% 30%, rgba(201,168,76,.14) 0%, transparent 60%),
    radial-gradient(ellipse 35% 50% at 10% 80%, rgba(201,168,76,.07) 0%, transparent 55%);
  pointer-events: none;
}

/* Same crosshatch pattern used in the hero */
.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/G%3E%3C/svg%3E");
  pointer-events: none;
}

.page-banner-content {
  position: relative;
  z-index: 2;
}

.page-banner-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cha-gold);
  margin-bottom: 0.6rem;
}

.page-banner-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--cha-white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.page-banner-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,.8);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Breadcrumb inside banner */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(255,255,255,.6);
  margin-bottom: 1rem;
}
.page-breadcrumb a {
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}
.page-breadcrumb a:hover { color: var(--cha-gold); }
.page-breadcrumb .bc-sep { color: rgba(255,255,255,.35); }
.page-breadcrumb .bc-current { color: var(--cha-gold); }

/* ---------------------------------------------------------------
   24. Programme detail sections (academics.html)
--------------------------------------------------------------- */
.programme-detail {
  padding: var(--section-py) 0;
}
.programme-detail + .programme-detail {
  border-top: 1px solid rgba(0,0,0,.07);
}
.programme-detail .prog-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}
.programme-detail .prog-features {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.programme-detail .prog-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--cha-grey);
}
.programme-detail .prog-features li i {
  color: var(--cha-gold);
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------
   25. Gallery page grid
--------------------------------------------------------------- */
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-page-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8ecf0 0%, #d1d8e0 100%);
}
.gallery-page-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,31,60,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--cha-white);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-page-item:hover .gallery-overlay { opacity: 1; }
.gallery-page-item .placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #8fa0b4;
}
.gallery-page-item .placeholder-inner i { font-size: 2rem; opacity: .5; }
.gallery-page-item .placeholder-inner span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .6;
}
@media (max-width: 767.98px) {
  .gallery-page-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 479.98px) {
  .gallery-page-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   26. Admissions steps (admissions.html full page)
--------------------------------------------------------------- */
.adm-timeline {
  position: relative;
  padding-left: 3.5rem;
}
.adm-timeline::before {
  content: '';
  position: absolute;
  left: 1.3rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--cha-gold), var(--cha-gold-dark));
  border-radius: 2px;
}
.adm-tl-step {
  position: relative;
  margin-bottom: 2rem;
}
.adm-tl-step:last-child { margin-bottom: 0; }
.adm-tl-num {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--cha-gold), var(--cha-gold-dark));
  color: var(--cha-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-serif);
  flex-shrink: 0;
  z-index: 1;
}
.adm-tl-body strong {
  display: block;
  color: var(--cha-navy);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.adm-tl-body p {
  font-size: 0.93rem;
  color: var(--cha-grey);
  margin: 0;
  line-height: 1.65;
}

/* Requirements list */
.req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.req-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--cha-grey);
}
.req-list li i {
  color: var(--cha-gold);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------
   27. Contact page
--------------------------------------------------------------- */
.contact-info-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-block .ci-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--cha-navy), var(--cha-navy-light));
  color: var(--cha-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.contact-info-block .ci-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--cha-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.contact-info-block .ci-value {
  font-size: 0.95rem;
  color: var(--cha-grey);
  line-height: 1.6;
}
.contact-info-block .ci-value a {
  color: var(--cha-grey);
}
.contact-info-block .ci-value a:hover { color: var(--cha-navy); }



/* ==========================================
   GLOBAL IMAGE HOVER EFFECTS
========================================== */

img {
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

img:hover {
  transform: scale(1.04);
}

/* Image containers */
.about-img-main,
.about-img-accent {
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
}

.about-img-main:hover,
.about-img-accent:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(13, 31, 60, 0.18);
}

/* Respect visitors who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  img,
  .about-img-main,
  .about-img-accent {
    transition: none;
  }

  img:hover,
  .about-img-main:hover,
  .about-img-accent:hover {
    transform: none;
  }
}

.facility-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.facility-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
