/* =========================================================
   COOAAFRO-RO — custom stylesheet
   Palette: nature/agri-inspired green + amber, on Bootstrap 5
   ========================================================= */

:root {
  --green-900: #123420;
  --green-800: #17492b;
  --green-700: #1e5c36;
  --green-600: #2e7d46;
  --green-500: #3f9457;
  --green-100: #e7f2e9;
  --green-050: #f3f8f2;
  --amber-500: #d9a441;
  --amber-600: #c48f2c;
  --cream: #fbf8f2;
  --ink-900: #1c2418;
  --ink-600: #4d5a48;
  --ink-400: #7c8a76;
  --white: #ffffff;

  --green-logo: #003813;

  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 10px 30px rgba(18, 52, 32, 0.10);
  --shadow-hover: 0 16px 40px rgba(18, 52, 32, 0.18);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background-color: var(--cream);
  overflow-x: hidden;
  overflow-x: clip;   /* clip (unlike hidden) doesn't create a scroll container, so position: sticky keeps working */
}

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--green-900);
}

a { text-decoration: none; }

.text-green { color: var(--green-700); }
.text-amber { color: var(--amber-500); }
.bg-green { background-color: var(--green-700); }
.bg-green-900 { background-color: var(--green-900); }
.bg-green-050 { background-color: var(--green-050); }
.bg-cream { background-color: var(--cream); }

/* ---------- Section kicker / titles ---------- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-600);
  background: var(--green-100);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.6rem;
}

.section-lead {
  color: var(--ink-600);
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn-cooaafro {
  background-color: var(--green-700);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all 0.25s ease;
}
.btn-cooaafro:hover { background-color: var(--green-800); color: var(--white); transform: translateY(-2px); }

.btn-cooaafro-outline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all 0.25s ease;
}
.btn-cooaafro-outline:hover { background-color: var(--white); color: var(--green-800); border-color: var(--white); }

.btn-amber {
  background-color: var(--amber-500);
  color: var(--green-900);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  font-weight: 700;
  font-family: var(--font-heading);
  transition: all 0.25s ease;
}
.btn-amber:hover { background-color: var(--amber-600); color: var(--green-900); transform: translateY(-2px); }

/* ---------- Site header (fixed) ---------- */
.site-header { z-index: 1030; }

/* ---------- Navbar ---------- */
.navbar-cooaafro {
  padding: 18px 0;
  transition: all 0.3s ease;
  background-color: transparent;
}
.site-header.scrolled .navbar-cooaafro {
  background-color: rgba(251, 248, 242, 0.97);
  box-shadow: var(--shadow-soft);
  padding: 10px 0;
}
.navbar-cooaafro .navbar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--green-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-cooaafro .navbar-brand .brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.navbar-cooaafro .navbar-brand .brand-logo {
  height: 52px;
  width: auto;
  display: block;
}
/* The logo has a transparent background, so its dark-green artwork needs a cream
   cut over dark sections. data-tone on .site-header picks one; the cream cut is the
   default because every page opens on a dark hero or photo header. */
.navbar-cooaafro .navbar-brand .brand-logo--on-light { display: none; }
.navbar-cooaafro .navbar-brand .brand-logo--on-dark { display: block; }
.site-header[data-tone="light"] .navbar-cooaafro .navbar-brand .brand-logo--on-light { display: block; }
.site-header[data-tone="light"] .navbar-cooaafro .navbar-brand .brand-logo--on-dark { display: none; }
.site-header.scrolled .navbar-cooaafro .navbar-brand .brand-logo--on-light { display: block; }
.site-header.scrolled .navbar-cooaafro .navbar-brand .brand-logo--on-dark { display: none; }
.navbar-cooaafro .nav-link {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink-900) !important;
  margin: 0 10px;
  position: relative;
}
.navbar-cooaafro .nav-link.active,
.navbar-cooaafro .nav-link:hover { color: var(--green-700) !important; }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; font-family: var(--font-heading); }
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid rgba(18,52,32,0.14);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-900);
  box-shadow: var(--shadow-soft);
}
.lang-switch-btn:hover { border-color: var(--green-600); }
.lang-switch-btn .fi {
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
  font-size: 1.05rem;
}
.lang-switch-btn i.fa-chevron-down { font-size: 0.7rem; color: var(--ink-400); transition: transform 0.2s ease; }
.lang-switch.open .lang-switch-btn i.fa-chevron-down { transform: rotate(180deg); }
.lang-switch-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  min-width: 170px;
  padding: 6px;
  z-index: 1050;
}
.lang-switch.open .lang-switch-menu { display: block; }
.lang-switch-menu button,
.lang-switch-menu a {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: none; background: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-900);
  text-align: left;
  text-decoration: none;
}
.lang-switch-menu button .fi,
.lang-switch-menu a .fi { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); font-size: 1.05rem; }
.lang-switch-menu button:hover,
.lang-switch-menu a:hover { background: var(--green-050); }
.lang-switch-menu a.pll-current-lang { background: var(--green-050); font-weight: 700; }

/* On dark hero navbar, give the switcher a touch more contrast */
.site-header:not(.scrolled) .navbar-on-hero .lang-switch-btn {
  background: rgba(255,255,255,0.95);
}

/* ---------- Navbar dropdown (Quem Somos) ---------- */
.navbar-cooaafro .dropdown-menu {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  margin-top: 10px;
}
.navbar-cooaafro .dropdown-item {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-900);
  border-radius: 8px;
  padding: 9px 14px;
}
.navbar-cooaafro .dropdown-item:hover,
.navbar-cooaafro .dropdown-item:focus { background: var(--green-050); color: var(--green-700); }

/* Hero variant of navbar (transparent, light text) on dark hero */
.site-header:not(.scrolled) .navbar-on-hero .nav-link { color: var(--white) !important; }
.site-header:not(.scrolled) .navbar-on-hero .navbar-brand { color: var(--white); }
.site-header:not(.scrolled) .navbar-on-hero .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.site-header:not(.scrolled) .navbar-on-hero .navbar-toggler { border-color: rgba(255,255,255,0.4); }
.site-header:not(.scrolled) .navbar-on-hero .dropdown-toggle::after { border-top-color: var(--white); }

/* ---------- Hero ---------- */
.hero-static {
  height: 92vh; min-height: 560px;
  display: flex; align-items: center;
  position: relative;
  background-color: var(--green-800);
  background-image: var(--hero-poster, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.hero-static .container { position: relative; z-index: 2; }

/* Shared brand-green wash used on the homepage hero and every page-header,
   tuned to the logo's own green (#003813) rather than the site's --green-900. */
.brand-green-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,56,19,0.55) 0%, rgba(0,56,19,0.80) 100%);
}
.hero-eyebrow {
  color: var(--amber-500);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}
.hero-title {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}
.hero-subtitle {
  color: rgba(255,255,255,0.92);
  max-width: 560px;
  font-size: 1.1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

.page-header {
  padding: 160px 0 90px;
  background-color: var(--green-800);
  position: relative;
  overflow: hidden;
}
.page-header-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 767px) {
  /* Skip video on mobile — the photo layer (.page-header__bg) covers it */
  .page-header-video { display: none; }
}
.page-header .container { position: relative; z-index: 2; }
.page-header h1 { color: var(--white); }
.page-header .breadcrumb-cooaafro { color: rgba(255,255,255,0.75); font-family: var(--font-heading); font-weight: 600; }
.page-header .breadcrumb-cooaafro a { color: var(--amber-500); }

/* ---------- Cards ---------- */
.card-cooaafro {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  height: 100%;
  border-top: 4px solid transparent;
}
.card-cooaafro:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--amber-500);
}
.card-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}

.value-card { text-align: center; padding: 2rem 1.4rem; }
.value-card .card-icon { margin: 0 auto 1.2rem; }
.card-desc p:last-child,
.news-modal-content .wp-block-post-content > p:last-child,
.team-body p:last-child { margin-bottom: 0; }

/* ---------- News cards ---------- */
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.news-card-media {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.news-card-media-icon {
  background: linear-gradient(120deg, var(--green-800), var(--green-700));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.9);
  font-size: 2.4rem;
}
.news-card-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--amber-500); color: var(--green-900);
  font-family: var(--font-heading); font-weight: 700; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.32rem 0.75rem; border-radius: 999px;
}
.news-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.news-card-date { font-size: 0.82rem; color: var(--green-700); font-weight: 700; margin-bottom: 0.4rem; }
.news-card-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--green-900); margin-bottom: 0.6rem; line-height: 1.35; }
.news-card-excerpt { color: var(--ink-600); font-size: 0.92rem; flex: 1; line-height: 1.6; }
.news-card-excerpt p { margin: 0; }
a.news-card { cursor: pointer; }
.news-card-readmore {
  display: inline-flex; align-items: center;
  color: var(--green-700); font-family: var(--font-heading); font-weight: 700; font-size: 0.86rem;
  margin-top: 1rem; transition: gap 0.2s ease;
}
.news-card:hover .news-card-readmore { color: var(--amber-600); }
.news-card:hover .news-card-readmore i { transform: translateX(4px); }
.news-card-readmore i { transition: transform 0.2s ease; }

/* ---------- News modal ---------- */
.news-modal-content { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.news-modal-media {
  height: 240px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.news-modal-media .btn-close { position: absolute; top: 1rem; right: 1rem; opacity: 1; background-color: rgba(18,52,32,0.55); border-radius: 50%; padding: 0.5rem; }
.news-modal-media .btn-close:hover { background-color: rgba(18,52,32,0.8); }

/* ---------- Stats / counters ---------- */
.stats-section { background: var(--green-900); position: relative; overflow: hidden; }
.stats-section::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(217,164,65,0.12), transparent 40%);
}
.stat-item { text-align: center; position: relative; z-index: 1; }
.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--amber-500);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.stat-label {
  color: rgba(255,255,255,0.8);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Timeline (história) ---------- */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: "";
  position: absolute; left: 12px; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--green-100);
}
.timeline-item { position: relative; padding-bottom: 2.6rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -40px; top: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-700);
  border: 4px solid var(--green-100);
}
.timeline-year {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--amber-600);
  margin-bottom: 4px;
}

/* ---------- Checklist (realizações) ---------- */
.check-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 1.1rem; }
.check-item .check-icon {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--green-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  margin-top: 2px;
}

/* ---------- Team ---------- */
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  height: 100%;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.team-photo {
  aspect-ratio: 4/3;
  background: var(--green-100);
  color: var(--green-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
}
.team-body { padding: 1.4rem 1.2rem; }
.team-name { font-family: var(--font-heading); font-weight: 700; margin-bottom: 0.15rem; }
.team-name a { color: var(--green-900); }
.team-name a:hover { color: var(--green-600); }
.team-role { color: var(--green-600); font-weight: 600; font-size: 0.9rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--green-800), var(--green-700));
  border-radius: var(--radius-lg);
  padding: 3.2rem 2.5rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(217,164,65,0.18);
}

/* ---------- Footer ---------- */
.footer-cooaafro { background: var(--green-900); color: rgba(255,255,255,0.75); }
.footer-cooaafro h5 { color: var(--white); font-family: var(--font-heading); margin-bottom: 1.1rem; }
.footer-cooaafro a { color: rgba(255,255,255,0.75); }
.footer-cooaafro a:hover { color: var(--amber-500); }
.footer-cooaafro .social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: all 0.25s ease;
}
.footer-cooaafro .social-icon:hover { background: var(--amber-500); color: var(--green-900); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.2rem; margin-top: 2.5rem; font-size: 0.85rem; }

/* ---------- Placeholder image blocks ---------- */
.img-placeholder {
  background: repeating-linear-gradient(45deg, var(--green-100), var(--green-100) 12px, var(--green-050) 12px, var(--green-050) 24px);
  color: var(--green-600);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 1rem;
  min-height: 220px;
}

/* ---------- Search ---------- */
.search-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(18,52,32,0.14);
  box-shadow: var(--shadow-soft);
  color: var(--ink-900);
  font-size: 1rem;
  transition: all 0.2s ease;
}
.search-toggle-btn:hover { color: var(--green-700); border-color: var(--green-600); }
.site-header:not(.scrolled) .navbar-on-hero .search-toggle-btn { background: rgba(255,255,255,0.95); }

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18,52,32,0.82);
  z-index: 1070;
  padding: 10vh 20px 20px;
  overflow-y: auto;
}
.search-overlay.open { display: block; }
.search-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}
.search-box-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(18,52,32,0.1);
  color: var(--ink-400);
}
.search-box-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: transparent;
}
.search-box-input .search-close {
  border: none;
  background: none;
  color: var(--ink-400);
  font-size: 1rem;
  padding: 4px;
}
.search-box-input .search-close:hover { color: var(--ink-900); }
.search-results {
  list-style: none;
  margin: 0;
  padding: 10px;
  max-height: 50vh;
  overflow-y: auto;
}
.search-results li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink-900);
}
.search-results li a:hover { background: var(--green-050); }
.search-result-title { font-family: var(--font-heading); font-weight: 700; }
.search-result-sub { font-size: 0.85rem; color: var(--ink-400); }
.search-no-results { padding: 14px; color: var(--ink-400); text-align: center; }

/* ---------- RTL (Arabic) ---------- */
[dir="rtl"] .timeline { padding-left: 0; padding-right: 40px; }
[dir="rtl"] .timeline::before { left: auto; right: 12px; }
[dir="rtl"] .timeline-dot { left: auto; right: -40px; }
[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }
[dir="rtl"] .search-box-input .fa-magnifying-glass { order: 2; }
[dir="rtl"] .search-box-input .search-close { order: 3; }
[dir="rtl"] .search-box-input input { order: 1; }

/* ---------- Article media wall ----------
   Every run of photos and clips in an article body is laid on one module: equal
   square cells, three to a row, parted by hairlines. The structure lives here
   rather than in the design layer so the grid survives swapping that layer out;
   the design layer only recolours it.

   The 1px rule is drawn as an outward box-shadow on each cell, which lands in
   the 1px gap. Neighbours paint into the same gap, so the line stays 1px — and
   a part-filled last row ends cleanly instead of trailing empty ruled cells,
   which a background-coloured container would leave behind. */
.news-media {
  display: grid;
  grid-template-columns: repeat(var(--news-cols, 3), minmax(0, 1fr));
  gap: 1px;
  margin: 3rem 0;
}
.news-media__cell {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--green-050, #eef2e9);
  box-shadow: 0 0 0 1px var(--sd-line, rgba(51, 65, 31, 0.16));
}
.news-media__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
/* The cell is the button, so the whole tile is the hit area. */
.news-media__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.news-media__open img { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.news-media__open:hover img,
.news-media__open:focus-visible img { transform: scale(1.04); }
.news-media__open:focus-visible { outline: 2px solid var(--green-700, #3f5523); outline-offset: -3px; }

/* MediaElement measures the player and writes the result inline, so filling the
   cell has to be !important — and has to reach the wrappers it adds, not just
   the <video>. */
.news-media__cell--video .news-video,
.news-media__cell--video .wp-video,
.news-media__cell--video .mejs-container,
.news-media__cell--video .mejs-inner,
.news-media__cell--video .mejs-mediaelement,
.news-media__cell--video .mejs-layers,
.news-media__cell--video .mejs-layer,
.news-media__cell--video .mejs-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  background: none;
}
.news-media__cell--video video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
.news-media__cell--video .mejs-controls {
  inset: auto 0 0 0 !important;
  width: 100% !important;
  height: auto !important;
}
.news-media__cell--video .mejs-overlay-button { cursor: pointer; }

/* The wall is a composition, not a paragraph: from large screens up it steps
   out of the reading column to the full measure, the way the grid sections
   elsewhere on the site do. */
@media (min-width: 992px) {
  .news-article-content .news-media {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, calc(100vw - 4rem));
  }
}
/* A fourth column once there is room for one. This is also what keeps the
   photos sharp: they are 225px WhatsApp thumbnails, so a 300px cell is already
   stretching them and a 400px cell shows it. */
@media (min-width: 1300px) {
  .news-media { grid-template-columns: repeat(var(--news-cols-wide, 4), minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .news-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-media[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* A player bar built for a 640px video does not fit a 45vw cell: keep the
     controls that work at that size and drop the readouts that don't. */
  .news-media__cell--video .mejs-time,
  .news-media__cell--video .mejs-volume-button,
  .news-media__cell--video .mejs-horizontal-volume-slider { display: none !important; }
}
/* One item is never a wall, but guard it anyway: a lone cell fills the column. */
.news-media[data-count="1"] { grid-template-columns: minmax(0, 1fr); }

/* A photo standing on its own in the text, outside any run. */
.news-article-content__img {
  display: block;
  width: 100%;
  height: auto;
  margin: 3rem 0;
}
/* Likewise a lone clip: full width when it's landscape, held back when it is a
   portrait phone video that would otherwise run several screens tall. */
.news-video { margin: 3rem 0; }
.news-video .wp-video,
.news-video video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
.news-video--portrait { max-width: 380px; margin-inline: auto; }
.news-media__cell .news-video { margin: 0; max-width: none; }

/* ---------- Article lightbox ---------- */
html.news-lightbox-on { overflow: hidden; }
.news-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 18, 8, 0.92);
}
.news-lightbox[hidden] { display: none; }
.news-lightbox__img {
  max-width: min(100%, 1200px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.news-lightbox__close,
.news-lightbox__nav {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.news-lightbox__nav {
  width: 48px;
  height: 48px;
  font-size: 1.9rem;
}
.news-lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
}
.news-lightbox__close:hover,
.news-lightbox__nav:hover,
.news-lightbox__close:focus-visible,
.news-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.7);
}
[dir="rtl"] .news-lightbox__close { right: auto; left: clamp(0.75rem, 2vw, 1.5rem); }
[dir="rtl"] .news-lightbox__nav--prev { order: 3; }
[dir="rtl"] .news-lightbox__nav--next { order: 1; }
@media (max-width: 600px) {
  .news-lightbox { gap: 0.4rem; }
  .news-lightbox__nav { width: 38px; height: 38px; font-size: 1.5rem; }
}

/* ---------- World map ----------
   The SVG is inlined, so these rules reach the country paths directly. Every
   country is a hairline outline; the two the cooperative trades between are
   filled. Swapping which countries are highlighted is a change to this one
   selector — the drawing never has to be regenerated. */
.wm__head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem 4rem;
  align-items: end;
  margin-bottom: 3.5rem;
}
.wm__lead { margin: 0; color: var(--ink-600); max-width: 48ch; }
.wm__map { position: relative; }
.wm__svg { display: block; width: 100%; height: auto; overflow: visible; }
.wm__countries path {
  fill: none;
  stroke: var(--green-700);
  stroke-width: 0.6;
  stroke-linejoin: round;
  opacity: 0.32;
}
/* Everything here is written finished-first and hidden only once JavaScript
   has announced itself with data-js. A visitor without it gets the drawn map,
   not an empty box. */
#wm-076, #wm-180 {
  fill: var(--green-700);
  stroke: var(--green-700);
  stroke-width: 0.6;
  opacity: 1;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.wm__map[data-js]:not(.is-in) #wm-076,
.wm__map[data-js]:not(.is-in) #wm-180 { opacity: 0; }
.wm__map.is-in #wm-180 { transition-delay: 0.22s; }

/* The trade corridor, drawn from origin to destination. */
.wm__route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wm__route-line {
  fill: none;
  stroke: var(--green-700);
  stroke-width: 1.4;
  stroke-dasharray: 5 6;
  stroke-linecap: round;
  opacity: 0.55;
  /* --len is the curve's own length, measured in JS. */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s;
}
.wm__map[data-js]:not(.is-in) .wm__route-line { stroke-dashoffset: var(--len, 300); }

.wm__pin {
  position: absolute;
  margin: 0;
  padding: 0.85rem 1.1rem;
  background: var(--green-700);
  color: var(--cream, #f1ebe7);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.wm__map[data-js]:not(.is-in) .wm__pin { opacity: 0; transform: translateY(10px); }
.wm__map.is-in .wm__pin--destination { transition-delay: 0.3s; }
.wm__pin strong { display: block; font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.1; }
.wm__pin span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
/* Positioned in the map's own proportions, so they stay on their countries. */
.wm__pin--origin { left: 9%; top: 44%; }
.wm__pin--destination { left: 63%; top: 40%; }

@media (max-width: 860px) {
  .wm__head { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
  .wm__route { display: none; }
  .wm__pin { position: static; display: inline-block; margin: 1rem 1rem 0 0; opacity: 1; transform: none; }
}

/* ---------- Misc ---------- */
.section-py { padding: 6rem 0; }
@media (max-width: 767px) {
  .section-py { padding: 3.5rem 0; }
  .page-header { padding: 130px 0 60px; }
}
