
/* ================================================
   2. BASE RESET & GLOBALS
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }


h1, h2, h3, h4 { font-family: var(--font-display); color: var(--idf-text); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem);    font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem);  font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 600; }

p            { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
img          { display: block; max-width: 100%; }
a            { color: inherit; text-decoration: none; transition: color var(--transition); }
ul           { list-style: none; }
button       { font-family: var(--font-body); cursor: pointer; border: none; }

/* ================================================
   3. PAGE LAYOUT WRAPPER
   Two-column flex matching regions / our-work.
   ================================================ */
.res-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  gap: 52px;
}

/* ================================================
   5. PAGE HERO
   Image + overlay layer model — mirrors .work-hero/.work-hero-bg/.work-hero-overlay.
   Background image is absolutely positioned; the navy colour is a fallback
   shown while the image loads or when no image path is set.
   ================================================ */
.res-hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: 0;
  /* Fallback colour shown before image loads */
  background: var(--idf-navy-dark);
}

/* Full-bleed background image — mirrors .work-hero-bg */
.res-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

/* Directional dark-to-transparent overlay — mirrors .work-hero-overlay */
.res-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    rgba(11, 20, 38, 0.92) 0%,
    rgba(27, 46, 75, 0.72) 40%,
    rgba(27, 46, 75, 0.28) 100%
  );
}

.res-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 96px 28px 52px;
}

.res-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--idf-blue-light);
  margin-bottom: 16px;
}

.res-hero-content h1 {
  color: var(--idf-white);
  margin-bottom: 16px;
  max-width: 640px;
}

.res-hero-content p {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 32px;
}

/* Quick-jump pill buttons */
.res-hero-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.res-hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--idf-white);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 9px 18px;
  border-radius: 28px;
  backdrop-filter: blur(6px);
  transition: all var(--transition);
  cursor: pointer;
}

.res-hero-jump:hover {
  background: var(--idf-blue);
  border-color: var(--idf-blue);
  transform: translateY(-2px);
}

/* Floating stat pills in hero */
.res-hero-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.res-hero-stat {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--r-md);
  padding: 14px 20px;
  text-align: center;
  min-width: 110px;
}

.res-hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--idf-white);
  line-height: 1;
  display: block;
}

.res-hero-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  display: block;
  margin-top: 4px;
}

/* ================================================
   6. MAIN CONTENT COLUMN
   ================================================ */
/* MODIFIED: was padding: var(--section-gap) 0 — now matches .work-main (padding-top: 40px only) */
.res-main {
  flex: 1;
  min-width: 0;
  padding-top: 40px;
}

/* ================================================
   7. SHARED SECTION STYLES
   ================================================ */
.res-section {
  margin-bottom: var(--section-gap);
  padding-bottom: var(--section-gap);
  border-bottom: 1px solid var(--idf-border);
}

.res-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Anchor offset for fixed navbar */
.res-section::before {
  content: '';
  display: block;
  height: 96px;
  margin-top: -96px;
  pointer-events: none;
}

/* Section header row */
.res-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.res-section-title-group { flex: 1; }

.res-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.res-badge--blue  { background: var(--idf-blue-pale);  color: var(--idf-blue); }
.res-badge--green { background: var(--idf-green-pale); color: var(--idf-green); }
.res-badge--navy  { background: rgba(27,46,75,0.07);   color: var(--idf-navy); }

.res-section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--idf-navy);
  margin-bottom: 6px;
}

.res-section-desc {
  font-size: 0.92rem;
  color: var(--idf-text-muted);
  margin: 0;
  max-width: 500px;
}

.res-section-count {
  font-size: 0.78rem;
  color: var(--idf-text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ================================================
   8. TAB / FILTER BAR
   Used on both Gallery and Video sections.
   ================================================ */
.res-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--idf-border);
}

.res-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--idf-text-muted);
  background: var(--idf-cream);
  border: 1px solid var(--idf-border);
  transition: all var(--transition);
  cursor: pointer;
}

.res-filter-btn:hover {
  color: var(--idf-blue);
  border-color: var(--idf-blue);
  background: var(--idf-blue-pale);
}

.res-filter-btn.active {
  background: var(--idf-blue);
  border-color: var(--idf-blue);
  color: var(--idf-white);
}

.res-filter-btn .res-filter-count {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 1px 6px;
}

.res-filter-btn.active .res-filter-count { background: rgba(255,255,255,0.25); }

/* Hidden items when filtered */
.res-filtered-out {
  display: none !important;
}

/* ================================================
   9. NEWSLETTERS SECTION
   Card layout: thumbnail left, metadata right.
   ================================================ */
.res-newsletters-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.res-newsletter-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 0;
  align-items: stretch;
  background: var(--idf-white);
  border: 1px solid var(--idf-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
}

.res-newsletter-card:hover {
  box-shadow: var(--idf-shadow-md);
  transform: translateY(-2px);
  border-color: rgba(46,109,180,0.2);
}

/* Thumbnail column */
.res-nl-thumb {
  width: 100px;
  min-height: 120px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Fallback when no thumbnail — coloured placeholder */
.res-nl-thumb-placeholder {
  width: 100px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--idf-blue), var(--idf-navy));
  flex-shrink: 0;
}

.res-nl-thumb-placeholder i {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.6);
}

/* Metadata column */
.res-nl-meta {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.res-nl-category {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--idf-blue);
}

.res-nl-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--idf-navy);
  line-height: 1.3;
}

.res-nl-desc {
  font-size: 0.83rem;
  color: var(--idf-text-muted);
  line-height: 1.55;
  margin: 0;
}

.res-nl-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.res-nl-date,
.res-nl-size {
  font-size: 0.72rem;
  color: var(--idf-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.res-nl-date i,
.res-nl-size i { font-size: 0.65rem; opacity: 0.7; }

/* Download column */
.res-nl-action {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-left: 1px solid var(--idf-border);
  min-width: 80px;
  background: var(--idf-cream);
  transition: background var(--transition);
}

.res-newsletter-card:hover .res-nl-action { background: var(--idf-blue-pale); }

.res-nl-dl-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--idf-blue);
  color: var(--idf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition);
}

.res-newsletter-card:hover .res-nl-dl-icon {
  background: var(--idf-navy);
  transform: scale(1.1);
}

.res-nl-dl-text {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--idf-blue);
}

.res-newsletter-card:hover .res-nl-dl-text { color: var(--idf-navy); }

/* ================================================
   10. PHOTO GALLERY + LIGHTBOX
   ================================================ */

/* 4-column responsive grid */
.res-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* Individual photo cell */
.res-photo-item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--idf-cream);
  cursor: pointer;
}

.res-photo-item:focus-visible {
  outline: 3px solid var(--idf-blue);
  outline-offset: 2px;
}

.res-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.res-photo-item:hover .res-photo-img { transform: scale(1.07); }

/* Hover overlay */
.res-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 40%,
    rgba(11,20,38,0.82) 100%
  );
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.res-photo-item:hover .res-photo-overlay { opacity: 1; }

.res-photo-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-photo-caption-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--idf-white);
  line-height: 1.3;
}

.res-photo-caption-meta {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Expand icon */
.res-photo-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  color: var(--idf-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.res-photo-item:hover .res-photo-expand { opacity: 1; }

/* ── LIGHTBOX ──────────────────────────────── */
.res-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,16,28,0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.res-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.res-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.res-lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--r-lg);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

.res-lightbox-caption {
  margin-top: 16px;
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  line-height: 1.5;
}

.res-lightbox-caption strong { color: var(--idf-white); display: block; font-size: 0.95rem; }

/* Close button */
.res-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--idf-white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.res-lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* Prev / next arrows */
.res-lightbox-prev,
.res-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--idf-white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 9001;
}

.res-lightbox-prev { left: 16px; }
.res-lightbox-next { right: 16px; }
.res-lightbox-prev:hover,
.res-lightbox-next:hover { background: rgba(255,255,255,0.22); }

/* Counter */
.res-lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  padding: 4px 14px;
  border-radius: 20px;
}

/* ================================================
   11. VIDEO LIBRARY
   ================================================ */
.res-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.res-video-card {
  background: var(--idf-white);
  border: 1px solid var(--idf-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.res-video-card:hover {
  box-shadow: var(--idf-shadow-md);
  transform: translateY(-4px);
  border-color: rgba(46,109,180,0.2);
}

/* Thumbnail with play overlay */
.res-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--idf-navy);
  overflow: hidden;
  cursor: pointer;
}

.res-video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.res-video-card:hover .res-video-thumb-img { transform: scale(1.04); }

/* Play button overlay */
.res-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,20,38,0.28);
  transition: background var(--transition);
}

.res-video-card:hover .res-video-play { background: rgba(11,20,38,0.42); }

.res-video-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.res-video-play-btn i {
  font-size: 1rem;
  color: var(--idf-navy);
  margin-left: 3px; /* optical centre for play icon */
}

.res-video-card:hover .res-video-play-btn {
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}

/* Duration badge */
.res-video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.72);
  color: var(--idf-white);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-sm);
}

/* Video metadata */
.res-video-meta {
  padding: 18px;
}

.res-video-tag {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--idf-blue);
  margin-bottom: 7px;
}

.res-video-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--idf-navy);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
  overflow: hidden;
}

.res-video-desc {
  font-size: 0.8rem;
  color: var(--idf-text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
 -webkit-line-clamp: 2;
 line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-video-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  color: var(--idf-text-muted);
}

.res-video-info i { font-size: 0.64rem; }

/* YouTube CTA bar */
.res-youtube-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--idf-navy);
  border-radius: var(--r-xl);
  padding: 28px 36px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.res-youtube-cta-text h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--idf-white);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.res-youtube-cta-text p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin: 0;
}

.res-youtube-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--idf-error);
  color: var(--idf-white);
  padding: 12px 24px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.875rem;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.res-youtube-cta-btn:hover {
  background: var(--idf-error);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,0,0,0.35);
}

/* Embedded iframe container (loads on click) */
.res-video-embed-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(10,16,28,0.94);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.res-video-embed-container.open {
  display: flex;
}

.res-video-iframe-wrap {
  position: relative;
  width: min(900px, 90vw);
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

.res-video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.res-video-modal-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--idf-white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: flex-end;
  margin-right: calc((100vw - min(900px, 90vw)) / 2);
  transition: background var(--transition);
}

.res-video-modal-close:hover { background: rgba(255,255,255,0.22); }

/* ================================================
   12. "LOAD MORE" BUTTON
   ================================================ */
.res-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.res-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border: 2px solid var(--idf-border);
  border-radius: 28px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--idf-navy);
  background: var(--idf-white);
  transition: all var(--transition);
}

.res-load-more-btn:hover {
  border-color: var(--idf-blue);
  color: var(--idf-blue);
  background: var(--idf-blue-pale);
}

.res-load-more-btn[aria-busy="true"] i { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ================================================
   13. SCROLL REVEAL
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }
.reveal-delay-5 { transition-delay: 0.30s; }
.reveal-delay-6 { transition-delay: 0.36s; }

/* ================================================
   14. BUTTONS
   ================================================ */
.btn-idf-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--idf-blue);
  color: var(--idf-white);
  border: 2px solid var(--idf-blue);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-idf-primary:hover {
  background: var(--idf-navy);
  border-color: var(--idf-navy);
  color: var(--idf-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(46,109,180,0.38);
}

.btn-idf-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--idf-navy);
  border: 2px solid var(--idf-navy);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-idf-outline:hover { background: var(--idf-navy); color: var(--idf-white); }
/* No media queries — all responsive rules in responsive.css. */

/* =============================================================
   IDF Kenya — resources-lightbox-enhancements.css
   
   PURPOSE: Enhances the existing lightbox in resources.css with:
     1. Scale + fade entrance/exit animation
     2. Image loading skeleton state
     3. Swipe gesture hint (mobile chevrons)
     4. Focus-visible ring inside modal
     5. Reduced-motion safe fallback
   
   INTEGRATION: Append the contents of this file to the end of
   css/resources.css — or link it AFTER resources.css in <head>.
   =============================================================

   ── HOW THE ANIMATION WORKS ────────────────────────────────
   The overlay (.res-lightbox) fades in via opacity as before.
   The inner container (.res-lightbox-inner) additionally scales
   from 0.88 → 1 and translates up slightly. A spring-style
   cubic-bezier gives it a subtle overshoot feel.
   On close, the image container scales back down.
   ============================================================= */

/* ── 1. OVERLAY: add will-change for GPU compositing ─────── */
.res-lightbox {
  will-change: opacity;
  /* Existing: opacity 0, pointer-events none, transition opacity 0.3s ease */
}

/* ── 2. INNER CONTAINER: scale + translate entrance ─────────
   The .res-lightbox-inner already exists in resources.css with
   max-width/max-height/flex properties. We add the transform state.
   ─────────────────────────────────────────────────────────── */
.res-lightbox-inner {
  transform: scale(0.88) translateY(18px);
  transition:
    transform 0.38s cubic-bezier(0.34, 1.42, 0.64, 1),
    opacity   0.28s ease;
  opacity: 0;
  will-change: transform, opacity;
}

/* When lightbox is open: spring to natural scale */
.res-lightbox.open .res-lightbox-inner {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Close animation: shrink down quickly */
.res-lightbox.closing .res-lightbox-inner {
  transform: scale(0.92) translateY(8px);
  opacity: 0;
  transition:
    transform 0.22s cubic-bezier(0.4, 0, 0.6, 1),
    opacity   0.18s ease;
}

/* ── 3. IMAGE: loading skeleton state ────────────────────────
   While the full-size image is loading, show an animated
   shimmer in place of the image.
   ─────────────────────────────────────────────────────────── */
@keyframes lb-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.res-lightbox-img {
  /* Existing: max-width, max-height, object-fit, border-radius, box-shadow */
  transition: opacity 0.22s ease;
}

/* Applied by JS while image src is loading */
.res-lightbox-img.lb-loading {
  opacity: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.04) 25%,
      rgba(255,255,255,0.12) 50%,
      rgba(255,255,255,0.04) 75%
    );
  background-size: 600px 100%;
  animation: lb-shimmer 1.4s infinite linear;
  min-width: 300px;
  min-height: 200px;
  border-radius: var(--r-lg);
}

.res-lightbox-img.lb-loaded {
  opacity: 1;
}

/* ── 4. IMAGE: hover zoom cursor on desktop ──────────────── */
.res-lightbox-img {
  cursor: zoom-out;
}

/* ── 5. CAPTION: slide up on open ────────────────────────── */
.res-lightbox-caption {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease 0.18s, transform 0.3s ease 0.18s;
}

.res-lightbox.open .res-lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}

.res-lightbox.closing .res-lightbox-caption {
  opacity: 0;
  transition-delay: 0s;
}

/* ── 6. NAVIGATION ARROWS: enhanced hover feedback ──────── */
.res-lightbox-prev,
.res-lightbox-next {
  transition:
    background    var(--transition),
    transform     0.18s ease,
    opacity       0.18s ease;
  /* Existing: position, width, height, border-radius, border, color */
}

.res-lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.res-lightbox-next:hover { transform: translateY(-50%) translateX(3px); }
.res-lightbox-prev:active { transform: translateY(-50%) translateX(-1px); }
.res-lightbox-next:active { transform: translateY(-50%) translateX(1px); }

/* Hide arrows when there's only one image */
.res-lightbox[data-count="1"] .res-lightbox-prev,
.res-lightbox[data-count="1"] .res-lightbox-next {
  display: none;
}

/* ── 7. CLOSE BUTTON: enhanced feedback ─────────────────── */
.res-lightbox-close {
  transition: background var(--transition), transform 0.18s ease;
}

.res-lightbox-close:hover  { transform: scale(1.12); }
.res-lightbox-close:active { transform: scale(0.95); }

/* ── 8. FOCUS-VISIBLE RINGS inside modal ─────────────────── */
.res-lightbox-close:focus-visible,
.res-lightbox-prev:focus-visible,
.res-lightbox-next:focus-visible {
  outline: 2px solid rgba(255,255,255,0.75);
  outline-offset: 3px;
}

/* ── 9. MOBILE SWIPE HINT ─────────────────────────────────── */

/* ── 10. COUNTER: enhanced pill ─────────────────────────── */
.res-lightbox-counter {
  /* Existing: position fixed, bottom, left 50%, transform, font-size, color, background, padding, border-radius */
  transition: opacity 0.2s ease;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
}

.res-lightbox.closing .res-lightbox-counter {
  opacity: 0;
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* ── Layout swap at tablet ── */
@media (max-width: 1100px) {
  .res-layout {
    gap: 0;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
  }
  .res-main {
    width: 100%;
    padding-top: var(--section-gap-sm);
  }
  .res-section::before {
    height: 130px;
    margin-top: -130px;
  }
}

/* ── Resources hero ── */
@media (max-width: 768px) {
  .res-hero { min-height: 360px; }
  .res-hero-content { padding: 96px var(--container-pad) 40px; }
}
@media (max-width: 600px) {
  .res-hero { min-height: 300px; }
  .res-hero-jumps { display: none; }
}

/* ── Grids ── */
@media (max-width: 960px) {
  .res-gallery-grid   { grid-template-columns: repeat(3, 1fr); }
  .res-video-grid     { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .res-gallery-grid   { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .res-video-grid     { grid-template-columns: 1fr; }
}
@media (max-width: 375px) {
  .res-gallery-grid   { grid-template-columns: 1fr; }
}

/* ── Newsletter rows — narrower thumb, icon-only download ── */
@media (max-width: 600px) {
  .res-newsletter-card { grid-template-columns: 64px 1fr auto; }
  .res-nl-thumb,
  .res-nl-thumb-placeholder { width: 64px; }
  .res-nl-meta   { padding: 14px; }
  .res-nl-action { padding: 14px 12px; min-width: 0; }
  .res-nl-dl-text { display: none; }
}

/* ── Filter bar ── */
@media (max-width: 600px) {
  .res-filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
  }
  .res-filter-bar::-webkit-scrollbar { display: none; }
  .res-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ── Section header row ── */
@media (max-width: 600px) {
  .res-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
