/*
 * Cameroon Community in Middle Tennessee (CCMT)
 * Official Master Stylesheet
 * Brand and UX Design System
 */

/* ==========================================
   1. Design Tokens & Custom Properties
   ========================================== */
:root {
  /* Brand Colors (Used as Accents) */
  --cam-green: #007A3D;
  --cam-green-rgb: 0, 122, 61;
  --cam-red: #CE1126;
  --cam-red-rgb: 206, 17, 38;
  --cam-yellow: #FCD116;
  --cam-yellow-rgb: 252, 209, 22;

  /* Interface Palette */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FCFBFA; /* Warm off-white */
  --bg-tertiary: #F4F5F6;  /* Light slate gray */
  --text-primary: #1A1F1C;   /* Dark charcoal */
  --text-secondary: #4A524E; /* Slate gray body */
  --text-light: #707A75;     /* Muted body */
  --border-color: #E2E5E3;   /* Light gray border */
  
  /* Status Colors */
  --success: #007A3D;
  --error: #CE1126;
  
  /* Typography */
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Structural Tokens */
  --container-width: 1200px;
  --header-height: 84px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  /* Shadow Systems */
  --shadow-sm: 0 2px 8px rgba(26, 31, 28, 0.04);
  --shadow-md: 0 8px 24px rgba(26, 31, 28, 0.06);
  --shadow-lg: 0 16px 48px rgba(26, 31, 28, 0.1);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Preference (Subtle enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    /* We maintain the warm, trust-building light theme as requested, 
       but soften high contrasts for dark mode users. */
    --bg-secondary: #FAF9F7;
    --bg-tertiary: #EEF0EE;
  }
}

/* ==========================================
   2. Reset & Base Styles
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  position: relative;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

p {
  margin-bottom: 1.25rem;
}

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

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* Accessibility Focus States */
*:focus-visible {
  outline: 3px solid var(--cam-green);
  outline-offset: 4px;
}

/* ==========================================
   3. Utility Classes
   ========================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-padding {
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.bg-warm {
  background-color: var(--bg-secondary);
}

.bg-slate {
  background-color: var(--bg-tertiary);
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

.accent-text {
  color: var(--cam-green);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.875rem;
  display: block;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
   4. Layout Components & Navigation
   ========================================== */

/* Cameroon Flag Ribbon */
.flag-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  display: flex;
  z-index: 1001;
}
.flag-stripe {
  flex: 1;
  height: 100%;
}
.flag-stripe.green { background-color: var(--cam-green); }
.flag-stripe.red { background-color: var(--cam-red); }
.flag-stripe.yellow { background-color: var(--cam-yellow); }

/* Sticky Header */
.main-header {
  position: fixed;
  top: 4px;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-normal);
}

.main-header.scrolled {
  height: 70px;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-weight: 700;
  border: 2px solid var(--cam-yellow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item-link {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
  position: relative;
}

.nav-item-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--cam-green);
  transition: var(--transition-fast);
}

.nav-item-link:hover::after,
.nav-item-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  z-index: 1002;
}

.mobile-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ==========================================
   5. Buttons & Interactive States
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--cam-green);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px rgba(0, 122, 61, 0.2);
}

.btn-primary:hover {
  background-color: #006633;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 122, 61, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-tertiary);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--cam-red);
  color: var(--bg-primary);
  box-shadow: 0 4px 12px rgba(206, 17, 38, 0.2);
}

.btn-accent:hover {
  background-color: #b00f20;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(206, 17, 38, 0.3);
}

.btn-text {
  font-weight: 600;
  color: var(--cam-green);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-text:hover {
  color: #00552b;
  gap: 0.75rem;
}

/* ==========================================
   6. Hero & Section Layouts
   ========================================== */

/* Hero Banner */
.hero-section {
  position: relative;
  min-height: 60vh; /* Shorter hero height */
  display: flex;
  align-items: center;
  background-color: var(--text-primary);
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 5rem;
  color: var(--bg-primary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.1) brightness(0.9);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 31, 28, 0.95) 0%, rgba(26, 31, 28, 0.6) 50%, rgba(26, 31, 28, 0.3) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--bg-primary); /* White */
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); /* Slightly smaller headline */
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem); /* Slightly smaller subtitle text */
  font-weight: 600;
  color: var(--cam-yellow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-headings);
}

.hero-description {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem); /* Slightly smaller description */
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem; /* Reduced bottom spacing */
  max-width: 650px;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-ctas .btn-secondary {
  color: var(--bg-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero-ctas .btn-secondary:hover {
  border-color: var(--bg-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Page Header (Hero style for sub-pages) */
.page-header {
  position: relative;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.page-header-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.page-header-title {
  margin-bottom: 1rem;
  color: var(--bg-primary); /* White */
}

.page-header-breadcrumbs {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-headings);
}

.page-header-breadcrumbs a:hover {
  color: var(--cam-yellow);
}

/* ==========================================
   7. Information Layouts (Cards & Grids)
   ========================================== */

/* Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.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;
}

/* Split Section (Alternating Image & Content) */
.split-section {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.split-section.reverse {
  flex-direction: row-reverse;
}

.split-image-wrapper {
  flex: 1;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.split-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 4px solid var(--cam-yellow);
  border-radius: var(--radius-lg);
  pointer-events: none;
  transform: translate(12px, 12px);
  z-index: -1;
  transition: var(--transition-normal);
}

.split-image-wrapper:hover::after {
  transform: translate(6px, 6px);
}

.split-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.split-image-wrapper:hover .split-image {
  transform: scale(1.05);
}

.split-content {
  flex: 1.2;
}

/* Statistics Cards */
.stats-grid {
  margin-top: -5rem;
  position: relative;
  z-index: 10;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-bottom: 4px solid var(--cam-green);
}

.stats-card {
  text-align: center;
  padding: 1rem;
}

.stats-number {
  font-family: var(--font-headings);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--cam-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-label {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Program & Feature Cards */
.feature-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--cam-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--cam-green-rgb), 0.2);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 54px;
  height: 54px;
  background-color: rgba(var(--cam-green-rgb), 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cam-green);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-normal);
}

.feature-card:hover .card-icon {
  background-color: var(--cam-green);
  color: var(--bg-primary);
  transform: scale(1.05);
}

.card-title {
  margin-bottom: 0.75rem;
}

.card-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Card Lists */
.card-list {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.card-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-list-item i {
  color: var(--cam-yellow);
}

/* Value Cards (About page) */
.value-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.value-card:hover {
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.value-icon {
  width: 64px;
  height: 64px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--cam-red);
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.value-card:hover .value-icon {
  background-color: var(--cam-red);
  color: var(--bg-primary);
  border-color: var(--cam-red);
}

/* ==========================================
   8. Specific Layout Components (Gallery, Form, Event)
   ========================================== */

/* Upcoming Events Row */
.events-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  gap: 2rem;
}

.event-row:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--cam-green-rgb), 0.2);
}

.event-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 90px;
  background-color: rgba(var(--cam-green-rgb), 0.06);
  border-radius: var(--radius-md);
  border-bottom: 3px solid var(--cam-green);
}

.event-day {
  font-family: var(--font-headings);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cam-green);
  line-height: 1;
}

.event-month {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

.event-info {
  flex: 1;
}

.event-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.event-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Testimonials Slider */
.testimonials-slider-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

.testimonials-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide {
  min-width: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.testimonial-quote {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-primary);
  font-style: italic;
  font-family: var(--font-body);
  line-height: 1.7;
  margin-bottom: 2rem;
  position: relative;
  max-width: 780px;
}

.testimonial-quote::before,
.testimonial-quote::after {
  content: '"';
  font-size: 4rem;
  color: rgba(var(--cam-green-rgb), 0.15);
  position: absolute;
  font-family: var(--font-headings);
  line-height: 1;
}

.testimonial-quote::before {
  top: -2rem;
  left: -2rem;
}

.testimonial-quote::after {
  bottom: -4rem;
  right: -1rem;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.author-avatar {
  width: 60px;
  height: 60px;
  background-color: var(--bg-tertiary);
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 2px solid var(--cam-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-primary);
}

.author-name {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.author-role {
  font-size: 0.85rem;
  color: var(--text-light);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: var(--transition-fast);
}

.slider-dot.active {
  background-color: var(--cam-green);
  transform: scale(1.2);
}

/* Leadership Grid */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.leader-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: center;
  transition: var(--transition-normal);
}

.leader-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--cam-green-rgb), 0.2);
}

.leader-image-box {
  width: 100%;
  height: 220px;
  background-color: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.leader-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.leader-card:hover .leader-image {
  transform: scale(1.05);
}

.leader-placeholder-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  color: var(--text-light);
  font-size: 3.5rem;
  position: relative;
}

.leader-placeholder-avatar::after {
  content: 'CCMT';
  position: absolute;
  bottom: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(26, 31, 28, 0.2);
  letter-spacing: 0.1em;
}

.leader-info {
  padding: 1.5rem 1rem;
}

.leader-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.leader-role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cam-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Gallery Masonry */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-family: var(--font-headings);
  font-weight: 550;
  font-size: 0.9rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--cam-green);
  color: var(--bg-primary);
  border-color: var(--cam-green);
  box-shadow: 0 4px 10px rgba(0, 122, 61, 0.15);
}

.gallery-masonry {
  columns: 3 320px;
  column-gap: 1.5rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-normal);
  background-color: var(--bg-secondary);
}

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

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-slow);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.03);
}

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(26, 31, 28, 0.85) 0%, rgba(26, 31, 28, 0.3) 50%, rgba(26, 31, 28, 0) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: var(--transition-normal);
  z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: var(--bg-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  transform: translateY(10px);
  transition: var(--transition-normal);
}

.gallery-item-category {
  color: var(--cam-yellow);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: translateY(10px);
  transition: var(--transition-normal);
  transition-delay: 0.05s;
}

.gallery-item:hover .gallery-item-title,
.gallery-item:hover .gallery-item-category {
  transform: translateY(0);
}

/* Gallery Graphic Items (Fallbacks for empty categories) */
.gallery-item.graphic-item {
  height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--bg-primary);
  background-size: cover;
  background-position: center;
  position: relative;
}

.gallery-item.graphic-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 31, 28, 0.45);
  transition: var(--transition-normal);
  z-index: 1;
}

.gallery-item.graphic-item:hover::after {
  background: rgba(26, 31, 28, 0.25);
}

.gallery-item.graphic-item.picnic-bg {
  background: linear-gradient(135deg, rgba(254, 153, 0, 0.95) 0%, rgba(206, 17, 38, 0.95) 100%);
}
.gallery-item.graphic-item.youth-bg {
  background: linear-gradient(135deg, rgba(0, 122, 61, 0.95) 0%, rgba(0, 179, 89, 0.95) 100%);
}
.gallery-item.graphic-item.sports-bg {
  background: linear-gradient(135deg, rgba(29, 45, 68, 0.95) 0%, rgba(62, 92, 118, 0.95) 100%);
}
.gallery-item.graphic-item.outreach-bg {
  background: linear-gradient(135deg, rgba(206, 17, 38, 0.95) 0%, rgba(252, 209, 22, 0.95) 100%);
}
.gallery-item.graphic-item.gatherings-bg {
  background: linear-gradient(135deg, rgba(61, 69, 64, 0.95) 0%, rgba(26, 31, 28, 0.95) 100%);
}

.graphic-item-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--cam-yellow);
  z-index: 2;
  transition: var(--transition-normal);
}

.gallery-item.graphic-item:hover .graphic-item-icon {
  transform: scale(1.1) rotate(-5deg);
}

.graphic-item-content {
  z-index: 2;
}

.graphic-item-title {
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--bg-primary);
}

.graphic-item-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.9;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 31, 28, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 85%;
  max-height: 85%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.lightbox-img-loaded {
  object-fit: contain;
}

.lightbox-caption {
  color: var(--bg-primary);
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-headings);
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--bg-primary);
  font-size: 2rem;
  cursor: pointer;
  background: none;
}

.lightbox-close:hover {
  color: var(--cam-yellow);
}

/* Forms & Validation Styling */
.form-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--cam-green);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(0, 122, 61, 0.1);
  outline: none;
}

/* Accessible Validation Feedback */
.form-control:user-invalid {
  border-color: var(--error);
  background-color: rgba(206, 17, 38, 0.02);
}

.form-control.is-invalid {
  border-color: var(--error);
}

.form-error-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 0.25rem;
  font-weight: 500;
}

.form-error-msg.active {
  display: block;
}

.form-success-alert {
  background-color: rgba(0, 122, 61, 0.06);
  border: 1px solid rgba(0, 122, 61, 0.15);
  border-left: 4px solid var(--cam-green);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: var(--success);
  margin-bottom: 2rem;
  display: none;
  align-items: flex-start;
  gap: 1rem;
}

.form-success-alert.active {
  display: flex;
}

/* FAQ Accordion (Details/Summary) */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--cam-green-rgb), 0.2);
}

.faq-question {
  padding: 1.5rem;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
  content: '+';
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid transparent;
}

.faq-item[open] .faq-answer {
  border-top-color: var(--border-color);
}

/* Contact Info Card */
.contact-info-card {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 3rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(var(--cam-yellow-rgb), 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
}

.contact-info-title {
  color: var(--bg-primary);
  margin-bottom: 1.5rem;
}

.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cam-yellow);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-detail-content h4 {
  color: var(--bg-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.contact-detail-content p,
.contact-detail-content a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
}

.contact-detail-content a:hover {
  color: var(--cam-yellow);
}

.social-links-container h4 {
  font-family: var(--font-headings);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.social-icons-row {
  display: flex;
  gap: 0.75rem;
}

.social-icon-link {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.social-icon-link:hover {
  background-color: var(--cam-green);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

/* Membership Application Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(26, 31, 28, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background-color: var(--bg-primary);
  width: 90%;
  max-width: 700px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-secondary);
}

.modal-title {
  font-size: 1.35rem;
}

.modal-close {
  font-size: 1.5rem;
  color: var(--text-light);
}

.modal-close:hover {
  color: var(--cam-red);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
}

/* ==========================================
   9. Scroll Animations & Interactive Triggers
   ========================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.back-to-top:hover {
  background-color: var(--cam-green);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 122, 61, 0.3);
}

/* ==========================================
   10. Footer Styling
   ========================================== */
.main-footer {
  background-color: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 5rem;
  border-top: 4px solid var(--cam-green);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.2fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand h3 {
  color: var(--bg-primary);
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: var(--bg-primary);
  font-family: var(--font-headings);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--cam-yellow);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links-link {
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.footer-links-link:hover {
  color: var(--cam-yellow);
  padding-left: 4px;
}

.footer-info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-info-item i {
  color: var(--cam-yellow);
  margin-top: 0.25rem;
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-input-group {
  display: flex;
  position: relative;
}

.newsletter-input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--bg-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.newsletter-input:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--cam-yellow);
  outline: none;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-btn {
  background-color: var(--cam-green);
  color: var(--bg-primary);
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.newsletter-btn:hover {
  background-color: #006633;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ==========================================
   11. Animation Keyframes
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================
   12. Responsive Media Queries
   ========================================== */

/* Large Tablets & Desktop (992px to 1200px) */
@media (max-width: 1199px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
  .leadership-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Medium Tablets & Mobile (768px to 991px) */
@media (max-width: 991px) {
  :root {
    --header-height: 74px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .split-section,
  .split-section.reverse {
    flex-direction: column;
    gap: 2.5rem;
  }
  .split-image {
    height: 380px;
  }
  .stats-grid {
    margin-top: -2rem;
    padding: 1.5rem;
  }
  .stats-grid-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .event-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .event-row .btn {
    width: 100%;
  }
}

/* Smart Phones & Small Tablets (up to 767px) */
@media (max-width: 767px) {
  .grid-3, .grid-4, .leadership-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Navigation Mobile Overhaul */
  .mobile-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 2rem;
    gap: 1.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-actions {
    width: 100%;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
  }
  
  .nav-actions .btn {
    width: 100%;
  }
  
  /* Hamburger Animations */
  .mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .hero-section {
    min-height: auto;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
  }
  
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-ctas .btn {
    width: 100%;
  }
  
  .form-card {
    padding: 1.75rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
