/*
 * programs.css  v2.2
 * Hopeline Action Uganda
 * Bootstrap 5 companion — place at: your-theme/assets/css/programs.css
 */

/* ── Brand Tokens ────────────────────────────────────────── */
:root { --kpy-font: "Quicksand", sans-serif; --kpy-primary: #C8791A; --kpy-primary-rgb: 200, 121, 26; --kpy-primary-light: #E8A24A; --kpy-primary-dark: #8F520D; --kpy-secondary: #2A6030; --kpy-secondary-2: #1A3D1E; --kpy-secondary-light: #4A8A55; --kpy-light: #F5EFE6; --kpy-light-green: #EAF2EB; --kpy-grey: #6B6B6B; --kpy-grey-light: #D4D4D4; --kpy-base: #1C1C1C; --kpy-white: #FFFFFF; --kpy-gold: #E8A020; --kpy-shadow-sm: 0 2px 8px rgba(200,121,26,.12); --kpy-shadow-md: 0 4px 20px rgba(200,121,26,.18); --kpy-shadow-lg: 0 8px 40px rgba(42,96,48,.20); --kpy-radius: 12px; --kpy-border: rgba(200,121,26,.20); --kpy-transition: all .3s ease; }

/* ── Global font ─────────────────────────────────────────── */
body { font-family: var(--kpy-font) !important; color: var(--kpy-base); }

/*==========================================================
  Inner Page Hero Section
==========================================================*/
.hero-section { position: relative; background-color: var(--kpy-secondary-2); background-image: url('https://i.pinimg.com/1200x/81/5c/c9/815cc9a9b2f310b7b452870d15f6f9dc.jpg'); background-size: cover; background-position: center; background-attachment: fixed; height: 350px; min-height: 500px; display: flex; align-items: center; justify-content: center; color: #fff; overflow: hidden; margin-bottom: 2rem; }
.hero-overlay { background: linear-gradient(135deg, rgba(42,96,48,.82) 0%, rgba(28,28,28,.65) 100%); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 0 2rem; text-align: center; z-index: 2; }
.hero-content { max-width: 800px; margin: 0 auto; }
.hero-title { font-size: clamp(2rem,5vw,4.2rem); font-weight: 700; margin-bottom: 1rem; line-height: 1.2; text-shadow: 0 2px 20px rgba(0,0,0,.3); color: #fff; }
.hero-breadcrumb { font-size: 1rem; color: rgba(255,255,255,.9); background: rgba(255,255,255,.1); padding: .5rem 1rem; border-radius: 50px; backdrop-filter: blur(5px); display: inline-block; }
.hero-breadcrumb a { color: var(--kpy-primary-light); font-weight: 600; transition: var(--kpy-transition); }
.hero-breadcrumb a:hover { color: #fff; }
@media (max-width:768px) { .hero-section { height: 50vh; min-height: 400px; background-attachment: scroll; } }

/* ================================================================
   KEYFRAMES
   ================================================================ */

/* The morph shape — applied to the CONTENT BOX, not the background */
@keyframes morphBox {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  20%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  40%  { border-radius: 50% 60% 30% 60% / 40% 70% 60% 30%; }
  60%  { border-radius: 40% 60% 60% 40% / 60% 30% 60% 40%; }
  80%  { border-radius: 60% 30% 50% 50% / 30% 60% 40% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Morph for the section images further down the page */
@keyframes morphShape {
  0%   { border-radius: 56% 44% 34% 66% / 65% 65% 35% 35%; }
  25%  { border-radius: 44% 56% 66% 34% / 35% 65% 65% 35%; }
  50%  { border-radius: 34% 66% 56% 44% / 35% 35% 65% 65%; }
  75%  { border-radius: 66% 34% 44% 56% / 65% 35% 35% 65%; }
  100% { border-radius: 56% 44% 34% 66% / 65% 65% 35% 35%; }
}

@keyframes kpyFadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatBob  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ================================================================
   HERO SECTION
   Shared by single-program.php AND archive-program.php
   ================================================================ */

.prog-hero { position: relative; min-height: 78vh; display: flex; align-items: center; padding: 5rem 0 4rem; overflow: hidden; background-color: var(--kpy-secondary-2); background-image: url('https://i.pinimg.com/1200x/81/5c/c9/815cc9a9b2f310b7b452870d15f6f9dc.jpg'); background-size: cover; background-position: center center; background-repeat: no-repeat; }

/* Archive hero — gradient layered ON TOP of the fallback image so photo still shows if no featured image is set via inline style */
.prog-hero--archive { background-image: linear-gradient(135deg, var(--kpy-secondary-2) 0%, #2d5a1b 40%, var(--kpy-primary-dark) 100%), url('https://i.pinimg.com/1200x/81/5c/c9/815cc9a9b2f310b7b452870d15f6f9dc.jpg'); }

/* ── Thin dark scrim — keeps image visible, just tones contrast ── */
/* Only ~35% dark so the photo/gradient underneath still reads clearly */
.prog-hero-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1; }

/* ── Container sits above scrim ─────────────────────────────── */
.prog-hero-inner { position: relative; z-index: 2; }

/* ── Breadcrumb row ──────────────────────────────────────────── */
.prog-hero-breadcrumb-row { margin-bottom: 2.2rem; }
.prog-breadcrumb { --bs-breadcrumb-divider: '›'; }
.prog-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.45); }
.prog-breadcrumb a { color: rgba(255,255,255,.82); font-weight: 700; font-size: .82rem; text-decoration: none; transition: var(--kpy-transition); }
.prog-breadcrumb a:hover { color: #fff; }
.prog-breadcrumb .breadcrumb-item.active { color: rgba(255,255,255,.55); font-size: .82rem; }

/* ══════════════════════════════════════════════════════════════
   THE MORPHING CONTENT BOX
   This is the element that animates — it wraps the badge, title,
   excerpt and meta. The background colour is the brand gradient.
   The border-radius morphs continuously via morphBox keyframe.
   The photo behind it stays 100% visible.
   ══════════════════════════════════════════════════════════════ */
.prog-hero-content-morph { animation: morphBox 9s ease-in-out infinite, kpyFadeUp .8s ease both; background: linear-gradient(135deg, rgba(var(--kpy-primary-rgb), .88) 0%, rgba(42, 96, 48, .82) 100%); display: inline-block; max-width: 640px; width: 100%; padding: 2.6rem 2.6rem 2.2rem; box-shadow: 0 12px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08); }

/* Badge inside the box */
.prog-hero-badge { display: inline-block; background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.42); color: #fff; font-size: .73rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; padding: .3em 1.1em; border-radius: 50px; margin-bottom: 1rem; backdrop-filter: blur(6px); }

/* Title inside the box */
.prog-hero-title { font-family: var(--kpy-font); font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 700; color: #fff; line-height: 1.15; text-shadow: 0 2px 16px rgba(0,0,0,.2); margin-bottom: .9rem; }

/* Excerpt inside the box */
.prog-hero-excerpt { color: rgba(255,255,255,.90); font-size: 1.05rem; line-height: 1.78; margin-bottom: 1.4rem; max-width: 520px; }

/* Meta row inside the box */
.prog-hero-meta { display: flex; flex-wrap: wrap; gap: 1.1rem; color: rgba(255,255,255,.78); font-size: .83rem; font-weight: 600; }
.prog-hero-meta .bi { color: var(--kpy-gold); margin-right: .25rem; }

/* ================================================================
   SINGLE PROGRAM — CONTENT SECTIONS
   ================================================================ */
.prog-label { display: inline-flex; align-items: center; gap: .4rem; color: var(--kpy-primary); font-size: .74rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin-bottom: .45rem; }
.prog-heading { font-size: clamp(1.3rem, 2.8vw, 1.8rem); font-weight: 700; color: var(--kpy-primary-dark); margin-bottom: .9rem; line-height: 1.3; }
.prog-body { color: var(--kpy-base); font-size: 1rem; line-height: 1.88; }
.prog-body p { margin-bottom: 1rem; }
.prog-body p:last-child { margin-bottom: 0; }

/* ── Section image with morph border-radius ──────────────────── */
.prog-morph-wrap { position: relative; width: 100%; max-width: 520px; margin: 0 auto; }
.prog-morph-img { width: 100%; height: 360px; object-fit: cover; display: block; animation: morphShape 8s ease-in-out infinite; filter: drop-shadow(0 20px 50px rgba(200,121,26,.30)); }
.prog-morph-badge { position: absolute; bottom: 1.1rem; right: 0; background: var(--kpy-primary); color: #fff; font-size: .78rem; font-weight: 700; padding: .4em 1.1em; border-radius: 50px; box-shadow: var(--kpy-shadow-md); }

/* ── Objectives ──────────────────────────────────────────────── */
.prog-objectives { display: grid; gap: .65rem; }
.prog-obj-item { display: flex; align-items: flex-start; gap: .85rem; background: var(--kpy-light-green); border-left: 3px solid var(--kpy-secondary); border-radius: 0 var(--kpy-radius) var(--kpy-radius) 0; padding: .85rem 1.1rem; font-size: .95rem; line-height: 1.65; color: var(--kpy-base); }
.prog-check { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; background: var(--kpy-secondary); color: #fff; border-radius: 50%; font-size: .82rem; font-weight: 700; flex-shrink: 0; margin-top: .1rem; }

/* ── Impact Quote ────────────────────────────────────────────── */
.prog-quote { background: linear-gradient(135deg, var(--kpy-secondary), var(--kpy-secondary-2)); border-radius: 16px; padding: 2.5rem 2rem 2rem; position: relative; overflow: hidden; border: none; }
.prog-quote-icon { position: absolute; top: -1rem; left: 1rem; font-size: 8rem; color: rgba(255,255,255,.06); line-height: 1; pointer-events: none; }
.prog-quote-text { font-size: 1.1rem; font-weight: 600; color: #fff; line-height: 1.78; margin: 0 0 .9rem; position: relative; z-index: 1; }
.prog-quote-cite { color: rgba(255,255,255,.65); font-size: .85rem; font-weight: 600; font-style: normal; }

/* ── Gallery ─────────────────────────────────────────────────── */
.prog-gallery-item { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--kpy-radius); }
.prog-gallery-item img { transition: transform .45s ease; }
.prog-gallery-item:hover img { transform: scale(1.05); }

/* ── CTA Block ───────────────────────────────────────────────── */
.prog-cta { background: var(--kpy-light); border: 1px solid var(--kpy-border); border-radius: 16px; padding: 2.5rem 2rem; }
.prog-cta-icon { width: 56px; height: 56px; background: #fff; border: 2px solid var(--kpy-border); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--kpy-primary); animation: floatBob 3s ease-in-out infinite; }
.prog-cta-title { font-size: 1.4rem; font-weight: 700; color: var(--kpy-primary-dark); margin-bottom: .5rem; }
.prog-cta-text { color: var(--kpy-grey); font-size: .95rem; line-height: 1.7; margin-bottom: 1.4rem; max-width: 500px; }
.prog-btn-primary { background: var(--kpy-primary); color: #fff; border: 2px solid var(--kpy-primary); font-family: var(--kpy-font); font-weight: 700; border-radius: 50px; padding: .65em 1.8em; transition: var(--kpy-transition); box-shadow: var(--kpy-shadow-sm); }
.prog-btn-primary:hover { background: var(--kpy-primary-dark); border-color: var(--kpy-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--kpy-shadow-md); }
.prog-btn-outline { background: transparent; color: var(--kpy-secondary); border: 2px solid var(--kpy-secondary); font-family: var(--kpy-font); font-weight: 700; border-radius: 50px; padding: .65em 1.8em; transition: var(--kpy-transition); }
.prog-btn-outline:hover { background: var(--kpy-secondary); color: #fff; transform: translateY(-2px); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.prog-sidebar-wrap { position: sticky; top: 2rem; }
.prog-side-card { background: #fff; border: 1px solid var(--kpy-border); border-radius: 14px; padding: 1.4rem; box-shadow: var(--kpy-shadow-sm); }
.prog-side-title { font-size: .95rem; font-weight: 700; color: var(--kpy-primary-dark); margin: 0 0 1.1rem; padding-bottom: .7rem; border-bottom: 2px solid var(--kpy-border); display: flex; align-items: center; gap: .4rem; }
.prog-side-title .bi { color: var(--kpy-primary); }
.prog-detail-row { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--kpy-border); }
.prog-detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.prog-detail-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; background: var(--kpy-light); border-radius: 8px; color: var(--kpy-primary); font-size: .95rem; }
.prog-detail-label { font-size: .72rem; color: var(--kpy-grey); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.prog-detail-value { font-size: .88rem; color: var(--kpy-base); font-weight: 600; line-height: 1.4; }
.prog-pbar-label { font-size: .8rem; font-weight: 700; color: var(--kpy-base); }
.prog-pbar-pct { font-size: .8rem; font-weight: 700; color: var(--kpy-primary); }
.prog-progress { height: 8px !important; background: var(--kpy-light); border-radius: 50px; overflow: hidden; }
.prog-pbar-fill { background: linear-gradient(90deg, var(--kpy-primary), var(--kpy-gold)); border-radius: 50px; transition: width 1.2s cubic-bezier(.4,0,.2,1); }
.prog-related-item { display: flex; gap: .85rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--kpy-border); transition: var(--kpy-transition); }
.prog-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.prog-related-item:hover { transform: translateX(4px); }
.prog-related-thumb { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.prog-related-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--kpy-light); font-size: 1.5rem; }
.prog-related-name { font-size: .86rem; font-weight: 700; color: var(--kpy-primary-dark); line-height: 1.35; }
.prog-related-cat { font-size: .73rem; color: var(--kpy-grey); margin-top: .1rem; }
.prog-related-cat .bi { color: var(--kpy-primary); }
.prog-share-btn { font-family: var(--kpy-font); font-weight: 700; border-radius: 50px; font-size: .83rem; transition: var(--kpy-transition); text-align: left; }
.prog-share-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.prog-share-fb { background: #1877F2; color: #fff; border-color: #1877F2; }
.prog-share-x  { background: #000;    color: #fff; border-color: #000; }
.prog-share-wa { background: #25D366; color: #fff; border-color: #25D366; }

/* ================================================================
   CARD GRID (archive + shortcode — shared)
   ================================================================ */
.kpy-eyebrow { display: inline-block; color: var(--kpy-primary); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .5rem; }
.kpy-section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; color: var(--kpy-primary-dark); margin-bottom: .8rem; }
.kpy-section-sub { max-width: 600px; color: var(--kpy-grey); font-size: 1rem; line-height: 1.8; }
.kpy-filter-btn { font-family: var(--kpy-font); font-weight: 700; border-radius: 50px; border: 2px solid var(--kpy-border); background: transparent; color: var(--kpy-grey); transition: var(--kpy-transition); padding: .45em 1.25em; }
.kpy-filter-btn:hover, .kpy-filter-btn.active { border-color: var(--kpy-primary); background: var(--kpy-primary); color: #fff; }
.kpy-prog-card { border: 1px solid var(--kpy-border); border-radius: 16px; overflow: hidden; box-shadow: var(--kpy-shadow-sm); transition: var(--kpy-transition); background: #fff; }
.kpy-prog-card:hover { transform: translateY(-8px); box-shadow: var(--kpy-shadow-lg); border-color: var(--kpy-primary-light); }
.kpy-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; background: var(--kpy-light); }
.kpy-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.kpy-prog-card:hover .kpy-thumb-img { transform: scale(1.06); }
.kpy-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--kpy-light); }
.kpy-card-badge { position: absolute; top: .85rem; left: .85rem; background: var(--kpy-primary); color: #fff; font-size: .68rem; font-weight: 700; padding: .25em .85em; border-radius: 50px; letter-spacing: .06em; text-transform: uppercase; }
.kpy-card-body { padding: 1.4rem; }
.kpy-card-icon { width: 46px; height: 46px; background: var(--kpy-light); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.kpy-card-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; line-height: 1.35; }
.stretched-link-title { color: var(--kpy-primary-dark); text-decoration: none; transition: var(--kpy-transition); }
.stretched-link-title:hover { color: var(--kpy-primary); }
.kpy-card-excerpt { font-size: .87rem; color: var(--kpy-grey); line-height: 1.72; margin: 0; }
.kpy-card-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .83rem; font-weight: 700; color: var(--kpy-secondary); text-decoration: none; transition: var(--kpy-transition); padding-top: 1rem; border-top: 1px solid var(--kpy-border); width: 100%; margin-top: 1rem; }
.kpy-card-link:hover { color: var(--kpy-primary); gap: .7rem; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 991.98px) { .prog-hero { min-height: 65vh; } .prog-sidebar-wrap { position: static; } .prog-hero-content-morph { max-width: 100%; } }
@media (max-width: 767.98px) { .prog-hero { min-height: 55vh; padding: 3.5rem 0 3rem; } .prog-hero-title { font-size: clamp(1.5rem, 6vw, 2rem); } .prog-hero-content-morph { padding: 1.8rem 1.6rem 1.6rem; } .prog-morph-img { height: 280px; } }
@media (max-width: 575.98px) { .prog-hero { min-height: 50vh; } .prog-hero-meta { gap: .65rem; } .prog-cta { padding: 1.8rem 1.2rem; } .kpy-prog-card:hover { transform: translateY(-4px); } }