/* ===================================================
   PIARIST FATHERS VICE PROVINCE OF INDIA
   Global Styles & Design Tokens
   Two-Font Typography System:
   • Manrope: Major visual headings & titles
   • Plus Jakarta Sans: Body text, navigation, buttons, labels
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors - Don Bosco College Bengaluru Inspired Institutional Palette */
  --navy:        #081d36;      /* Deep Institutional Navy */
  --navy-dark:   #051224;      /* Midnight Blue */
  --navy-light:  #0d2847;      /* Rich Royal Navy */
  --blue:        #00558f;      /* Don Bosco Academic Blue */
  --mid-blue:    #0266b3;      /* Vibrant Blue */
  --bright-blue: #0284c7;      /* Sky Accent Blue */
  --teal:        #007a87;
  --light-teal:  #0284c7;
  --gold:        #d49b20;      /* Institutional Gold / Ochre */
  --gold-hover:  #c08b15;      /* Darker Gold on hover */
  --light-gold:  #f0b238;      /* Bright Gold for dark backgrounds */
  --pale-gold:   #fef3c7;      /* Warm Tint */
  --white:       #ffffff;      /* Pure Crisp White */
  --off-white:   #f8fafc;      /* Clean Off-White */
  --cream:       #f0f4f8;      /* Clean Academic Light Blue-Gray */
  --dark:        #081d36;      /* Deep Institutional Navy */
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-500:    #475569;      /* Highly readable subtitle gray */
  --gray-600:    #334155;
  --gray-700:    #1e293b;      /* High contrast dark body text */
  --gray-800:    #0f172a;      /* Ultra high contrast heading text */

  /* Gradients */
  --grad-hero:        linear-gradient(135deg, #051224 0%, #081d36 45%, #00558f 100%);
  --grad-gold:        linear-gradient(135deg, #d49b20, #f0b238, #d49b20);
  --grad-blue-gold:   linear-gradient(135deg, #081d36 0%, #00558f 60%, #d49b20 100%);
  --grad-card:        linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));

  /* Two-Font Typography System */
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:   'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-gap: 96px;
  --container-max: 1280px;

  /* Shadows */
  --shadow-sm:  0 2px 6px rgba(8, 29, 54, 0.06);
  --shadow-md:  0 6px 20px rgba(8, 29, 54, 0.1);
  --shadow-lg:  0 14px 40px rgba(8, 29, 54, 0.16);
  --shadow-gold:0 6px 25px rgba(212, 155, 32, 0.3);

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Transitions */
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Typography Scale (Manrope Headings / Plus Jakarta Sans Body) --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.6vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 600; }
h4 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 600; }
h5 { font-size: 1.15rem; font-weight: 600; }
h6 { font-size: 1.05rem; font-weight: 600; }

p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--gray-700);
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--gray-700);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* --- Section Layout --- */
.section {
  padding: var(--section-gap) 0;
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--cream {
  background: var(--cream);
}

.section--blue {
  background: var(--blue);
  color: var(--white);
}

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '─ ';
}

.section-title {
  margin-bottom: 1.25rem;
}

.section-title span {
  color: var(--gold);
}

.section-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  color: var(--gray-500);
  max-width: 680px;
  line-height: 1.8;
}

.section-header {
  margin-bottom: 4rem;
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  opacity: 0;
  transition: var(--transition);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 85, 143, 0.3);
}

.btn-primary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: var(--light-gold);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 155, 32, 0.4);
}

.btn-outline {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: transparent;
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: var(--cream);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-ghost {
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
  font-weight: 600;
}

.btn-ghost:hover {
  border-color: var(--light-gold);
  color: var(--light-gold);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
}

/* Primary Card (Navy background, crisp white text) */
.card-primary,
.card-navy {
  background: var(--navy) !important;
  color: var(--white) !important;
  border: 1px solid rgba(212, 155, 32, 0.3) !important;
}

.card-primary .card-title,
.card-navy .card-title {
  color: var(--white) !important;
  font-weight: 700;
}

.card-primary .card-text,
.card-navy .card-text {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.98rem;
}

/* Featured Card (Warm Gold background, Navy text) */
.card-featured,
.card-gold {
  background: var(--gold) !important;
  color: var(--navy) !important;
  border: 1px solid rgba(8, 29, 54, 0.25) !important;
}

.card-featured .card-title,
.card-gold .card-title {
  color: var(--navy) !important;
  font-weight: 700;
}

.card-featured .card-text,
.card-gold .card-text {
  color: var(--navy) !important;
  font-weight: 500;
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card-body {
  padding: 2rem 1.75rem;
}

.card-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
}

.card-primary .card-label,
.card-navy .card-label {
  color: var(--light-gold) !important;
}

.card-featured .card-label,
.card-gold .card-label {
  color: var(--navy) !important;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.card-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--gray-700);
  line-height: 1.75;
}

/* --- Grid Layouts --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- Page Hero --- */
.page-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  background: var(--grad-hero);
  position: relative;
  overflow: hidden;
  padding: 10rem 0 5.5rem;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/pattern-cross.svg') repeat;
  opacity: 0.03;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--white));
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero-label {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-hero-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--light-gold);
}

.page-hero h1 {
  font-family: var(--font-heading);
  color: var(--white);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.page-hero .lead {
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.8;
  max-width: 680px;
}

/* --- Divider --- */
.divider {
  width: 80px;
  height: 3px;
  background: var(--grad-gold);
  border-radius: 2px;
  margin: 1.5rem 0;
}

.divider--center {
  margin: 1.5rem auto;
}

/* --- Quote Block --- */
.quote-block {
  position: relative;
  padding: 2.5rem 3rem;
  border-left: 4px solid var(--blue);
  background: var(--cream);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quote-block::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 800;
  color: var(--blue);
  opacity: 0.12;
  position: absolute;
  top: -1.2rem;
  left: 1.5rem;
  line-height: 1;
}

.quote-block blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-style: italic;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.quote-block cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-style: normal;
}

/* --- Stat Item --- */
.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

/* --- Gold Accent Line --- */
.gold-accent {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gold-accent::before,
.gold-accent::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

.gold-accent span {
  font-size: 1.5rem;
}

/* --- Tag / Badge --- */
.badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201,162,39,0.12);
  color: var(--gold);
  border: 1px solid rgba(201,162,39,0.3);
}

/* --- Back to Top --- */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 900;
  font-size: 1.1rem;
}

.back-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-top:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

/* --- Institutional Full-Screen Page Loader --- */
.loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 45%, #0c274c 0%, #06152b 55%, #020a14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 2rem;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.65s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 178, 56, 0.08) 0%, rgba(0, 85, 143, 0.15) 40%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: loaderGlowPulse 4s ease-in-out infinite;
}

.loader-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.loader-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
}

.loader-particle.p1 { width: 4px; height: 4px; left: 20%; top: 75%; animation: particleFloat 3.5s ease-in-out infinite 0.2s; }
.loader-particle.p2 { width: 5px; height: 5px; left: 78%; top: 70%; animation: particleFloat 4s ease-in-out infinite 0.8s; }
.loader-particle.p3 { width: 3px; height: 3px; left: 35%; top: 85%; animation: particleFloat 3.8s ease-in-out infinite 1.2s; }
.loader-particle.p4 { width: 5px; height: 5px; left: 65%; top: 80%; animation: particleFloat 4.2s ease-in-out infinite 0.5s; }
.loader-particle.p5 { width: 4px; height: 4px; left: 50%; top: 90%; animation: particleFloat 3.6s ease-in-out infinite 1.5s; }
.loader-particle.p6 { width: 3px; height: 3px; left: 85%; top: 60%; animation: particleFloat 3.9s ease-in-out infinite 1.0s; }

.loader-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.loader-logo-wrap {
  position: relative;
  margin-bottom: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loaderLogoIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loader-logo-halo {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 178, 56, 0.25) 0%, rgba(0, 85, 143, 0.3) 50%, transparent 70%);
  filter: blur(10px);
  animation: loaderHaloPulse 3s ease-in-out infinite;
  pointer-events: none;
}

.loader-logo-img {
  width: clamp(140px, 20vw, 200px);
  height: clamp(140px, 20vw, 200px);
  border-radius: 50%;
  object-fit: contain;
  display: block;
  border: 3px solid rgba(240, 178, 56, 0.65);
  box-shadow: 0 0 35px rgba(240, 178, 56, 0.28), 0 15px 45px rgba(0, 0, 0, 0.6);
}

.loader-taglines {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  animation: loaderTaglineIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.loader-bullet {
  color: var(--gold);
  font-size: 0.8rem;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.9;
  text-shadow: 0 0 8px rgba(240, 178, 56, 0.6);
}

.loader-join {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 2.25rem;
  animation: loaderJoinIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
  text-shadow: 0 0 25px rgba(240, 178, 56, 0.5), 0 0 50px rgba(240, 178, 56, 0.25);
}

.loader-progress {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  animation: loaderTaglineIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 1s both;
}

.loader-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #d49b20, #f0b238, #ffffff);
  border-radius: 3px;
  transform-origin: left;
  animation: loaderBarFill 1.8s ease-in-out infinite;
}

@keyframes loaderLogoIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes loaderTaglineIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loaderJoinIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loaderGlowPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
  }
}

@keyframes loaderHaloPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  30% {
    opacity: 0.6;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80px) scale(1.1);
    opacity: 0;
  }
}

@keyframes loaderBarFill {
  0% {
    transform: scaleX(0.05) translateX(-50%);
  }
  50% {
    transform: scaleX(0.7) translateX(25%);
  }
  100% {
    transform: scaleX(1) translateX(0);
  }
}

/* --- Utility Classes --- */
.text-gold     { color: var(--gold) !important; }
.text-white    { color: var(--white) !important; }
.text-navy     { color: var(--navy) !important; }
.text-center   { text-align: center; }
.text-serif    { font-family: var(--font-serif); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col    { flex-direction: column; }
.gap-1       { gap: 0.5rem; }
.gap-2       { gap: 1rem; }
.gap-3       { gap: 1.5rem; }
.gap-4       { gap: 2rem; }

.hidden { display: none !important; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-gap: 64px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-hero { min-height: 50vh; padding: 8rem 0 4rem; }
  .quote-block { padding: 2rem 1.75rem; }
}

/* ===================================================
   HIGH CONTRAST & VISIBILITY — COMPREHENSIVE FIXES
   =================================================== */

/* === DARK SECTION CONTAINERS: Force white text === */
.section--dark,
.page-hero,
.calasanz-feature,
.vow-section,
.calasanz-quote-banner,
.unity-section,
.hist-significance-box,
.tree-roadmap,
.card-navy,
.card-primary {
  color: #ffffff;
}

/* Dark section headings */
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4, .section--dark h5, .section--dark h6,
.page-hero h1, .page-hero h2, .page-hero h3, .page-hero h4,
.calasanz-feature h1, .calasanz-feature h2, .calasanz-feature h3, .calasanz-feature h4,
.unity-section h1, .unity-section h2, .unity-section h3,
.hist-significance-box h1, .hist-significance-box h2, .hist-significance-box h3,
.calasanz-quote-banner h1, .calasanz-quote-banner h2, .calasanz-quote-banner h3 {
  color: #ffffff !important;
}

/* Dark section body text */
.section--dark p, .section--dark .lead, .section--dark .section-subtitle, .section--dark li,
.page-hero p, .page-hero .lead,
.calasanz-feature p, .calasanz-feature .lead,
.unity-section p, .unity-section li,
.hist-significance-box p, .hist-significance-box li,
.calasanz-quote-banner p {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* Dark section labels */
.section--dark .section-label,
.page-hero .section-label,
.page-hero .page-hero-label,
.calasanz-feature .section-label,
.unity-section .section-label {
  color: #D9B56B !important;
}

/* === LIGHT SECTION CONTAINERS: Force dark text === */
/* This catches all non-dark sections with white/cream backgrounds */
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) {
  color: #011025;
}

.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h1,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h2,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h3,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h4,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h5,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) h6 {
  color: #011025;
}

.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) p,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) .lead,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) .section-subtitle,
.section:not(.section--dark):not(.calasanz-feature):not(.page-hero) li {
  color: #3a3228;
}

/* === INLINE COLOUR OVERRIDES: Catch white text in white containers === */
/* Many pages use inline style="color:rgba(255,255,255,...)" for text 
   inside sections that now have a light background. This override 
   corrects these using cascade. Inline styles take priority via specificity tricks. */
.section:not(.section--dark) [style*="color:rgba(255"],
.section:not(.section--dark) [style*="color: rgba(255"] {
  color: #2c2720 !important;
}

/* Specifically fix inline rgba(255,255,255,...) subtitles and text in white sections */
.section:not(.section--dark) [style*="color:rgba(255,255,255, 0.7"],
.section:not(.section--dark) [style*="color:rgba(255,255,255, 0.8"],
.section:not(.section--dark) [style*="color:rgba(255,255,255, 0.5"],
.section:not(.section--dark) [style*="color:rgba(255,255,255,0.7"],
.section:not(.section--dark) [style*="color:rgba(255,255,255,0.8"],
.section:not(.section--dark) [style*="color:rgba(255,255,255,0.5"] {
  color: #3a3228 !important;
}

/* === WARM GOLD CARDS (Navy text on gold) === */
.card-featured,
.card-gold {
  background: #D9B56B;
  color: #011025;
}

.card-featured h1, .card-featured h2, .card-featured h3, .card-featured h4,
.card-gold h1, .card-gold h2, .card-gold h3, .card-gold h4,
.card-featured p, .card-featured .card-text, .card-featured li,
.card-gold p, .card-gold .card-text, .card-gold li {
  color: #011025 !important;
}

/* === STATS, CARDS & MIXED DARK BACKGROUNDS === */
/* For any divs with an inline navy background */
[style*="background:var(--navy)"] h1,
[style*="background:var(--navy)"] h2,
[style*="background:var(--navy)"] h3,
[style*="background:var(--navy)"] h4,
[style*="background: var(--navy)"] h1,
[style*="background: var(--navy)"] h2,
[style*="background: var(--navy)"] h3,
[style*="background: var(--navy)"] h4 {
  color: #ffffff !important;
}

[style*="background:var(--navy)"] p,
[style*="background:var(--navy)"] .lead,
[style*="background:var(--navy)"] li,
[style*="background: var(--navy)"] p,
[style*="background: var(--navy)"] .lead,
[style*="background: var(--navy)"] li {
  color: rgba(255,255,255,0.88) !important;
}

/* === PILLAR & VOW CARDS (if they appear on light backgrounds) === */
.pillar-card h3,
.vow-card h4 {
  color: #011025;
}

.pillar-card p,
.vow-card p {
  color: #3a3228;
}

/* pillar icon stays gold */
.pillar-icon { color: var(--gold); }

/* === MOBILE MENU === */
.mobile-menu { background: #011025; }
.mobile-menu a { color: rgba(255,255,255,0.9); }
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--gold); }
