/*
Theme Name: RSNPS - Red Sea Nature Protection Society
Theme URI: https://rsnps.com
Author: RSNPS Design Team
Description: A handcrafted, illustrative WordPress theme for the Red Sea Nature Protection Society. Bridges marine conservation of the Red Sea with terrestrial conservation of the Sinai Desert. Elementor-compatible.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rsnps
Tags: environmental, ngo, conservation, elementor, one-column, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Colors */
  --rsnps-deep-blue:      #003F6B;   /* outer ring, deep sea */
  --rsnps-azure:          #0099CC;   /* RSNPS text, primary action */
  --rsnps-teal:           #3AB4CC;   /* waves, dolphin bg, sea */
  --rsnps-teal-light:     #B8E0EE;   /* sky, light sea, foam */
  --rsnps-gold:           #E8A020;   /* acacia, ibex bg, desert sun */
  --rsnps-gold-dark:      #C07C10;   /* deeper gold accent */
  --rsnps-burnt-orange:   #C0532A;   /* sunset, rock, deep desert accent */
  --rsnps-sand:           #F5E8C8;   /* desert floor, warm neutral bg */
  --rsnps-sand-dark:      #E0C898;   /* card borders, subtle warm */
  --rsnps-charcoal:       #1E2832;   /* primary text, ibex silhouette */
  --rsnps-charcoal-light: #3D4F5E;   /* secondary text */
  --rsnps-white:          #FFFFFF;
  --rsnps-off-white:      #FAFBF8;   /* page background, very slight warmth */

  /* Semantic aliases */
  --color-primary:        var(--rsnps-azure);
  --color-primary-dark:   var(--rsnps-deep-blue);
  --color-accent:         var(--rsnps-gold);
  --color-accent-dark:    var(--rsnps-gold-dark);
  --color-text:           var(--rsnps-charcoal);
  --color-text-muted:     var(--rsnps-charcoal-light);
  --color-bg:             var(--rsnps-off-white);
  --color-bg-warm:        var(--rsnps-sand);
  --color-border:         var(--rsnps-sand-dark);

  /* Typography */
  --font-display:   'Raleway', 'Segoe UI', sans-serif;
  --font-body:      'Lato', 'Open Sans', Arial, sans-serif;
  --font-handdrawn: 'Caveat', cursive;
  --font-arabic:    'Tajawal', 'Amiri', serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* Radii — slightly organic, avoiding perfect circles */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-blob:  60% 40% 70% 30% / 50% 60% 40% 50%;
  --radius-blob2: 40% 60% 30% 70% / 60% 40% 50% 50%;

  /* Shadows — sketch-like, slightly offset */
  --shadow-sketch-sm: 2px 3px 0 rgba(30,40,50,0.12), 4px 5px 0 rgba(30,40,50,0.06);
  --shadow-sketch-md: 3px 4px 0 rgba(30,40,50,0.14), 6px 8px 0 rgba(30,40,50,0.07);
  --shadow-sketch-lg: 4px 6px 0 rgba(30,40,50,0.16), 8px 12px 0 rgba(30,40,50,0.08);
  --shadow-card:      0 2px 16px rgba(0,63,107,0.10), 0 1px 4px rgba(0,63,107,0.06);
  --shadow-raised:    0 8px 32px rgba(0,63,107,0.15), 0 2px 8px rgba(0,63,107,0.08);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Z-index layers */
  --z-below:   -1;
  --z-base:     1;
  --z-above:    10;
  --z-nav:      100;
  --z-overlay:  200;
  --z-modal:    300;
  --z-toast:    400;
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.rtl,
html[dir="rtl"] body {
  font-family: var(--font-arabic), var(--font-body);
}

/* ── Headings ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--rsnps-deep-blue);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* ── Body copy ────────────────────────────────────────── */
p {
  margin-bottom: var(--space-4);
  max-width: 72ch;
}

a {
  color: var(--rsnps-azure);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}
a:hover, a:focus-visible {
  color: var(--rsnps-deep-blue);
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 3px solid var(--rsnps-azure);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { list-style: none; }

/* ── Layout containers ────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: clamp(var(--space-6), 4vw, var(--space-12));
}

.container--wide  { max-width: var(--container-2xl); }
.container--narrow { max-width: var(--container-md); }

/* ── Section spacing ─────────────────────────────────── */
.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
  position: relative;
  overflow: hidden;
}

/* ── Accessible visually hidden ──────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip link ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--rsnps-charcoal);
  color: var(--rsnps-white);
  font-weight: 600;
  border-radius: var(--radius-md);
  transform: translateY(-150%);
  transition: transform var(--transition-base);
  z-index: var(--z-toast);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ============================================================
   HAND-DRAWN AESTHETIC HELPERS
   ============================================================ */

/* Organic blob shapes */
.blob-shape {
  border-radius: var(--radius-blob);
}
.blob-shape-2 {
  border-radius: var(--radius-blob2);
}

/* Sketch border — uses SVG filter for roughness */
.sketch-border {
  position: relative;
}
.sketch-border::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 2.5px solid var(--rsnps-charcoal);
  border-radius: inherit;
  filter: url(#rough-global);
  pointer-events: none;
}

/* Ink-stroke underline for section titles */
.section-title {
  display: inline-block;
  position: relative;
  margin-bottom: var(--space-6);
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 5px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10'%3E%3Cpath d='M2,6 C30,2 60,9 90,5 C120,1 150,8 198,5' fill='none' stroke='%23E8A020' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

/* Wavy divider as pseudo-element */
.has-wave-top::before,
.has-wave-bottom::after {
  content: '';
  display: block;
  width: 100%;
  height: 80px;
  background: url('../svg/wave-divider.svg') center/cover no-repeat;
  position: absolute;
  left: 0;
  pointer-events: none;
  z-index: var(--z-above);
}
.has-wave-top::before  { top: -2px; }
.has-wave-bottom::after { bottom: -2px; }

/* Topography overlay */
.topo-bg {
  position: relative;
}
.topo-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../svg/topography-bg.svg') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: var(--z-below);
}

/* Hand-drawn progress bar */
.progress-track {
  height: 16px;
  background: var(--rsnps-sand);
  border-radius: 8px;
  border: 2px solid var(--rsnps-charcoal);
  overflow: visible;
  position: relative;
  filter: url(#rough-progress);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rsnps-teal), var(--rsnps-azure));
  border-radius: 6px;
  position: relative;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-fill::after {
  content: attr(data-label);
  position: absolute;
  right: -2px;
  top: -28px;
  font-family: var(--font-handdrawn);
  font-size: var(--text-sm);
  color: var(--rsnps-deep-blue);
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   GLOBAL SVG FILTER DEFINITIONS  (embedded in body output)
   These are referenced throughout the theme by filter:url(#id)
   ============================================================ */

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.text-display {
  font-family: var(--font-display);
}
.text-handdrawn {
  font-family: var(--font-handdrawn);
  letter-spacing: 0.02em;
}
.text-arabic {
  font-family: var(--font-arabic);
  direction: rtl;
}

.text-primary   { color: var(--rsnps-deep-blue); }
.text-azure     { color: var(--rsnps-azure); }
.text-gold      { color: var(--rsnps-gold); }
.text-teal      { color: var(--rsnps-teal); }
.text-sand      { color: var(--rsnps-sand); }
.text-white     { color: var(--rsnps-white); }
.text-muted     { color: var(--color-text-muted); }

/* Eyebrow label above section headings */
.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--rsnps-gold);
  margin-bottom: var(--space-3);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75em 1.75em;
  border: 2.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color            var(--transition-base),
    border-color     var(--transition-base),
    transform        var(--transition-fast),
    box-shadow       var(--transition-base);
  position: relative;
  overflow: hidden;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--rsnps-gold);
  outline-offset: 4px;
}

/* Primary – Azure sea */
.btn--primary {
  background-color: var(--rsnps-azure);
  color: var(--rsnps-white);
  border-color: var(--rsnps-azure);
  box-shadow: var(--shadow-sketch-sm);
}
.btn--primary:hover {
  background-color: var(--rsnps-deep-blue);
  border-color: var(--rsnps-deep-blue);
  color: var(--rsnps-white);
  transform: translate(-1px, -2px);
  box-shadow: var(--shadow-sketch-md);
}

/* Secondary – Outlined */
.btn--secondary {
  background-color: transparent;
  color: var(--rsnps-azure);
  border-color: var(--rsnps-azure);
}
.btn--secondary:hover {
  background-color: var(--rsnps-azure);
  color: var(--rsnps-white);
  transform: translate(-1px, -2px);
  box-shadow: var(--shadow-sketch-sm);
}

/* Donate – the "desert stone / rough shell" style CTA */
.btn--donate {
  background-color: var(--rsnps-gold);
  color: var(--rsnps-charcoal);
  border-color: var(--rsnps-gold-dark);
  border-radius: 52% 48% 56% 44% / 46% 54% 48% 52%;  /* organic, shell-like */
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sketch-md);
  padding: 0.7em 1.6em;
}
.btn--donate:hover {
  background-color: var(--rsnps-gold-dark);
  color: var(--rsnps-white);
  transform: translate(-2px, -3px);
  box-shadow: var(--shadow-sketch-lg);
}

/* Ghost (for dark backgrounds) */
.btn--ghost {
  background-color: transparent;
  color: var(--rsnps-white);
  border-color: rgba(255,255,255,0.7);
}
.btn--ghost:hover {
  background-color: rgba(255,255,255,0.15);
  border-color: var(--rsnps-white);
  color: var(--rsnps-white);
  transform: translate(-1px, -2px);
}

/* Sizes */
.btn--sm { font-size: var(--text-sm); padding: 0.5em 1.2em; }
.btn--lg { font-size: var(--text-lg); padding: 0.9em 2.2em; }
.btn--xl { font-size: var(--text-xl); padding: 1em 2.5em; }

/* ============================================================
   HEADER  /  NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background-color: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,63,107,0.10);
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,63,107,0.12);
  background-color: rgba(255,255,255,0.99);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 72px;
  padding-inline: clamp(var(--space-6), 4vw, var(--space-12));
  max-width: var(--container-2xl);
  margin-inline: auto;
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.site-logo img {
  height: 52px;
  width: auto;
  transition: transform var(--transition-base);
}
.site-logo:hover img {
  transform: scale(1.04) rotate(-1deg);
}
.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.site-logo__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--rsnps-deep-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-logo__tagline {
  font-family: var(--font-handdrawn);
  font-size: var(--text-xs);
  color: var(--rsnps-teal);
  letter-spacing: 0.02em;
}

/* Primary nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.primary-nav__item {
  position: relative;
}

.primary-nav__link {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rsnps-charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  letter-spacing: 0.03em;
  position: relative;
}

.primary-nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 4'%3E%3Cpath d='M1,2 C10,0.5 20,3.5 30,2 C40,0.5 50,3.5 59,2' fill='none' stroke='%230099CC' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.primary-nav__link:hover,
.primary-nav__link:focus-visible {
  color: var(--rsnps-azure);
  background-color: rgba(58,180,204,0.08);
}
.primary-nav__link:hover::after,
.primary-nav__link:focus-visible::after,
.primary-nav__item.current-menu-item > .primary-nav__link::after {
  transform: scaleX(1);
}
.primary-nav__item.current-menu-item > .primary-nav__link {
  color: var(--rsnps-azure);
  font-weight: 700;
}

/* Dropdown menus */
.primary-nav__dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 220px;
  background: var(--rsnps-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: var(--z-overlay);
  /* Wavy top decoration */
  border-top: 3px solid var(--rsnps-teal);
}
.primary-nav__item:hover > .primary-nav__dropdown,
.primary-nav__item:focus-within > .primary-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav__dropdown a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--rsnps-charcoal);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.primary-nav__dropdown a:hover {
  background-color: rgba(58,180,204,0.1);
  color: var(--rsnps-azure);
}

/* Header actions (Donate button area) */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--rsnps-charcoal);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast), background-color var(--transition-fast);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--rsnps-deep-blue);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img,
.hero__bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gradient overlay for text legibility */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(0,20,50,0.75) 0%,
    rgba(0,40,80,0.55) 40%,
    rgba(0,63,107,0.25) 70%,
    transparent 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-inline: clamp(var(--space-8), 6vw, var(--space-24));
  padding-block: var(--space-24) var(--space-16);
  max-width: 680px;
}

.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-handdrawn);
  font-size: var(--text-lg);
  color: var(--rsnps-gold);
  margin-bottom: var(--space-4);
  letter-spacing: 0.04em;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 6vw, var(--text-6xl));
  font-weight: 800;
  color: var(--rsnps-white);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 12px rgba(0,20,50,0.4);
  letter-spacing: -0.03em;
}
.hero__title em {
  font-style: normal;
  color: var(--rsnps-teal-light);
  display: block;
}

.hero__subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  color: rgba(255,255,255,0.88);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  max-width: 55ch;
  text-shadow: 0 1px 4px rgba(0,20,50,0.3);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Wave separator at bottom of hero */
.hero__wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 3;
  pointer-events: none;
}

/* Scrolling indicator */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-handdrawn);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
.hero__scroll-hint svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   IMPACT NUMBERS SECTION
   ============================================================ */
.impact-section {
  background-color: var(--rsnps-deep-blue);
  padding-block: clamp(var(--space-12), 6vw, var(--space-16));
  position: relative;
  overflow: hidden;
}

.impact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../svg/topography-bg.svg') center/cover no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(var(--space-6), 4vw, var(--space-12));
  position: relative;
  z-index: 1;
}

.impact-card {
  text-align: center;
  position: relative;
}

/* Organic illustrated circle */
.impact-card__circle {
  width: 140px;
  height: 140px;
  margin: 0 auto var(--space-4);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.impact-card__circle-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--rsnps-teal);
  opacity: 0.4;
  animation: orbitalPulse 4s ease-in-out infinite;
}
.impact-card__circle-bg:nth-child(2) {
  inset: 10px;
  border-color: var(--rsnps-gold);
  border-style: dashed;
  animation-delay: 0.8s;
  animation-duration: 5s;
}

@keyframes orbitalPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.4; }
  50%       { transform: scale(1.06) rotate(3deg); opacity: 0.65; }
}

.impact-card__icon {
  width: 40px;
  height: 40px;
  color: var(--rsnps-teal-light);
  position: relative;
  z-index: 1;
}

.impact-card__number {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  color: var(--rsnps-white);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.impact-card__number .suffix {
  font-size: 0.6em;
  color: var(--rsnps-gold);
}

.impact-card__label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ============================================================
   CAMPAIGNS GRID
   ============================================================ */
.campaigns-section {
  background-color: var(--color-bg);
}

.campaigns-section .section-header {
  margin-bottom: var(--space-12);
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(var(--space-6), 3vw, var(--space-8));
}

/* Campaign Card */
.campaign-card {
  background: var(--rsnps-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  position: relative;
}
.campaign-card:hover {
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: var(--shadow-raised);
}

.campaign-card__media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.campaign-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.campaign-card:hover .campaign-card__media img {
  transform: scale(1.06);
}

/* Illustrative overlay on card image (hand-drawn style) */
.campaign-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0,63,107,0.55) 100%
  );
  pointer-events: none;
}

.campaign-card__tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--rsnps-gold);
  color: var(--rsnps-charcoal);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-1) var(--space-3);
  border-radius: 3px 10px 10px 3px;
  box-shadow: var(--shadow-sketch-sm);
  z-index: 1;
}

.campaign-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.campaign-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--rsnps-deep-blue);
  line-height: var(--leading-snug);
  margin: 0;
}
.campaign-card__title a {
  color: inherit;
  text-decoration: none;
}
.campaign-card__title a:hover { color: var(--rsnps-azure); }

.campaign-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  flex: 1;
  margin: 0;
}

/* Progress bar — hand-drawn style */
.campaign-card__progress {
  margin-top: auto;
}
.campaign-card__progress-bar {
  height: 10px;
  background: var(--rsnps-sand);
  border-radius: 5px;
  border: 1.5px solid rgba(30,40,50,0.2);
  overflow: hidden;
  margin-bottom: var(--space-2);
  position: relative;
}
.campaign-card__progress-bar::before {
  /* Sketch texture stripe */
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 4px,
    rgba(255,255,255,0.15) 4px,
    rgba(255,255,255,0.15) 5px
  );
  z-index: 1;
  pointer-events: none;
}
.campaign-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rsnps-teal) 0%, var(--rsnps-azure) 100%);
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.campaign-card__progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
}
.campaign-card__progress-meta .raised {
  color: var(--rsnps-azure);
}

.campaign-card__footer {
  padding: 0 var(--space-5) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
  margin-top: var(--space-2);
}

/* ============================================================
   BLOG / NEWS SECTION
   ============================================================ */
.blog-section {
  background-color: var(--rsnps-sand);
  position: relative;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(var(--space-6), 3vw, var(--space-8));
}

.post-card {
  background: var(--rsnps-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
}
.post-card:hover {
  transform: translateY(-3px) rotate(0.2deg);
  box-shadow: var(--shadow-raised);
}

.post-card__media {
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  /* Watercolour/illustrative tone overlay */
  filter: saturate(0.9) contrast(1.05);
}
.post-card:hover .post-card__media img { transform: scale(1.05); }

/* Illustrative border frame on thumbnail */
.post-card__media::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  z-index: 1;
  pointer-events: none;
}

.post-card__body {
  padding: var(--space-5);
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.post-card__category {
  background: var(--rsnps-teal-light);
  color: var(--rsnps-deep-blue);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
}
.post-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--rsnps-deep-blue);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}
.post-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.post-card__title a:hover { color: var(--rsnps-azure); }
.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ============================================================
   ABOUT US – DUAL MISSION SECTION
   ============================================================ */
.mission-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 500px;
}
.mission-split__panel {
  padding: clamp(var(--space-12), 6vw, var(--space-24)) clamp(var(--space-8), 5vw, var(--space-16));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.mission-split__panel--marine {
  background: linear-gradient(135deg, var(--rsnps-deep-blue) 0%, var(--rsnps-teal) 100%);
  color: var(--rsnps-white);
}
.mission-split__panel--desert {
  background: linear-gradient(135deg, var(--rsnps-gold) 0%, var(--rsnps-burnt-orange) 100%);
  color: var(--rsnps-charcoal);
}

.mission-split__panel h3 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
  margin-bottom: var(--space-4);
}
.mission-split__panel--marine h3 { color: var(--rsnps-white); }
.mission-split__panel--desert h3 { color: var(--rsnps-charcoal); }

.mission-split__icon {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-6);
  opacity: 0.9;
}

.mission-split__panel p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  opacity: 0.9;
  max-width: 40ch;
}

/* Diagonal divider between panels */
.mission-split::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 60px;
  background: inherit;
  clip-path: polygon(0 0, 100% 10%, 100% 90%, 0 100%);
  /* This creates the angled meeting point of the two ecosystems */
}

/* ============================================================
   TIMELINE  (About page)
   ============================================================ */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 100' preserveAspectRatio='none'%3E%3Cpath d='M3,0 C2,15 4,30 3,45 C2,60 4,75 3,90 C2.5,95 3,100 3,100' fill='none' stroke='%233AB4CC' stroke-width='2.5' stroke-dasharray='8,5'/%3E%3C/svg%3E") 0 0/6px 100% repeat-y;
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-10);
  padding-left: var(--space-6);
}

.timeline__dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rsnps-white);
  border: 3px solid var(--rsnps-teal);
  box-shadow: 0 0 0 4px rgba(58,180,204,0.2);
  transition: transform var(--transition-base);
}
.timeline__item:hover .timeline__dot {
  transform: scale(1.3);
  border-color: var(--rsnps-gold);
}

.timeline__year {
  font-family: var(--font-handdrawn);
  font-size: var(--text-xl);
  color: var(--rsnps-gold);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.timeline__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--rsnps-deep-blue);
  margin-bottom: var(--space-2);
}
.timeline__body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ============================================================
   TEAM CARDS
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(var(--space-6), 3vw, var(--space-8));
}

.team-card {
  background: var(--rsnps-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
.team-card:hover {
  transform: translateY(-4px) rotate(0.4deg);
  box-shadow: var(--shadow-raised);
}

/* Sketch overlay frame pseudo-element */
.team-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(0,153,204,0.15);
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 1;
}
.team-card::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1.5px dashed rgba(232,160,32,0.12);
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 1;
}

.team-card__photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  object-fit: cover;
  border: 3px solid var(--rsnps-teal-light);
  box-shadow: var(--shadow-sketch-sm);
  position: relative;
  z-index: 2;
}
.team-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--rsnps-deep-blue);
  margin-bottom: var(--space-1);
  position: relative;
  z-index: 2;
}
.team-card__role {
  font-family: var(--font-handdrawn);
  font-size: var(--text-base);
  color: var(--rsnps-teal);
  margin-bottom: var(--space-3);
  position: relative;
  z-index: 2;
}
.team-card__bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
  position: relative;
  z-index: 2;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--rsnps-charcoal);
  color: rgba(255,255,255,0.75);
  position: relative;
  overflow: hidden;
}

/* Wave top separator */
.site-footer__wave {
  width: 100%;
  height: 90px;
  margin-top: -2px;
  display: block;
}

.footer-inner {
  padding: var(--space-16) clamp(var(--space-6), 4vw, var(--space-12)) var(--space-8);
  max-width: var(--container-xl);
  margin-inline: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.footer-brand__logo {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1) opacity(0.9);
}
.footer-brand__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.65);
  max-width: 36ch;
  margin: 0;
}
.footer-brand__arabic {
  font-family: var(--font-arabic);
  font-size: var(--text-sm);
  direction: rtl;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rsnps-gold);
  margin-bottom: var(--space-5);
  position: relative;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -var(--space-2);
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--rsnps-teal);
  border-radius: 1px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-col ul a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer-col ul a:hover {
  color: var(--rsnps-teal-light);
}
.footer-col ul a::before {
  content: '›';
  color: var(--rsnps-teal);
  font-size: 1.1em;
}

/* Newsletter */
.footer-newsletter h4 {
  color: var(--rsnps-gold);
}
.footer-newsletter p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-4);
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.newsletter-input {
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  color: var(--rsnps-white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input:focus {
  outline: none;
  border-color: var(--rsnps-teal);
  background: rgba(255,255,255,0.12);
}

/* Social icons */
.social-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.1);
}
.social-link:hover {
  background: var(--rsnps-teal);
  color: var(--rsnps-white);
  transform: translateY(-2px) rotate(-4deg);
  border-color: var(--rsnps-teal);
}
.social-link svg {
  width: 20px;
  height: 20px;
}

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

/* Wavy lines in footer (from logo motif) */
.footer-wave-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  opacity: 0.2;
}
.footer-wave-lines svg { width: 100%; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-field label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rsnps-charcoal);
  letter-spacing: 0.02em;
}
.form-field input,
.form-field textarea,
.form-field select {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--rsnps-charcoal);
  background: var(--rsnps-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--rsnps-teal);
  box-shadow: 0 0 0 3px rgba(58,180,204,0.15);
}
.form-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: var(--leading-relaxed);
}

/* Map pin (custom illustrative) */
.map-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--color-border);
  box-shadow: var(--shadow-card);
  min-height: 380px;
  position: relative;
}

/* ============================================================
   PAGE HERO / BANNER
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--rsnps-deep-blue) 0%, var(--rsnps-teal) 100%);
  padding: clamp(var(--space-16), 8vw, var(--space-24)) 0 var(--space-20);
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--rsnps-white);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../svg/topography-bg.svg') center/cover no-repeat;
  opacity: 0.06;
}
.page-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  color: var(--rsnps-white);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}
.page-hero__breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}
.page-hero__breadcrumb a {
  color: var(--rsnps-gold);
  text-decoration: none;
}
.page-hero__breadcrumb a:hover { color: var(--rsnps-white); }
.page-hero__wave {
  position: absolute;
  bottom: -2px;
  width: 100%;
  height: 70px;
  z-index: 2;
}

/* ============================================================
   CAMPAIGN DETAIL PAGE
   ============================================================ */
.campaign-detail {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-12);
  align-items: start;
}
.campaign-sidebar {
  background: var(--rsnps-white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  position: sticky;
  top: 100px;
}
.campaign-sidebar__goal {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--rsnps-deep-blue);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.campaign-sidebar__raised {
  font-family: var(--font-handdrawn);
  font-size: var(--text-lg);
  color: var(--rsnps-teal);
  margin-bottom: var(--space-5);
}
.campaign-sidebar .btn {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   SECTION HEADER BLOCK
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header h2 {
  margin-bottom: var(--space-4);
  display: inline-block;
}
.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.mt-4  { margin-top: var(--space-4); }
.mt-8  { margin-top: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-8  { margin-bottom: var(--space-8); }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* Backgrounds */
.bg-white      { background-color: var(--rsnps-white); }
.bg-off-white  { background-color: var(--rsnps-off-white); }
.bg-sand       { background-color: var(--rsnps-sand); }
.bg-deep-blue  { background-color: var(--rsnps-deep-blue); }
.bg-teal       { background-color: var(--rsnps-teal); }

/* ============================================================
   ELEMENTOR COMPATIBILITY
   ============================================================ */
/* Preserve Elementor's own spacing inside sections */
.elementor-section .elementor-container {
  max-width: 100%;
}

/* Allow theme colours as Elementor custom tokens */
.elementor-kit-tag { --e-global-color-primary: var(--rsnps-azure); }

/* Elementor cards inherit typography */
.elementor-widget-heading .elementor-heading-title {
  font-family: var(--font-display);
}
.elementor-widget-text-editor {
  font-family: var(--font-body);
  line-height: var(--leading-relaxed);
}

/* Elementor button overrides — apply RSNPS styles */
.elementor-button {
  border-radius: var(--radius-md) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  transition: transform var(--transition-base), box-shadow var(--transition-base) !important;
}
.elementor-button:hover {
  transform: translate(-1px, -2px) !important;
  box-shadow: var(--shadow-sketch-md) !important;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s ease forwards;
}
.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}
.animate-float {
  animation: floatY 4s ease-in-out infinite;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Scroll-reveal: initial hidden state (JS adds .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="right"]  { transform: translateX(30px); }
[data-reveal="left"]   { transform: translateX(-30px); }
[data-reveal="scale"]  { transform: scale(0.92); }
[data-reveal="right"].is-visible,
[data-reveal="left"].is-visible,
[data-reveal="scale"].is-visible {
  transform: none;
}

/* ============================================================
   RESPONSIVE  —  MOBILE FIRST
   ============================================================ */

/* Tablet — 768px */
@media (max-width: 768px) {
  /* Nav collapses */
  .primary-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--rsnps-white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4) var(--space-6) var(--space-8);
    box-shadow: 0 8px 32px rgba(0,63,107,0.15);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
    border-bottom: 3px solid var(--rsnps-teal);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: var(--z-nav);
  }
  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .primary-nav__list {
    flex-direction: column;
    gap: var(--space-1);
    width: 100%;
  }
  .primary-nav__link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }
  .primary-nav__dropdown {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-left: var(--space-4);
    background: var(--rsnps-sand);
    border-radius: var(--radius-md);
    margin-top: var(--space-1);
  }
  .nav-toggle { display: flex; }
  .header-actions .btn--donate { display: none; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero__content {
    padding-inline: var(--space-6);
    padding-block: var(--space-16) var(--space-20);
    max-width: 100%;
  }

  /* Grids */
  .campaigns-grid,
  .blog-grid,
  .team-grid { grid-template-columns: 1fr; }
  .mission-split {
    grid-template-columns: 1fr;
  }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .campaign-detail { grid-template-columns: 1fr; }
  .campaign-sidebar { position: static; }
}

/* Large screens — keep readable line lengths */
@media (min-width: 1280px) {
  .campaigns-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Print styles */
@media print {
  .site-header,
  .hero__ctas,
  .site-footer,
  .nav-toggle { display: none !important; }
  body { background: white; color: black; }
  a { color: inherit; text-decoration: underline; }
}
