/* ==========================================================================
   Zikar Child Fund — Children categories, profiles & "coming soon" popup
   Used by: index.html (sectors + popup), category pages, child profile pages
   ========================================================================== */

:root {
  --zk-red: #e63946;
  --zk-red-dark: #d62839;
  --zk-navy: #1d3557;
  --zk-green: #2e7d32;
  --zk-green-soft: #e8f5e9;
}

/* ---------- Cleaner, well-spaced nav with animated underline hover ---------- */
.nav-links { gap: 34px !important; align-items: center; }
.nav-links a { position: relative; padding: 4px 2px; letter-spacing: 0.2px; }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 0;
  background: var(--zk-red);
  transition: width 0.25s ease;
}
.nav-links a:not(.btn):hover::after { width: 100%; }

/* ---------- Category status badge on the sector boxes (homepage) ---------- */
/* Narrower, taller boxes that suit the portrait photos */
.sectors-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
.sector-card { position: relative; padding: 20px !important; display: flex; flex-direction: column; }
/* push the text block to the bottom so all cards line up (desktop + mobile) */
.sector-content { margin-top: auto; }
.sector-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.sector-status.live   { background: #e8f5e9; color: #2e7d32; }
.sector-status.soon   { background: #fff4e5; color: #b26a00; }
.sector-count {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--zk-red);
}

/* Uniform image size for ALL sector boxes (live + coming soon) so every
   box matches the Cancer Care box regardless of the photo's shape */
.sector-image {
  aspect-ratio: 3 / 4;        /* fixed PORTRAIT shape on every screen size */
  width: 100%;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.sector-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* start at the top so face + body show, not just face */
  display: block;
}

/* ---------- Feature video (special school, etc.) ---------- */
.feature-video {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: block;
  border-radius: 14px;
  background: #000;
  max-height: 540px;
}

/* ---------- M-Pesa payment-slip mockup ---------- */
.mpesa-card {
  background: #fff;
  border: 2px solid #43a047;
  border-radius: 14px;
  overflow: hidden;
  margin: 16px 0 14px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.mpesa-head {
  background: #43a047;
  color: #fff;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mpesa-logo { font-weight: 800; letter-spacing: 1px; font-size: 1.15rem; }
.mpesa-head span:last-child { font-size: 0.72rem; opacity: 0.92; }
.mpesa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid #f0f2f5;
}
.mpesa-row:last-child { border-bottom: none; }
.mpesa-row small { color: #888; text-transform: uppercase; font-size: 0.66rem; letter-spacing: 1px; }
.mpesa-row strong { color: var(--zk-navy); font-size: 1.1rem; font-family: 'Courier New', monospace; letter-spacing: 1px; }

/* ---------- KCB bank card mockup ---------- */
.bank-card {
  background: linear-gradient(135deg, #00713c, #004d29);
  color: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  margin: 16px 0 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  text-align: left;
}
.bank-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.bank-name { font-weight: 800; letter-spacing: 1.5px; font-size: 1.15rem; }
.bank-chip {
  width: 44px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, #f4d03f, #b8860b);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.bank-acc-no {
  font-size: 1.5rem;
  letter-spacing: 4px;
  font-family: 'Courier New', monospace;
  margin-bottom: 22px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.bank-card-bottom { display: flex; justify-content: space-between; gap: 10px; }
.bank-card-bottom small { font-size: 0.62rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }
.bank-card-bottom strong { font-size: 0.95rem; letter-spacing: 0.5px; }
.copy-btn {
  background: #fff;
  color: #00713c;
  border: 2px solid #00713c;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { background: #00713c; color: #fff; }

/* ---------- "What Your Support Provides" band ---------- */
.provides-section { padding: 60px 20px; background: #fff; }
.provides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  max-width: 1100px;
  margin: 0 auto;
}
.provide-card {
  background: #f8f9fb;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.provide-card:hover { transform: translateY(-5px); box-shadow: 0 10px 26px rgba(0,0,0,0.08); }
.provide-card .pico { font-size: 2.6rem; display: block; margin-bottom: 12px; }
.provide-card h3 { color: var(--zk-navy); font-size: 1.12rem; margin-bottom: 8px; }
.provide-card p { color: #666; font-size: 0.9rem; line-height: 1.6; }

/* ---------- "We can't do this without you" CTA ---------- */
.join-cta {
  background: linear-gradient(135deg, var(--zk-red), #ff6b6b);
  color: #fff;
  text-align: center;
  padding: 64px 20px;
}
.join-cta h2 { font-size: 2rem; margin-bottom: 14px; color: #fff; }
.join-cta p { max-width: 680px; margin: 0 auto 28px; font-size: 1.08rem; line-height: 1.7; opacity: 0.96; }
.join-cta .join-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.join-cta a {
  padding: 14px 28px; border-radius: 30px; font-weight: 700;
  text-decoration: none; transition: transform 0.2s, background 0.2s, color 0.2s;
}
.join-cta a.wa { background: #fff; color: var(--zk-red); }
.join-cta a.wa:hover { transform: translateY(-2px); }
.join-cta a.outline { border: 2px solid #fff; color: #fff; }
.join-cta a.outline:hover { background: #fff; color: var(--zk-red); }

/* ---------- Category landing page ---------- */
.cat-hero {
  background: linear-gradient(135deg, var(--zk-navy), #2a4a73);
  color: #fff;
  padding: 70px 20px 60px;
  text-align: center;
}
.cat-hero .cat-emoji { font-size: 3rem; display: block; margin-bottom: 10px; }
.cat-hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.cat-hero p { max-width: 720px; margin: 0 auto; opacity: 0.92; line-height: 1.7; }

.kids-wrap { max-width: 1100px; margin: -30px auto 60px; padding: 0 20px; }

.kids-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.kid-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.kid-card:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(0,0,0,0.14); }

.kid-media { position: relative; aspect-ratio: 3 / 4; background: #f0f0f0; }
.kid-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

.kid-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.kid-body h3 { color: var(--zk-navy); font-size: 1.25rem; margin-bottom: 8px; }

.condition-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: #ffebee;
  color: #c62828;
}

.kid-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.kid-btn {
  flex: 1;
  text-align: center;
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.kid-btn.primary { background: var(--zk-red); color: #fff; }
.kid-btn.primary:hover { background: var(--zk-red-dark); }
.kid-btn.ghost { background: transparent; color: var(--zk-navy); border: 2px solid #e0e0e0; }
.kid-btn.ghost:hover { border-color: var(--zk-red); color: var(--zk-red); }

.cat-back { text-align: center; margin: 10px 0 50px; }

/* Icon thumbnail used instead of stock photos on "coming soon" / program boxes */
.sector-icon-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--zk-navy), #2a4a73);
  color: #fff;
}
.sector-icon-ph span { font-size: 4.6rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }

/* ---------- Profile: media (photo + video) ---------- */
.profile-media-grid { display: grid; gap: 16px; }
/* Video box adapts to orientation: wide videos go wide, vertical videos stay
   narrow & centred so they are never stretched */
.profile-video { width: 100%; border-radius: 14px; background: #000; display: block; }
.profile-video.landscape { max-height: 560px; }
.profile-video.portrait { max-width: 360px; max-height: 640px; margin: 0 auto; }

/* Photo gallery — horizontal scroll strip with arrows */
.gallery-wrap { position: relative; }
.gallery-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.gallery-scroller::-webkit-scrollbar { height: 8px; }
.gallery-scroller::-webkit-scrollbar-thumb { background: #ccc; border-radius: 8px; }
.gallery-scroller img {
  flex: 0 0 auto;
  width: 165px;
  height: 165px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 12px;
  cursor: zoom-in;
  scroll-snap-align: start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-scroller img:hover { transform: scale(1.04); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.gscroll {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(29,53,87,0.9);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}
.gscroll:hover { background: var(--zk-red); }
.gscroll.prev { left: -6px; }
.gscroll.next { right: -6px; }

/* Full-screen image lightbox with next/prev */
.lb-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 3000; align-items: center; justify-content: center; padding: 16px;
  animation: csFade 0.2s ease;
}
.lb-overlay.show { display: flex; }
.lb-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.lb-close {
  position: fixed; top: 18px; right: 24px; color: #fff; font-size: 2.6rem;
  background: none; border: none; cursor: pointer; line-height: 1; z-index: 3001;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 2.2rem;
  border: none; cursor: pointer; line-height: 1; z-index: 3001;
  transition: background 0.2s;
}
.lb-nav:hover { background: rgba(255,255,255,0.35); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-counter {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,0.5); padding: 6px 16px; border-radius: 20px;
  font-size: 0.9rem; z-index: 3001;
}
.story-placeholder {
  background: #fffdf5;
  border: 2px dashed #e0c97a;
  border-radius: 12px;
  padding: 18px 22px;
  color: #8a6d1a;
  font-style: italic;
}

/* ---------- Green "coming soon" popup ---------- */
.cs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: csFade 0.25s ease;
}
.cs-overlay.show { display: flex; }
.cs-box {
  background: #fff;
  border-top: 8px solid var(--zk-green);
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  padding: 34px 30px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: csPop 0.3s ease;
}
.cs-box .cs-icon {
  width: 70px; height: 70px;
  margin: 0 auto 16px;
  background: var(--zk-green-soft);
  color: var(--zk-green);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
}
.cs-box h3 { color: var(--zk-green); font-size: 1.4rem; margin-bottom: 12px; }
.cs-box .cs-cat { font-weight: 700; color: var(--zk-navy); }
.cs-box p { color: #555; line-height: 1.7; margin-bottom: 18px; }
.cs-contact {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  margin-bottom: 20px;
}
.cs-contact a { color: var(--zk-red); text-decoration: none; font-weight: 600; }
.cs-contact a:hover { text-decoration: underline; }
.cs-contact .row { padding: 7px 0; display: flex; align-items: center; gap: 10px; }
.cs-close {
  background: var(--zk-green);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.cs-close:hover { background: #256628; }

@keyframes csFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes csPop { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .cat-hero h1 { font-size: 1.7rem; }
  .kid-media { height: 220px; }
}

/* ---------- Profile page layout (shared by all 12 child pages) ---------- */
.profile-container { max-width: 820px; margin: 40px auto; padding: 20px; }
.profile-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08); margin-bottom: 26px;
}
/* Show the WHOLE photo (no cropping) so visitors see the full child; click to zoom */
.profile-image-wrapper { background: #11161d; text-align: center; }
.profile-image-wrapper img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}
.profile-info { padding: 28px 30px; }
.profile-info h1 { color: var(--zk-red); margin-bottom: 8px; font-size: 2rem; font-weight: 700; }
.status-tag {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 14px;
  background: #ffebee; color: #c62828;
}
.diagnosis { color: #666; font-size: 1.1rem; }
.profile-section {
  background: #fff; border-radius: 16px; padding: 28px 30px;
  margin-bottom: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.profile-section h2 {
  color: var(--zk-red); margin-bottom: 16px; font-size: 1.4rem; font-weight: 600;
  border-bottom: 2px solid #f5f5f5; padding-bottom: 12px;
}
.profile-section p { color: #555; line-height: 1.8; }
.sponsor-box { background: #fafafa; border: 2px solid var(--zk-red); }
.sponsor-box form { display: flex; flex-direction: column; gap: 16px; }
.sponsor-box label { color: #333; font-weight: 600; font-size: 0.95rem; }
.sponsor-box input, .sponsor-box textarea {
  padding: 14px; border: 1px solid #e0e0e0; border-radius: 10px;
  font-size: 1rem; font-family: inherit;
}
.sponsor-box input:focus, .sponsor-box textarea:focus { outline: none; border-color: var(--zk-red); }
.btn-primary {
  background: var(--zk-red); color: #fff; padding: 14px 32px; border: none;
  border-radius: 10px; cursor: pointer; font-size: 1.05rem; font-weight: 600; transition: all 0.3s;
}
.btn-primary:hover { background: var(--zk-red-dark); }
.btn-secondary {
  background: transparent; color: #666; padding: 12px 24px; border: 2px solid #ddd;
  border-radius: 10px; text-decoration: none; display: inline-block; transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--zk-red); color: var(--zk-red); }
.back-link { text-align: center; margin-top: 26px; }
.thank-you-message {
  display: none; background: #e8f5e9; border: 2px solid #4caf50; border-radius: 16px;
  padding: 36px; text-align: center; animation: csFade 0.5s ease;
}
.thank-you-message.show { display: block; }
.thank-you-message .icon { font-size: 3.5rem; margin-bottom: 16px; }
.thank-you-message h2 { color: var(--zk-green); font-size: 1.7rem; margin-bottom: 12px; }
.thank-you-message p { color: #555; font-size: 1.05rem; line-height: 1.7; margin-bottom: 10px; }
.support-details { background: #fff; border-radius: 12px; padding: 22px; margin: 22px 0; text-align: left; }
.support-details h3 { color: var(--zk-red); margin-bottom: 14px; font-size: 1.15rem; }
.detail-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f0f0f0; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: #888; font-weight: 500; }
.detail-value { color: #333; font-weight: 600; }
@media (max-width: 600px) { .profile-image-wrapper img { height: 300px; } }
