/* =============================================
   PROGRAMS PAGE — programs/styles.css
   Depends on ../css/styles.css for tokens,
   header, footer, nav, .btn-green
============================================= */

/* =============================================
   HERO BANNER
   Full-width photo with dark overlay, white text
   bottom-left aligned title + subtitle
============================================= */
#programs-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  margin-top: 0; /* #content already has margin-top: var(--header-height) */
}

.programs-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.programs-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.programs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 1;
}

.programs-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 80px 56px;
  max-width: 780px;
}

.programs-hero-content h1 {
  font-family: var(--font-main);
  font-size: 60px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 12px;
}

.programs-hero-content p {
  font-family: var(--font-main);
  font-size: 17px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  opacity: 0.92;
}

@media (max-width: 767px) {
  #programs-hero { height: 320px; }
  .programs-hero-content { padding: 0 20px 40px; }
  .programs-hero-content h1 { font-size: 38px; }
  .programs-hero-content p { font-size: 15px; }
}

/* =============================================
   STATS STRIP
   Teal (#41BED0) background, 3-column layout:
   left = bold question + subtext
   middle + right = large number + label
============================================= */
#programs-stats {
  background-color: #41BED0;
  padding: 56px 0;
}

.programs-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 80px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 60px;
  align-items: center;
}

.programs-stats-text h2 {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin: 0 0 14px;
}

.programs-stats-text p {
  font-family: var(--font-main);
  font-size: 15px;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.programs-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-number {
  font-family: var(--font-main);
  font-size: 72px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .programs-stats-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 60px;
  }
  .stat-number { font-size: 56px; }
}

@media (max-width: 767px) {
  #programs-stats { padding: 48px 0; }
  .programs-stats-inner { padding: 0 20px; gap: 32px; }
  .stat-number { font-size: 48px; }
  .stat-label { font-size: 16px; }
}

/* =============================================
   SECTION HEADER (shared: Current + Explore)
============================================= */
.section-header-inner,
.explore-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-header-inner h2,
.explore-header-inner h2 {
  font-family: var(--font-main);
  font-size: 42px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

/* =============================================
   PROGRAM CARDS
   Used in both Current Programs and Explore All
   4-column grid. On hover: card morphs into
   a coloured panel with title + description + "Explore »"
   Colours cycle per card (matching screenshots)
============================================= */

/* --- Current Programs section --- */
#current-programs {
  padding: 60px 0 40px;
  background: #ffffff;
}

#current-programs .section-header-inner {
  margin-bottom: 40px;
}

.programs-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Explore All Programs section --- */
#explore-programs {
  padding: 80px 0 60px;
  background: #ffffff;
}

#explore-programs .explore-header-inner {
  margin-bottom: 48px;
}

.all-programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- Individual card --- */
.program-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--color-dark);
  border: 1px solid var(--color-border);
  background: #ffffff;
  transition: box-shadow 0.25s ease;
  cursor: pointer;
}

/* Current programs grid: no gap, cards flush */
.programs-cards-grid .program-card {
  border-radius: 16px;
  border: 1px solid #e8e8e8;
}

.program-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.program-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}

.program-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.program-card:hover .program-card-image img {
  transform: scale(1.04);
}

.program-card-body {
  padding: 20px 22px 24px;
}

.program-card-body h3 {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
  margin: 0 0 8px;
}

.program-cohort {
  display: block;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-muted);
  margin-top: 4px;
}

/* --- Hover overlay panel --- */
/* Each card gets a colour via nth-child; the hover panel
   slides up from bottom and fills the card */

.program-card-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 22px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  border-radius: 16px;
}

.program-card:hover .program-card-hover {
  opacity: 1;
  transform: translateY(0);
}

/* Colour cycle — matching screenshots:
   1st = green, 2nd = orange, 3rd = teal, 4th = green, repeat */
.program-card:nth-child(4n+1) .program-card-hover { background-color: #7EBB55; }
.program-card:nth-child(4n+2) .program-card-hover { background-color: #F78A3C; }
.program-card:nth-child(4n+3) .program-card-hover { background-color: #41BED0; }
.program-card:nth-child(4n+4) .program-card-hover { background-color: #7EBB55; }

.program-card-hover h3 {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0 0 12px;
}

.program-card-hover p {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  margin: 0 0 16px;
  flex: 1;
}

.program-explore {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

/* hidden cards (for show-more) */
.program-card.hidden {
  display: none;
}

/* =============================================
   EXPLORE FILTER BAR
============================================= */
.explore-filter-bar {
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Category select */
.filter-select-wrap {
  position: relative;
  flex: 0 0 340px;
}

.filter-select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #f4f4f4;
  border: none;
  border-radius: 100px;
  padding: 18px 52px 18px 28px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease;
}

.filter-select-wrap select:focus {
  background: #ececec;
}

.select-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 10px;
  pointer-events: none;
  color: var(--color-dark);
}

/* Search input */
.filter-search-wrap {
  flex: 1;
  min-width: 200px;
}

.filter-search-wrap input {
  width: 100%;
  background: #f4f4f4;
  border: none;
  border-radius: 100px;
  padding: 18px 28px;
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--color-dark);
  outline: none;
  transition: background 0.2s ease;
}

.filter-search-wrap input::placeholder {
  color: #aaaaaa;
}

.filter-search-wrap input:focus {
  background: #ececec;
}

/* Reset button */
.filter-reset-btn {
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
  padding: 10px 8px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.filter-reset-btn:hover {
  color: #7EBB55;
}

@media (max-width: 767px) {
  .explore-filter-bar { gap: 12px; }
  .filter-select-wrap { flex: 0 0 100%; }
  .filter-search-wrap { min-width: 100%; }
}

/* =============================================
   SHOW MORE / NO RESULTS
============================================= */
.show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  padding: 0 40px 20px;
}

.btn-show-more {
  display: inline-block;
  background-color: #41BED0;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  padding: 18px 52px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-show-more:hover {
  background-color: #31a8ba;
  transform: scale(1.03);
}

.btn-show-more.hidden {
  display: none;
}

.no-results {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 40px 40px;
  text-align: center;
}

.no-results p {
  font-family: var(--font-main);
  font-size: 18px;
  color: var(--color-muted);
}

/* =============================================
   TOGETHER FOR IMPACT CTA
   Light green-tinted bg, centered, large heading
============================================= */
#together-impact {
  background-color: #edf4e8;
  padding: 100px 40px;
  text-align: center;
}

.together-impact-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.together-impact-inner h2 {
  font-family: var(--font-main);
  font-size: 52px;
  font-weight: 700;
  color: #7EBB55;
  line-height: 1.1;
  margin: 0;
}

.together-impact-inner p {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
  text-align: center;
}

@media (max-width: 767px) {
  #together-impact { padding: 70px 20px; }
  .together-impact-inner h2 { font-size: 36px; }
  .together-impact-inner p { font-size: 15px; }
}

/* =============================================
   RESPONSIVE — cards grid
============================================= */
@media (max-width: 1200px) {
  .programs-cards-grid,
  .all-programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .programs-cards-grid,
  .all-programs-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }
  .section-header-inner,
  .explore-header-inner {
    padding: 0 20px;
  }
  .section-header-inner h2,
  .explore-header-inner h2 {
    font-size: 32px;
  }
  .explore-filter-bar {
    padding: 0 20px;
  }
  .show-more-wrap {
    padding: 0 20px 20px;
  }
  .no-results {
    padding: 40px 20px;
  }
}