/*
Theme Name: PANAP
Theme URI: https://panap.net/
Author: PANAP Development Team
Author URI: https://panap.net/
Description: Custom WordPress theme for PAN Asia Pacific. Hand-built homepage with GSAP ScrollTrigger reveals, a video-aware hero slider, a curated Resources hub (Publications, Videos, Campaign Tools) with AJAX faceted search, and native WordPress custom fields throughout — no page-builder dependency on the homepage. Inner pages are Elementor-ready.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: panap
Tags: custom-theme, non-profit, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   PANAP design system — ported verbatim from ui-design/panap/style.css.
   Google Fonts are enqueued in inc/enqueue.php rather than @import-ed here
   so WordPress owns the handle and the request is not render-blocking.
   ========================================================================== */


:root {
  --teal: #028788;
  --teal-dark: #028889;
  --purple: #5a2f77;
  --gradient-main: linear-gradient(100deg, var(--teal) 10%, var(--purple) 75%);
  --ink: #1d2130;
  --ink-2: #141414;
  --gray-700: #525560;
  --gray-600: #666666;
  --gray-500: #5c5c5c;
  --gray-400: #726e6e;
  --border: #e0e0d8;
  --bg-soft: #f8f8f6;
  --bg-section: #f6f6f4;
  --max: 1280px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--ink-2);
  line-height: 1.5;
  background: #fff;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.eyebrow {
  color: var(--teal);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 10px;
}

.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-intro h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-lede {
  margin-top: 14px;
  color: var(--ink-2);
  line-height: 1.75;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.35);
}

.btn-gradient {
  background: var(--gradient-main);
  color: #fff;
}

.btn-gradient-sm {
  background: var(--gradient-main);
  color: #fff;
  padding: 12px 21px;
  font-size: 15px;
  font-family: "Lato", sans-serif;
}

.btn-light-sm {
  background: #fff;
  color: var(--ink-2);
  padding: 12px 21px;
  font-size: 15px;
  font-family: "Lato", sans-serif;
}

.btn-full {
  width: 100%;
}

/* .site-footer:before {
  content: "";
  background: url(./assets/images/footer-c.png);
  width: 100%;
  height: 89px;
  position: absolute;
  z-index: 21;
  background-repeat: no-repeat;
  top: 0;
  background-size: 100% 100%;
  pointer-events: none;
} */

.btn-pill {
  font-family: "Lato", sans-serif;
  padding: 11px 26px;
  font-size: 15px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 46px;
}

.logo img {
  height: 48px;
  width: auto;
}

.main-nav a {
  font-size: 16px;
  color: #424242;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.main-nav a.is-active {
  color: var(--teal-dark);
  font-weight: 700;
}

.chevron {
  width: 10px;
  height: 7px;
  color: #9a9a9a;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-icons-mini {
  display: flex;
  gap: 10px;
}

.social-icons-mini a,
.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #dbdbdb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #028889;
}

.social-icons-mini svg,
.footer-social svg {
  width: 16px;
  height: 16px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #028889;
  border-radius: 999px;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  z-index: 60;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(2, 135, 136, 0.08);
  border-color: var(--teal);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-2, #2d3748);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.climate-banner-bg:before {
  content: "";
  background: linear-gradient(45deg, #028788b0, #5a2f77b5);
  width: 100%;
  height: 100%;
  position: absolute;
}

/* ---------- Hero Slider ---------- */
.hero-slider {
  position: relative;
  min-height: 90vh;
  overflow: hidden;
  color: #fff;
}

/* Individual Slide */
.hero-slide {
  min-height: 90vh;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
  z-index: 1;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* Background */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/*
 * The slide photo is an <img> rather than a background so it carries a
 * srcset; object-fit reproduces what background-size: cover did.
 */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-watermark {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
  z-index: 2;
}

.hero-watermark--left {
  left: -60px;
  top: 40%;
  width: 260px;
  height: 400px;
  background: radial-gradient(circle, #fff, transparent 70%);
}

.hero-watermark--right {
  right: -140px;
  top: 10%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #fff, transparent 70%);
}

.hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 48px 180px;
  z-index: 3;
}

.hero-content {
  max-width: 650px;
}

.hero-content h1 {
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.2;
  margin-bottom: 22px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-content p {
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.6;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
}

.hero-content .btn {
  /* animated by GSAP */
}

/* ---------- Slider Arrow Controls ---------- */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.slider-arrow svg {
  width: 22px;
  height: 22px;
}

.slider-arrow--prev {
  left: 28px;
}

.slider-arrow--next {
  right: 28px;
}

/* ---------- Dot Navigation ---------- */
.slider-dots {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
  position: relative;
}

.slider-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.35s ease;
}

.slider-dot.is-active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.slider-dot.is-active::after {
  border-color: rgba(255, 255, 255, 0.3);
}

.slider-dot:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.8);
}

.hero-bg::after {
  content: "";
  background: url(./assets/images/hero-arc.svg) no-repeat center bottom / 100% 100%;
  width: 100%;
  height: 90px;
  position: absolute;
  z-index: 4;
  bottom: -2px;
  left: 0;
  pointer-events: none;
}

/* ---------- Download Card (floating over slider on desktop) ---------- */
.hero-download-card {
  position: absolute;
  bottom: 162px;
  right: 48px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-2);
  border-radius: 20px;
  padding: 26px 24px 28px;
  max-width: 556px;
  z-index: 10;
  transform: translateY(0);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hero-download-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 28px 60px -15px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}
.d-ww {
  text-align: end;
}
.hero-download-card p {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 500;
}

/* ---------- Campaigns ---------- */
.campaigns {
  padding: 0 0 100px 0;
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  align-items: start;
}

.containercampaigns {
  width: 100% !important;
  max-width: 100% !important;
  padding: 30px !important;
}

.campaign-card {
  display: flex;
  flex-direction: column-reverse;
  gap: 18px;
  text-align: center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.campaign-card:hover {
  transform: translateY(-6px);
}

.campaign-card--bottom {
  flex-direction: column-reverse;
}

.campaign-photo {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 257/171;
}

.campaign-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.campaign-card:hover .campaign-photo img {
  transform: scale(1.06);
}

.campaign-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.campaign-card p {
  font-size: 14.5px;
  color: var(--gray-700);
  line-height: 1.45;
}

/* ---------- Climate banner ---------- */
.climate-banner {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.climate-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.climate-banner-content h2 {
  color: #fff;
  font-size: 42px;
  margin-bottom: 18px;
}

.climate-banner-content p {
  color: #fff;
  line-height: 1.8;
  margin-bottom: 24px;
}

.container-banner-bg {
  margin-top: -271px;
}

.re-climate-justice {
  max-width: 33%;
}

.climate-banner-content {
  position: relative;
  padding: 64px 64px;
  background: url(./assets/images/climate-justice-panel.webp);
  width: 100%;
  height: 526px;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* ---------- Latest updates ---------- */
.latest-updates {
  padding: 100px 0;
}

.updates-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: start;
}

.featured-story-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 535/337;
  margin-bottom: 19px;
}

.featured-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--teal);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 22px;
}

.featured-story h3 {
  font-weight: 400;
  font-size: 23px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.story-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 15px;
}

.clock {
  width: 16px;
  height: 16px;
}

.story-list {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.story-list li {
  display: flex;
  gap: 20px;
  align-items: center;
}

.story-thumb {
  width: 140px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-copy h4 {
  font-weight: 400;
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}

/* ---------- Network partners ---------- */
.network-partners {
  padding: 0 0 100px;
  background-color: #ffffff;
  transition: background-color 0.4s ease;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.partner-card {
  background: var(--bg-section);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* The teal highlight eases in rather than snapping, so the whole card —
     background, lift and shadow — settles on one slow curve. */
  transition:
    background-color 0.55s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.55s ease;
}

.partner-card:hover {
  background: #028889;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.1);
}

/* The button's resting fill is a gradient, and a gradient cannot be
   interpolated to a flat colour. A white overlay underneath the label fades in
   instead, which keeps the swap on the same easing as the card. */
.partner-card a.btn.btn-gradient-sm {
  isolation: isolate;
  position: relative;
  transition: color 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.partner-card a.btn.btn-gradient-sm::before {
  background: #fff;
  border-radius: inherit;
  content: '';
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 0.5s cubic-bezier(0.33, 1, 0.68, 1);
  z-index: -1;
}

.partner-card:hover a.btn.btn-gradient-sm {
  color: var(--ink-2);
}

.partner-card:hover a.btn.btn-gradient-sm::before {
  opacity: 1;
}

.partner-card-top {
  background: #fff;
  padding: 24px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-card-top img {
  max-height: 100%;
}

.partner-card-body {
  padding: 22px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.partner-card h3 {
  font-size: 18px;
  transition: color 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.partner-card p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 10px;
  transition: color 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.partner-card:hover .partner-card--dark h3,
.partner-card:hover .partner-card--dark p {
  color: #fff;
}

.partner-card .btn {
  align-self: flex-start;
}

/* ---------- Social updates ---------- */
.social-updates {
  padding: 0 0 100px;
}

.section-head-row {
  display: flex;
  align-items: center;
  gap: 30px;
}

.section-head-row h2 {
  font-size: clamp(26px, 4vw, 42px);
  white-space: nowrap;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.social-card {
  background: var(--teal);
  border-radius: 20px;
  padding: 34px 28px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.social-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(2, 135, 136, 0.4);
}

.social-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.social-card-body {
  flex: 1;
  min-width: 0;
}

.social-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.meta-label {
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.meta-line {
  flex: 0.2;
  height: 2px;
  background: rgb(255 255 255);
}

.social-icon-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}

.social-icon-badge svg {
  width: 18px;
  height: 18px;
}

.social-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.social-card-row h3 {
  color: #fff;
  font-size: 21px;
  line-height: 1.45;
  font-weight: 700;
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  flex-shrink: 0;
  background: #fff;
}

.arrow-btn svg {
  width: 24px;
  height: 24px;
}

/* ---------- Social feed panel ---------- */

/*
 * Opened by clicking a social card. Lives in the social section but is
 * position: fixed — safe because nothing transforms .social-updates itself
 * (animations.js only animates its children), and a transformed ancestor
 * would quietly turn this into position: absolute.
 */

.panap-social-panel {
  position: fixed;
  inset: 0;
  /*
   * Above .panap-mobile-sticky-bar (9990), which is fixed to the bottom of
   * the viewport on phones and would otherwise cover the last 60px of the
   * panel — exactly where the "See all" link sits. A modal outranks the
   * navigation it is covering. Still below the admin bar's 99999, which is
   * handled by an offset instead so an editor keeps their toolbar.
   */
  z-index: 9995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Must beat the display:flex above, or [hidden] does nothing. */
.panap-social-panel[hidden] {
  display: none;
}

.panap-social-panel.is-open {
  opacity: 1;
}

.panap-social-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(3px);
}

.panap-social-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -20px rgba(20, 20, 20, 0.5);
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.3s ease;
}

.panap-social-panel.is-open .panap-social-dialog {
  transform: translateY(0);
}

/*
 * Pinned, not merely unshrinkable. The close button is the only guaranteed
 * way out on a touch device — there is no Escape key and the backdrop can be
 * entirely offscreen once the panel goes full-bleed — so it must never be
 * scrolled away or covered.
 */
.panap-social-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panap-social-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

.panap-social-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.panap-social-close:hover,
.panap-social-close:focus-visible {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.panap-social-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 28px 0;
  flex-shrink: 0;
}

.panap-social-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.panap-social-tab:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.panap-social-tab[aria-selected="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.panap-social-panes {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* Don't hand the scroll back to the page behind when this hits its end. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 28px 24px;
}

.panap-social-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.panap-social-item + .panap-social-item {
  border-top: 1px solid var(--border);
}

.panap-social-item-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  text-decoration: none;
  color: inherit;
}

.panap-social-item-link:hover .panap-social-item-title,
.panap-social-item-link:focus-visible .panap-social-item-title {
  color: var(--teal);
}

.panap-social-item-media {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
}

.panap-social-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panap-social-item-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: rgba(20, 20, 20, 0.35);
}

.panap-social-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.panap-social-item-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.panap-social-item-title {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.2s ease;
  /* Long YouTube titles are the norm, not the exception. */
  overflow-wrap: anywhere;
}

.panap-social-item-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-600);
  overflow-wrap: anywhere;
}

.panap-social-item-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--gray-400);
  font-size: 13px;
}

.panap-social-embed {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.panap-social-embed iframe {
  width: 100%;
  max-width: 500px;
  border: 0;
}

.panap-social-empty {
  margin: 0;
  padding: 32px 0;
  text-align: center;
  color: var(--gray-600);
}

.panap-social-all {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.panap-social-all a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.panap-social-all a:hover {
  text-decoration: underline;
}

.panap-social-all i {
  font-size: 12px;
}

body.panap-social-open {
  overflow: hidden;
}

/*
 * Sit below the admin bar rather than under it. Raising z-index above the
 * bar's 99999 would work too, but then an editor cannot reach their own
 * toolbar while the panel is open. Visitors never see either rule.
 */
body.admin-bar .panap-social-panel {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .panap-social-panel {
    top: 46px;
  }
}

/* ---------- Social feed panel: tablet ---------- */

@media (max-width: 900px) {
  .panap-social-panel {
    padding: 16px;
  }

  .panap-social-dialog {
    max-height: 90vh;
  }

  .panap-social-head {
    padding: 20px 22px 16px;
  }

  .panap-social-tabs {
    padding: 14px 22px 0;
  }

  .panap-social-panes {
    padding: 8px 22px 20px;
  }
}

/* ---------- Social feed panel: phone ---------- */

@media (max-width: 640px) {
  /*
   * Full-screen on a phone — a centred card wastes the only axis there is.
   * dvh so the panel is not cut off by the browser's collapsing toolbar;
   * the vh line above it is the fallback for anything that lacks dvh.
   */
  .panap-social-panel {
    padding: 0;
    align-items: stretch;
  }

  /*
   * No explicit height: align-items: stretch above fills whatever the fixed
   * panel occupies. That is already the visual viewport minus the admin bar
   * offset, so it is correct with a collapsing browser toolbar and correct
   * for a logged-in editor, without a dvh unit or a second measurement.
   */
  .panap-social-dialog {
    max-width: none;
    max-height: none;
    border-radius: 0;
    transform: translateY(16px);
  }

  .panap-social-head {
    padding: 16px 18px 14px;
    /* Clear of a notch or a punch-hole in landscape. */
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .panap-social-title {
    font-size: 18px;
  }

  .panap-social-tabs {
    padding: 12px 18px 0;
    /* Three or more networks would otherwise squash; let them scroll. */
    overflow-x: auto;
    scrollbar-width: none;
  }

  .panap-social-tabs::-webkit-scrollbar {
    display: none;
  }

  .panap-social-tab {
    padding: 10px 16px;
    font-size: 14px;
  }

  .panap-social-panes {
    padding: 4px 18px calc(20px + env(safe-area-inset-bottom));
  }

  .panap-social-item-link {
    /* Stays a row: a 16:9 thumbnail above 14px copy reads as two cards. */
    gap: 12px;
    padding: 14px 0;
  }

  .panap-social-item-media {
    width: 88px;
    border-radius: 8px;
  }

  .panap-social-item-title {
    font-size: 15px;
  }

  .panap-social-item-excerpt {
    font-size: 13px;
    /* Two lines is the useful amount on a phone. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .panap-social-item-arrow {
    display: none;
  }

  .panap-social-embed {
    padding: 8px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panap-social-panel,
  .panap-social-dialog {
    transition: none;
  }

  .panap-social-dialog {
    transform: none;
  }
}

/* ---------- Get involved ---------- */
.get-involved {
  padding: 0 0 110px;
}

.get-involved-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 70px;
  align-items: start;
}

.get-involved-left h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 20px;
}

.body-paragraphs {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.body-paragraphs p:first-child {
  color: var(--ink-2);
}

.body-paragraphs .muted {
  color: var(--gray-600);
}

.donation-callout {
  background: #fff;
  border: 2px solid var(--teal);
  border-radius: 16px;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.07);
  display: flex;
  gap: 24px;
  padding: 22px;
  margin-bottom: 28px;
}

.donation-callout-media {
  flex-shrink: 0;
  width: 42%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.donation-callout-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.donation-callout-body {
  position: relative;
  padding-top: 14px;
}

.accent-bar {
  display: block;
  width: 56px;
  height: 4px;
  background: var(--teal);
  border-radius: 2px;
  margin-bottom: 14px;
}

.donation-callout-body h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.donation-callout-body p {
  color: var(--ink-2);
  opacity: 0.85;
  font-size: 15px;
  line-height: 1.5;
}

.subscription-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 44px;
}

.card-header {
  margin-bottom: 26px;
}

.card-header .eyebrow {
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 15px;
}

.card-header h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.card-header p {
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.5;
}

.subscription-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-weight: 600;
  font-size: 15px;
}

.input-group input {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: "Lato", sans-serif;
  color: var(--ink-2);
}

.input-group input::placeholder {
  color: #999;
}

.form-note {
  font-size: 14px;
  color: var(--teal-dark);
  min-height: 18px;
}

/* ---------- Resources ---------- */
.resources {
  padding: 90px 0 110px;
  background: var(--bg-section);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-card:hover {
  transform: translateY(-6px);
}

.resource-cover {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 2.8/3;
}

.resource-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-card:hover .resource-cover img {
  transform: scale(1.05);
}

.resource-card h3 {
  font-size: 18px;
  line-height: 1.45;
  min-height: 52px;
}

.resource-meta {
  color: var(--gray-500);
  font-size: 14px;
}

.resource-card .btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* ---------- Petition banner ---------- */
.petition-banner {
  position: relative;
  min-height: 567.14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: 142px 24px 118px 24px;
}

.petition-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.petition-content {
  position: relative;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pill {
  font-size: 20px;
  text-transform: capitalize;
}

.petition-content h2 {
  color: #fff;
  font-size: clamp(30px, 4vw, 42px);
}

.petition-content p {
  line-height: 1.75;
  font-size: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: url(./assets/images/footer-banner.webp);
  padding: 100px 0 28px;
  background-size: cover;
  background-position: top center;
  color: #fff;
  margin-top: -65px;
  position: relative;
  z-index: 5;
  background-repeat: no-repeat;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col a {
  font-size: 16px;
  opacity: 0.92;
}

.footer-col ul.footer-bubbles-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col ul.footer-bubbles-list li {
  list-style: none;
  margin: 0;
}

.footer-col ul.footer-bubbles-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  opacity: 1;
  transition: all 0.2s ease;
}

.footer-col ul.footer-bubbles-list a:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.footer-col--contact p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 11px;
  opacity: 0.95;
}

.mailing-address {
  max-width: 380px;
}

.connect-label {
  margin-bottom: 14px !important;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.footer-social-linkedin {
  color: var(--purple);
}

.footer-bottom {
  max-width: var(--max);
  margin: 48px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #c3c3c3;
}

.divider-line--light {
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
}

.footer-bottom p {
  font-size: 15px;
  opacity: 0.9;
}

.footer-col.footer-col--contact {
  margin-top: 0;
}

.network-partner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 28px;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 24px;
}

.ew-0 {
  flex: 0 0 auto;
  width: auto;
}

.ew-0 h4 {
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

ul.network-partners-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

ul.network-partners-list li {
  list-style: none;
  margin: 0;
}

ul.network-partners-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

ul.network-partners-list a:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.panap-ext-icon {
  font-size: 10px;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

ul.network-partners-list a:hover .panap-ext-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

.partner-card:hover .partner-card-body h3,
.partner-card:hover .partner-card-body p {
  color: #fff !important;
}

.main-nav ul {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}
/* ======================= RESPONSIVE ======================= */
@media (max-width: 1100px) {
  .campaigns-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .campaigns-grid .campaign-card:nth-child(4),
  .campaigns-grid .campaign-card:nth-child(5) {
    grid-column: span 1;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col--contact {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .header-inner {
    padding: 12px 20px;
  }

  .network-partner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding-top: 24px !important;
  }

  .ew-0 {
    width: 100% !important;
  }

  ul.network-partners-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  ul.network-partners-list a {
    padding: 7px 12px !important;
    font-size: 12.5px !important;
  }

  .footer-col ul.footer-bubbles-list {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .footer-col ul.footer-bubbles-list a {
    padding: 7px 12px !important;
    font-size: 12.5px !important;
  }

  .site-footer {
    margin-top: -50px !important;
    padding: 85px 0 24px !important;
  }

  .re-climate-justice {
    max-width: 100% !important;
  }

  .main-nav {
    display: none !important;
  }
  .social-icons-mini {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-slider {
    min-height: 560px;
  }

  .hero-inner {
    padding: 80px 20px 140px;
  }

  .hero-download-card {
    display: none !important;
  }

  .hero-bg::after {
    display: none !important;
  }

  .slider-arrow {
    width: 42px;
    height: 42px;
  }

  .slider-arrow--prev {
    left: 14px;
  }

  .slider-arrow--next {
    right: 14px;
  }

  .slider-arrow svg {
    width: 18px;
    height: 18px;
  }

  .campaigns-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .updates-layout {
    grid-template-columns: 1fr;
  }

  .social-cards {
    grid-template-columns: 1fr;
  }

  .get-involved-grid {
    grid-template-columns: 1fr;
  }

  .climate-banner-content {
    border-radius: 26px;
    padding: 48px 28px;
  }
}

@media (max-width: 640px) {
  .hero-slider {
    min-height: 480px;
  }

  .hero-inner {
    padding: 70px 18px 120px;
  }

  .slider-arrow {
    width: 36px;
    height: 36px;
    top: auto;
    bottom: 80px;
    transform: none;
  }

  .slider-arrow--prev {
    left: 18px;
  }

  .slider-arrow--next {
    right: 18px;
  }

  .slider-dots {
    bottom: 28px;
    gap: 10px;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
  }

  .hero-download-card {
    display: none !important;
  }

  .campaigns-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .campaign-card {
    flex-direction: column;
  }

  .partners-grid {
    grid-template-columns: 1fr;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-col--contact {
    grid-column: span 1;
  }

  .donation-callout {
    flex-direction: column;
  }

  .donation-callout-media {
    width: 100%;
  }

  .story-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .story-thumb {
    width: 100%;
    height: 180px;
  }

  .subscription-card {
    padding: 28px;
  }
}

/* ========================================
   NETWORK PARTNERS CAROUSEL
======================================== */

.network-partners {
  overflow: hidden;
}

button.partners-arrow.partners-prev,
button.partners-arrow.partners-next {
  display: none;
}

.partners-carousel {
  position: relative;
  width: 100%;
  margin-top: 40px;
}

.partners-carousel-viewport {
  width: 100%;
  overflow: hidden;
}

.partners-carousel-track {
  --partners-gap: 24px;
  --partners-visible: 4;

  display: flex;
  gap: var(--partners-gap);
  align-items: stretch;

  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.partners-carousel-track .partner-card {
  flex: 0 0
    calc(
      (100% - (var(--partners-gap) * (var(--partners-visible) - 1))) /
        var(--partners-visible)
    );

  min-width: 0;
  box-sizing: border-box;
  height: auto;
}

/* Keep cards equal in height */
.partners-carousel-track .partner-card {
  display: flex;
  flex-direction: column;
}

.partners-carousel-track .partner-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.partners-carousel-track .partner-card-body .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Carousel navigation */
.partners-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 32px;
}

.partners-arrow {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);

  font-size: 16px;
  line-height: 1;
  cursor: pointer;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

.partners-arrow:hover:not(:disabled) {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.partners-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Pagination dots */
.partners-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.partners-dot {
  width: 8px;
  height: 8px;
  padding: 0;

  border: 0;
  border-radius: 50%;
  background: #a7b1b2;

  cursor: pointer;
  transition:
    width 0.3s ease,
    background 0.3s ease,
    border-radius 0.3s ease;
}

.partners-dot.is-active,
.partners-dot.swiper-pagination-bullet-active {
  width: 26px;
  border-radius: 8px;
  background: var(--teal);
}

.partners-arrow:focus-visible,
.partners-dot:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

/* Tablet: 2 cards */
@media (max-width: 1024px) {
  .partners-carousel-track {
    --partners-visible: 2;
    --partners-gap: 20px;
  }
}

/* Mobile: 1 card */
@media (max-width: 600px) {
  .partners-carousel-track {
    --partners-visible: 1;
    --partners-gap: 16px;
  }

  .partners-carousel {
    margin-top: 28px;
  }

  .partners-carousel-controls {
    gap: 16px;
    margin-top: 24px;
  }

  .partners-arrow {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .site-footer {
    margin-top: -38px !important;
    padding: 70px 0 20px !important;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .partners-carousel-track,
  .partners-arrow,
  .partners-dot {
    transition: none;
  }
}
