/* =================================================================
   JUDAH PRAISE 2026 STROKE PROJECT HANDOVER & IMPACT PAGE STYLES
   Responsive, Pinterest-style Masonry Gallery & Dark Theme
   ================================================================= */

/* Container helper */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Section headers */
.section-header {
  margin-bottom: var(--space-10);
}

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

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 720px;
  margin: var(--space-3) auto 0 auto;
  line-height: 1.6;
}

/* ==========================================
   HERO IMPACT SECTION WITH 3-SECOND CAROUSEL
   ========================================== */
.hero-impact-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 0 var(--space-20) 0;
  background-color: var(--bg-primary);
}

.hero-carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease-in-out, transform 4s ease-out;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.55) 0%,
    rgba(26, 26, 26, 0.72) 65%,
    var(--bg-primary) 100%
  );
  z-index: 2;
}

.hero-impact-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 860px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(92, 184, 92, 0.15);
  border: 1px solid var(--accent-green);
  color: #7ce47c;
  border-radius: var(--radius-xl);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: var(--space-5);
  text-transform: uppercase;
  animation: pulseBadge 2.5s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(92, 184, 92, 0); }
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.text-gold {
  color: var(--accent-gold);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-2);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.hero-indicators .indicator {
  width: 32px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.hero-indicators .indicator.active {
  background: var(--accent-gold);
  width: 50px;
}

/* Hero CTA Buttons - Pushed down much further for clear image view */
.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 135px;
}

.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  line-height: 1.2;
}

.hero-actions .btn-primary {
  background: var(--gradient-primary);
  color: #1a1a1a;
  box-shadow: 0 4px 18px rgba(212, 175, 121, 0.35);
}

.hero-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 121, 0.55);
}

.hero-actions .btn-secondary {
  background: rgba(45, 45, 45, 0.85);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

/* ==========================================
   METRICS SECTION (COMPACT 2x2 ON MOBILE)
   ========================================== */
.metrics-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: -50px;
  position: relative;
  z-index: 10;
  margin-bottom: var(--space-16);
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.metric-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
}

.metric-icon {
  font-size: 1.8rem;
  color: var(--accent-gold);
  margin-bottom: var(--space-3);
}

.metric-value {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.metric-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ==========================================
   VIDEO PLAYER SECTION
   ========================================== */
.video-section {
  margin-bottom: var(--space-20);
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.video-placeholder-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.video-placeholder-container:hover .video-poster {
  transform: scale(1.03);
}

.video-overlay-tint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  transition: background var(--transition-normal);
}

.video-placeholder-container:hover .video-overlay-tint {
  background: rgba(0, 0, 0, 0.3);
}

.play-pulse-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: #1a1a1a;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  cursor: pointer;
  animation: playPulse 2s infinite ease-out;
  transition: transform var(--transition-fast);
}

.play-pulse-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 121, 0.7); }
  70% { box-shadow: 0 0 0 22px rgba(212, 175, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 121, 0); }
}

.video-badge-top {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-gold);
}

.video-info-bottom {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  color: var(--text-primary);
}

.video-info-bottom h3 {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.video-info-bottom p {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ==========================================
   BREAKDOWN SECTION
   ========================================== */
.breakdown-section {
  margin-bottom: var(--space-20);
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.breakdown-card.highlight-card {
  border-color: var(--accent-gold);
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(212, 175, 121, 0.08) 100%);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
}

.card-badge.gold-badge {
  color: var(--accent-gold);
}

.breakdown-card h3 {
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.breakdown-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.item-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.total-donated-box {
  margin-top: auto;
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-donated-box .lbl {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.total-donated-box .val {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--accent-gold);
}

/* ==========================================
   GALLERY SECTION (PINTEREST MASONRY LAYOUT)
   ========================================== */
.gallery-section {
  margin-bottom: var(--space-24);
}

.gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--accent-gold);
  color: #1a1a1a;
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* Search Bar with Fixed Icon Spacing */
.gallery-search {
  position: relative;
  min-width: 280px;
}

.gallery-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-gold);
  font-size: 0.9rem;
  z-index: 2;
  pointer-events: none;
}

.gallery-search input {
  width: 100%;
  padding: 12px 16px 12px 42px; /* Generous left padding to guarantee NO text collision */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-normal);
}

.gallery-search input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 121, 0.2);
}

/* Pinterest-Style Masonry Grid using CSS Columns */
.gallery-grid {
  column-count: 4;
  column-gap: var(--space-4);
  min-height: 400px;
  margin-bottom: 40px;
}

.gallery-item {
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: var(--space-4);
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: block;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.6);
  border-color: var(--accent-gold);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: flex-end;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}

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

.gallery-item-title {
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.gallery-skeleton {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  height: 220px;
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-lg);
  animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.gallery-pagination {
  margin-top: 60px;
  margin-bottom: 50px;
  text-align: center;
}

/* Styled Load More Button */
#load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 44px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#load-more-btn:hover {
  background: var(--gradient-primary);
  color: #1a1a1a;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(212, 175, 121, 0.4);
}

.hidden {
  display: none !important;
}

/* ==========================================
   LIGHTBOX MODAL STYLES
   ========================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  width: 94%;
  max-width: 1050px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--accent-gold);
}

.lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 300px;
}

.lightbox-center-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lightbox-nav {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  z-index: 10;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-nav:hover {
  background: var(--accent-gold);
  color: #1a1a1a;
  border-color: var(--accent-gold);
}

.lightbox-image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrapper img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85);
}

.lightbox-spinner {
  position: absolute;
  font-size: 2rem;
  color: var(--accent-gold);
  display: none;
}

.lightbox-spinner.show {
  display: block;
}

.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0 var(--space-2) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-3);
  color: var(--text-secondary);
}

.lightbox-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.lightbox-counter {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: var(--space-3);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--accent-gold);
  color: #1a1a1a;
}

/* Video Player Modal Content (Adapts to vertical 9:16 & horizontal videos) */
.video-player-modal-content {
  max-width: 480px;
  width: 92%;
  max-height: 85vh;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
  margin: 0 auto;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.video-player-wrapper video {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-2xl);
  display: block;
}

.video-notice-icon {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: var(--space-4);
}

.video-modal-body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.video-modal-body p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.video-modal-body .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--gradient-primary);
  color: #1a1a1a;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 175, 121, 0.3);
  transition: all var(--transition-normal);
}

.video-modal-body .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212, 175, 121, 0.5);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS & LAYOUT OPTIMIZATION
   ========================================== */

/* Laptop (max-width: 1200px) */
@media (max-width: 1200px) {
  .gallery-grid {
    column-count: 3;
    column-gap: var(--space-4);
  }
}

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
  .metrics-section {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-top: -30px;
  }

  .gallery-grid {
    column-count: 2;
    column-gap: var(--space-3);
  }

  .gallery-item {
    margin-bottom: var(--space-3);
  }
}

/* Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
  .hero-impact-section {
    min-height: 70vh;
    padding: 85px 0 var(--space-16) 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-3);
    margin-top: 90px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .metrics-section {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-top: -20px;
    margin-bottom: var(--space-12);
  }

  .metric-card {
    padding: var(--space-4) var(--space-2);
  }

  .metric-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
  }

  .metric-value {
    font-size: 1.2rem;
  }

  .metric-label {
    font-size: var(--text-xs);
  }

  .gallery-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .gallery-search {
    width: 100%;
    min-width: 100%;
  }

  /* 2-Column Pinterest Masonry on Mobile */
  .gallery-grid {
    column-count: 2;
    column-gap: var(--space-2);
  }

  .gallery-item {
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
  }

  .gallery-item img {
    border-radius: var(--radius-md);
  }

  /* Mobile Video Container & Overlay Sizing */
  .video-placeholder-container {
    aspect-ratio: 4 / 3;
    min-height: 270px;
  }

  .video-badge-top {
    font-size: 0.68rem;
    padding: 3px 8px;
    top: 10px;
    left: 10px;
  }

  .play-pulse-btn {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .video-info-bottom {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }

  .video-info-bottom h3 {
    font-size: 0.92rem;
    line-height: 1.3;
    margin-bottom: 2px;
  }

  .video-info-bottom p {
    font-size: 0.68rem;
  }

  .prev-btn { left: 5px; }
  .next-btn { right: 5px; }

  .lightbox-close {
    top: -40px;
    right: 5px;
  }
}
