/* --- Force Light Mode for the Whole Website --- */
:root {
  color-scheme: light only !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light only !important;
  }
}

:root {
  --brand-blue: #2f63d4;
  --brand-blue-deep: #1d3f8f;
  --brand-yellow: #f5c038;
  --brand-green: #3fb05a;
  --brand-red: #e2433a;
  --bg: #fbfcff;
  --fg: #14213d;
  --muted: #5b6478;
  --card: #ffffff;
  --border: #e5e8ef;
  --gradient-hero: linear-gradient(135deg, #1d3f8f 0%, #2f63d4 55%, #3fb05a 100%);
  --gradient-accent: linear-gradient(90deg, var(--brand-yellow), var(--brand-red), var(--brand-green), var(--brand-blue));
  --shadow-soft: 0 8px 30px -10px rgba(29, 63, 143, 0.2);
  --shadow-elegant: 0 20px 60px -20px rgba(29, 63, 143, 0.45);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 48px; width: 48px; object-fit: contain; }
.brand-text { line-height: 1.1; }
.brand-text strong { display: block; font-weight: 700; color: var(--brand-blue-deep); }
.brand-text span { font-size: 12px; color: var(--muted); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: rgba(20,33,61,0.7); transition: all .2s;
}
.nav a:hover { background: #eef0f5; color: var(--fg); }
.nav a.active {
  background: var(--brand-blue-deep); color: #fff; font-weight: 600;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient-hero); color: #fff; box-shadow: var(--shadow-soft); }
.btn-yellow { background: var(--brand-yellow); color: var(--brand-blue-deep); }
.btn-white { background: #fff; color: var(--brand-blue-deep); box-shadow: var(--shadow-elegant); }

.menu-toggle { display: none; font-size: 24px; }

/* Sections (page tabs) */
.page { display: none; }
.page.active { display: block; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
}
.hero-slideshow {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.hero-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; animation: heroFadeLoop 32s infinite ease-in-out;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 8s; }
.hero-slide:nth-child(3) { animation-delay: 16s; }
.hero-slide:nth-child(4) { animation-delay: 24s; }

@keyframes heroFadeLoop {
  0% { opacity: 0; transform: scale(1); }
  3% { opacity: 1; }
  25% { opacity: 1; }
  28% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; }
}
.hero-bg {
  position: absolute; inset: 0; background: var(--gradient-hero); z-index: 2; opacity: 0.75; mix-blend-mode: multiply;
}
.hero-inner { position: relative; padding: 120px 0; z-index: 3; }
.hero .badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 { font-size: clamp(36px, 6vw, 76px); font-weight: 800; line-height: 1.05; max-width: 900px; }
.hero h1 .accent { color: var(--brand-yellow); }
.hero p { margin-top: 24px; max-width: 600px; font-size: 18px; color: rgba(255,255,255,0.85); }
.hero .actions { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.accent-bar { position: relative; z-index: 4; height: 8px; background: var(--gradient-accent); }

/* Stats */
.stats {
  position: relative; z-index: 10; margin-top: -48px;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  padding: 32px; box-shadow: var(--shadow-soft);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat { text-align: center; }
.stat-num { font-size: clamp(28px, 4vw, 48px); font-weight: 800; color: var(--brand-blue-deep); }
.stat-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Generic */
.section { padding: 96px 0; }
.section h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; letter-spacing: -0.02em; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-blue); }
.lead { margin-top: 16px; font-size: 18px; color: var(--muted); max-width: 720px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

/* Two Column Layout Inline Gallery Slideshow - Fully Adaptive Layout */
.two-col-slideshow-wrapper {
  position: relative; 
  width: 100%; 
  aspect-ratio: 4 / 3; 
  border-radius: 18px; 
  overflow: hidden; 
  box-shadow: var(--shadow-soft);
}
.two-col-slideshow {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.two-col-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-size: contain; 
  background-position: center; 
  background-repeat: no-repeat;
  background-color: transparent; 
  opacity: 0; 
  animation: twoColFadeLoop 32s infinite ease-in-out;
}
.two-col-slide:nth-child(1) { animation-delay: 0s; }
.two-col-slide:nth-child(2) { animation-delay: 8s; }
.two-col-slide:nth-child(3) { animation-delay: 16s; }
.two-col-slide:nth-child(4) { animation-delay: 24s; }

/* Isolated 32-Second Smooth Slide Transition Sequence for Column 2 */
@keyframes twoColFadeLoop {
  0% { opacity: 0; }
  3% { opacity: 1; }
  25% { opacity: 1; }
  28% { opacity: 0; }
  100% { opacity: 0; }
}

.values-bg { background: #f3f5fa; }
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 50px; }
.value-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; transition: box-shadow .2s;
}
.value-card:hover { box-shadow: var(--shadow-soft); }
.value-card .bar { height: 6px; width: 40px; border-radius: 999px; margin-bottom: 16px; }
.value-card h3 { font-size: 18px; }

/* CTA Card */
.cta-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 60px; color: #fff;
}
.cta-slideshow {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}
.cta-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0; animation: ctaFadeLoop 32s infinite ease-in-out;
}
.cta-slide:nth-child(1) { animation-delay: 0s; }
.cta-slide:nth-child(2) { animation-delay: 8s; }
.cta-slide:nth-child(3) { animation-delay: 16s; }
.cta-slide:nth-child(4) { animation-delay: 24s; }

@keyframes ctaFadeLoop {
  0% { opacity: 0; }
  3% { opacity: 1; }
  25% { opacity: 1; }
  28% { opacity: 0; }
  100% { opacity: 0; }
}
.cta-overlay {
  position: absolute; inset: 0; background: var(--gradient-hero); opacity: 0.85; mix-blend-mode: multiply; z-index: 2;
}
.cta-content { position: relative; z-index: 3; }
.cta-card h2 { color: #fff; }
.cta-card p { margin-top: 16px; color: rgba(255,255,255,0.85); max-width: 600px; }

/* About */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 60px; }
.mv-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: var(--shadow-soft); }
.mv-card h2 { font-size: 24px; color: var(--brand-blue-deep); }
.mv-card p { margin-top: 14px; color: var(--muted); }
.story { margin-top: 80px; max-width: 800px; }
.story h2 { font-size: 28px; }
.story p { margin-top: 16px; color: var(--muted); font-size: 17px; }

.ceo-card {
  margin-top: 60px; background: var(--card); border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-elegant);
  display: grid; grid-template-columns: 1fr 1.2fr;
}
.ceo-card img { height: 100%; width: 100%; object-fit: cover; background: var(--brand-blue-deep); }
.ceo-info { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.ceo-info .role { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-red); }
.ceo-info h3 { margin-top: 8px; font-size: 36px; font-weight: 800; color: var(--brand-blue-deep); }
.ceo-info .bio { margin-top: 20px; color: var(--muted); }
.ceo-info .meta { margin-top: 20px; font-size: 14px; }
.ceo-info .meta div { margin-top: 6px; }
.ceo-info .meta a { color: var(--brand-blue); }
.ceo-info .stripe { margin-top: 24px; height: 4px; width: 100px; border-radius: 999px; background: var(--gradient-accent); }

/* Gallery */
.masonry { columns: 3; column-gap: 18px; margin-top: 50px; }
.masonry figure { break-inside: avoid; margin-bottom: 18px; position: relative; overflow: hidden; border-radius: 18px; box-shadow: var(--shadow-soft); }
.masonry figure img { transition: transform .5s; }
.masonry figure:hover img { transform: scale(1.05); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; color: #fff; font-size: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0; transition: opacity .3s;
}
.masonry figure:hover figcaption { opacity: 1; }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; }
.program-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s; }
.program-card:hover { box-shadow: var(--shadow-soft); }
.program-icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; margin-bottom: 20px;
}
.program-card h3 { font-size: 20px; }
.program-card p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Custom Badge Specific Layout Styles */
.program-card .badge {
  width: 44px; height: 44px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-weight: bold;
  color: #ffffff; font-size: 1.1rem; margin-bottom: 16px;
}
.badge-rugby { background-color: var(--brand-blue-deep); }
.badge-football { background-color: var(--brand-green); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; }
.contact-card {
  border-radius: 24px; padding: 32px; color: #fff;
  background: var(--gradient-hero); box-shadow: var(--shadow-elegant);
}
.contact-card h2 { color: #fff; font-size: 24px; }
.contact-card .sub { color: rgba(255,255,255,0.8); margin-top: 4px; }
.contact-list { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.contact-list .row { display: flex; align-items: center; gap: 12px; }
.contact-list .icon {
  width: 36px; height: 36px; border-radius: 999px; background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
}
.contact-form {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-form h2 { font-size: 24px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); font: inherit; color: var(--fg);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  padding: 14px; border-radius: 12px; color: #fff; font-weight: 600;
  background: var(--gradient-hero);
}

/* Premium Support Section Enhancements */
.support-title {
  margin-top: 12px;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(45deg, #ffffff, #b3b3b3);
  -webkit-background-clip: text;
  background-clip: text;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 56px;
  perspective: 1000px;
}

.support-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  overflow: hidden;
  text-align: left;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-glow {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle 150px at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 80%);
  z-index: 1; pointer-events: none;
}

.card-content {
  transform: translateZ(30px); z-index: 2; position: relative;
}

.card-icon {
  font-size: 38px; margin: 24px 0 12px 0; display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.support-card:hover .card-icon {
  transform: scale(1.15) translateZ(10px);
}

.support-card p {
  margin-top: 12px; color: var(--muted, #a0a0a0); font-size: 14px; line-height: 1.6; min-height: 90px;
}

.support-btn {
  margin-top: 24px; padding: 12px 24px; width: 100%; text-align: center;
  display: block; box-sizing: border-box; font-weight: 600; border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Footer & Map Layout Rules */
.footer { background: var(--brand-blue-deep); color: rgba(255,255,255,0.9); margin-top: 80px; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px;
  align-items: flex-start; max-width: 1200px; margin: 0 auto; padding: 48px 24px;
}
.footer h4 { font-weight: 600; margin-bottom: 12px; }
.footer p { font-size: 14px; color: rgba(255,255,255,0.7); }
.footer .brand-line { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer .brand-line img { height: 40px; width: 40px; background: #fff; border-radius: 999px; padding: 4px; }

.footer-text-content { display: flex; flex-wrap: wrap; gap: 30px; flex: 2; min-width: 300px; }
.footer-column { flex: 1; min-width: 200px; }
.footer-map-column { flex: 1; min-width: 300px; width: 100%; }

.map-wrapper {
  position: relative; width: 100%; height: 220px; border-radius: 8px; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.social-links a { display: block; margin-bottom: 6px; font-size: 14px; color: rgba(255,255,255,0.7); }
.social-links a:hover { color: #fff; text-decoration: underline; }

.copy {
  width: 100%; text-align: center; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: rgba(255,255,255,0.5);
}

/* Global Responsive Breakdown */
@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 80px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 4px; z-index: 100;
  }
  .menu-toggle { display: block; }
  .hero-inner { padding: 80px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col, .mv-grid, .contact-grid, .ceo-card { grid-template-columns: 1fr; gap: 32px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .programs { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
  .cta-card { padding: 36px; }
  .ceo-info { padding: 28px; }
  .btn-donate-header { display: none; }
}

@media (max-width: 768px) {
  .support-grid { grid-template-columns: 1fr; gap: 24px; }
  .support-card { transform: none !important; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-text-content { flex-direction: column; align-items: center; }
  .footer-map-column { max-width: 100%; }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .stats { grid-template-columns: 1fr; }
}

/* Container for the entire standalone section */
.showcase-video-section {
  width: 100%;
  padding: 60px 0; /* Creates breathing room above and below the video section */
  background-color: #f9f9f9; /* Subtle background contrast from the rest of the page */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The frame containing the video and text */
.video-wrapper {
  position: relative;
  width: 90%; /* Keeps it from hitting the very edge of desktop screens */
  max-width: 1000px; /* Limits the max width so it stays crisp and contained */
  height: 500px; /* Dedicated height for the showcase */
  border-radius: 12px; /* Smooth rounded corners for a modern look */
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Soft shadow to make it pop */
  background-color: #000;
}

/* The standalone video element */
.standalone-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures video fills its custom frame perfectly */
  z-index: 1;
  will-change: transform; /* Performance optimization */
}

/* Overlay layer centered over the video */
.video-text-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2; /* Sits over the video */
  display: flex;
  justify-content: center;
  align-items: center;
  /* A dark gradient tint so the white text reads clearly over bright spots in the video */
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)); 
}

/* Welcome Text Styling */
.welcome-text {
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  padding: 0 20px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Extra drop shadow for readability */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .video-wrapper {
    width: 95%;
    height: 350px; /* Adjusts beautifully to a shorter height on mobile phones */
  }
  
  .welcome-text {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }
}
