/*
Theme Name: Hello Elementor Child — Mpala
Theme URI: https://mpala.org/
Description: Mpala Research Centre child theme.
Author: Red Bunny Consulting
Author URI: https://redbunny.co.ke/
Template: hello-elementor
Version: 1.0.6
Text Domain: hello-elementor-child-mpala
*/

/* =========================================================================
   :root — Mpala design tokens
   ========================================================================= */

:root {
  --mpala-brown: #BC5C39;
  --mpala-green: #728B75;
  --mpala-cream: #E1DDD3;
  --mpala-gold: #E3B23C;
  --mpala-navy: #384360;
  --mpala-charcoal: #2F3A3A;
  --mpala-text: #1A1A1A;

  --mpala-grey-900: #1A1A1A;
  --mpala-grey-800: #2F3A3A;
  --mpala-grey-700: #4A5568;
  --mpala-grey-600: #718096;
  --mpala-grey-500: #A0AEC0;
  --mpala-grey-400: #CBD5E0;
  --mpala-grey-300: #E2E8F0;
  --mpala-grey-200: #EDF2F7;
  --mpala-grey-100: #F7FAFC;
  --mpala-white: #FFFFFF;

  --mpala-theme-wildlife-primary: #C76E37;
  --mpala-theme-wildlife-secondary: #8B4513;
  --mpala-theme-wildlife-tint: #F5E6D3;
  --mpala-theme-ecology-primary: #4A7C59;
  --mpala-theme-ecology-secondary: #2D5233;
  --mpala-theme-ecology-tint: #DCEAD7;
  --mpala-theme-health-primary: #B23A48;
  --mpala-theme-health-secondary: #800020;
  --mpala-theme-health-tint: #F4D5D9;
  --mpala-theme-people-primary: #5B7FA0;
  --mpala-theme-people-secondary: #2F4F6F;
  --mpala-theme-people-tint: #DCE6EE;

  --mpala-font-primary: &#039;Ubuntu&#039;, system-ui, -apple-system, BlinkMacSystemFont, &#039;Segoe UI&#039;, Roboto, sans-serif;
  --mpala-font-mono: &#039;Ubuntu Mono&#039;, ui-monospace, &#039;SF Mono&#039;, Menlo, monospace;

  --mpala-fw-regular: 400;
  --mpala-fw-medium: 500;
  --mpala-fw-bold: 700;
  --mpala-fw-black: 900;

  --mpala-fs-h1: clamp(2.5rem, 1.5rem + 2.5vw, 4rem);
  --mpala-fs-h2: clamp(2rem, 1.25rem + 2vw, 3rem);
  --mpala-fs-h3: clamp(1.5rem, 1.125rem + 1.25vw, 2rem);
  --mpala-fs-h4: clamp(1.25rem, 1rem + 0.75vw, 1.5rem);
  --mpala-fs-h5: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --mpala-fs-h6: 1rem;
  --mpala-fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --mpala-fs-small: 0.875rem;
  --mpala-fs-tiny: 0.75rem;

  --mpala-lh-tight: 1.15;
  --mpala-lh-snug: 1.35;
  --mpala-lh-normal: 1.5;
  --mpala-lh-relaxed: 1.65;

  --mpala-ls-tight: -0.02em;
  --mpala-ls-normal: 0;
  --mpala-ls-wide: 0.05em;
  --mpala-ls-wider: 0.1em;

  --mpala-space-1: 0.5rem;
  --mpala-space-2: 1rem;
  --mpala-space-3: 1.5rem;
  --mpala-space-4: 2rem;
  --mpala-space-5: 2.5rem;
  --mpala-space-6: 3rem;
  --mpala-space-7: 4rem;
  --mpala-space-8: 5rem;
  --mpala-space-9: 6rem;
  --mpala-space-10: 8rem;

  --mpala-container-gap: var(--mpala-space-4);
  --mpala-container-padding: var(--mpala-space-3);
  --mpala-inline-gap: var(--mpala-space-2);

  --mpala-radius-button: 8px;
  --mpala-radius-card: 8px;
  --mpala-radius-pill: 9999px;
  --mpala-radius-sharp: 0px;

  --mpala-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --mpala-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --mpala-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --mpala-transition-fast: 150ms ease;
  --mpala-transition: 250ms ease;
  --mpala-transition-slow: 400ms ease;
}

/* =========================================================================
   Base typography
   ========================================================================= */

body {
  font-family: var(--mpala-font-primary);
  font-size: var(--mpala-fs-body);
  line-height: var(--mpala-lh-normal);
  color: var(--mpala-text);
  /* Per Editorial Brief V6 §3.2: page base is WHITE on every page.
     Cream is a section-level band, never a page background. */
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mpala-font-primary);
  font-weight: var(--mpala-fw-bold);
  line-height: var(--mpala-lh-tight);
  letter-spacing: var(--mpala-ls-tight);
  color: var(--mpala-charcoal);
}

h1 { font-size: var(--mpala-fs-h1); font-weight: var(--mpala-fw-black); }
h2 { font-size: var(--mpala-fs-h2); }
h3 { font-size: var(--mpala-fs-h3); }
h4 { font-size: var(--mpala-fs-h4); }
h5 { font-size: var(--mpala-fs-h5); font-weight: var(--mpala-fw-medium); }
h6 { font-size: var(--mpala-fs-h6); font-weight: var(--mpala-fw-medium); text-transform: uppercase; letter-spacing: var(--mpala-ls-wide); }

a {
  color: var(--mpala-navy);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--mpala-transition-fast);
}

a:hover { color: var(--mpala-gold); }

a:focus-visible {
  outline: 2px solid var(--mpala-gold);
  outline-offset: 2px;
  border-radius: var(--mpala-radius-button);
}

button, .button, input[type="submit"] {
  font-family: var(--mpala-font-primary);
  font-weight: var(--mpala-fw-medium);
  font-size: var(--mpala-fs-body);
  border-radius: var(--mpala-radius-button);
  padding: var(--mpala-space-2) var(--mpala-space-3);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--mpala-transition-fast);
}

img { max-width: 100%; height: auto; vertical-align: middle; }

.skip-link {
  position: absolute; left: -9999px; z-index: 999;
  padding: var(--mpala-space-2) var(--mpala-space-3);
  background: var(--mpala-charcoal);
  color: var(--mpala-cream);
  border-radius: var(--mpala-radius-button);
  text-decoration: none;
}

.skip-link:focus { left: var(--mpala-space-2); top: var(--mpala-space-2); }

::selection { background: var(--mpala-gold); color: var(--mpala-charcoal); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .no-print, nav, header, footer { display: none !important; }
}

/* =========================================================================
   Mpala Footer — pill sits at brush boundary, panel green matches brush
   Updated 3 May 2026
   ========================================================================= */

.elementor-location-footer {
  position: relative;
  overflow: visible;
}

/* Override panel green to match the brush color exactly + lift up to pill level
   + strip leftover UAE bg image */
.elementor-location-footer .mpala-footer-cols,
.elementor-location-footer > .e-con:nth-child(2) {
  background-color: var(--mpala-green) !important;
  background-image: none !important;
  margin-top: -50px !important;
  position: relative;
}

/* Reset newsletter container margin */
.elementor-location-footer .mpala-footer-news,
.elementor-location-footer > .e-con:first-child {
  margin-top: 0 !important;
  position: relative;
  z-index: 2;
}

/* Brush at top of green panel, with pill overlapping */
.elementor-location-footer .mpala-footer-cols::before,
.elementor-location-footer > .e-con:nth-child(2)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: 0;
  right: 0;
  height: 50px;
  background-image: url(&#039;https://redbunnydev.africa/mpala/wp-content/uploads/2026/05/brush-green-up.svg&#039;);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 1;
  display: block;
}

@media (max-width: 768px) {
  .elementor-location-footer .mpala-footer-cols,
  .elementor-location-footer > .e-con:nth-child(2) {
    margin-top: -25px !important;
  }
  .elementor-location-footer .mpala-footer-cols::before,
  .elementor-location-footer > .e-con:nth-child(2)::before {
    top: -12px;
    height: 25px;
  }
}

.bse-card__excerpt,
.bse-featured__excerpt { display: none !important; }


/* Featured Story full-bleed cream band */
.meh-featured-injected.mnh-featured-injected { background: #E1DDD3; padding-block: 56px; }
.mnh-featured { background: transparent !important; padding-block: 0 !important; max-width: 1200px; margin-inline: auto; }


/* ====================================================================
   Stories from the Bush video card play overlay
   For posts tagged stories-from-the-bush (id 81): the inline
   sb-video-thumb image gets a circular play-button overlay so the
   card communicates "video" at a glance.
   ==================================================================== */
.sb-video-thumb { position: relative; display: block; overflow: hidden; border-radius: 12px; }
.sb-video-thumb a { display: block; position: relative; }
.sb-video-thumb img { display: block; width: 100%; height: auto; border-radius: 12px; transition: transform .3s ease; }
.sb-video-thumb:hover img { transform: scale(1.03); }
.sb-video-thumb a::before { content: ""; position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(0,0,0,0.55); border-radius: 50%; pointer-events: none; transition: background .2s ease, transform .2s ease; z-index: 2; }
.sb-video-thumb a::after  { content: "\25B6"; position: absolute; top: 50%; left: 50%; transform: translate(-46%, -50%); color: #fff; font-size: 28px; font-family: -apple-system, "Segoe UI Symbol", sans-serif; line-height: 1; pointer-events: none; z-index: 3; }
.sb-video-thumb a:hover::before { background: rgba(196,98,45,0.85); transform: scale(1.05); }
/* The full iframe is hidden on archive cards; visible only on single-post page */
.archive .sb-video-thumb + .wp-block-embed,
.blog .sb-video-thumb + .wp-block-embed,
.search .sb-video-thumb + .wp-block-embed { display: none; }


/* Bush card thumbnail aspect ratio — match standard card 16:9, no letterbox bars */
.bse-card__thumb { aspect-ratio: 16/9; overflow: hidden; }
.bse-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.bse-card__thumb--video { background: #000; }
.bse-card__thumb--video img { width: 100%; height: 100%; object-fit: cover; }

/* === BUSH-MPALA UNIFY === */
/* Bush + mpala cards use IDENTICAL layout/sizing. Only difference: bush gets a play overlay + Watch CTA. */
.bse-card, .mne-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bse-card__thumb, .mne-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0ede8;
}
.bse-card__thumb img, .mne-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.bse-card__body, .mne-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 8px;
}
.bse-card__title, .mne-card__title {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: #1a1a1a;
}
.bse-card__excerpt, .mne-card__excerpt {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bse-card__footer, .mne-card__meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: #888;
}
/* Play overlay — the ONLY visual difference between bush + mpala cards */
.bse-card__play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.15);
  pointer-events: none;
  transition: background .2s;
}
.bse-card:hover .bse-card__play-overlay { background: rgba(0,0,0,0.25); }
.bse-card__play-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(227,178,60,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* Loading state on Load More */
.mne-load-more.is-loading { opacity: 0.6; cursor: wait; }
/* === END BUSH-MPALA UNIFY === */
