/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;600;700&family=Open+Sans:wght@300;400;600&family=Playfair+Display:wght@400;700&display=swap');

/* CSS Custom Properties (brand tokens) */
:root {
  --color-navy: #032956;
  --color-orange: #FF9E01;
  --color-cream: #FBF7F4;
  --color-deep-purple: #262358;
  --color-midnight: #021B3A;
  --color-soft-gray: #E8E4E0;
  --font-heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;
  --font-accent: "Playfair Display", Georgia, "Times New Roman", serif;
  --radius-btn: 4px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-cream);
  color: var(--color-navy);
  line-height: 1.5;
  overflow-x: hidden;
  margin: 0;
}

/* Font family classes */
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-accent { font-family: var(--font-accent); }

/* Brand colors */
.bg-navy { background-color: var(--color-navy); }
.bg-cream { background-color: var(--color-cream); }
.bg-orange { background-color: var(--color-orange); }
.bg-soft-gray { background-color: var(--color-soft-gray); }
.text-navy { color: var(--color-navy); }
.text-orange { color: var(--color-orange); }
.text-cream { color: var(--color-cream); }
.border-orange { border-color: var(--color-orange); }

/* Scroll fade-in animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Program card transitions */
.program-card {
  height: 320px;
  transition: height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.program-card-img {
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.program-card-overlay {
  background: linear-gradient(to top, rgba(3,41,86,0.75) 20%, rgba(3,41,86,0.1) 100%);
  transition: background 0.4s ease;
}
.program-card-expand {
  opacity: 0;
  transform: translateY(20px);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease 0.1s;
}

/* Testimonial cards */
.testimonial-card {
  transition: all 0.35s ease-in-out;
}

/* Partner infinite scroll */
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% / 3)); }
}
.animate-scroll {
  animation: scroll 25s linear infinite;
}
.animate-scroll:hover {
  animation-play-state: paused;
}

/* Navbar transition */
#main-navbar {
  transition: background-color 0.3s ease;
}

/* Involved form panel */
#involved-form-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Image hover zoom */
.img-zoom-container { overflow: hidden; }
.img-zoom-container img {
  transition: transform 0.5s ease;
}
.img-zoom-container:hover img {
  transform: scale(1.05);
}

/* Hover states */
.hover-shadow:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.hover-opacity:hover { opacity: 0.9; }

/* Compatibility utilities */
.min-h-\[50vh\] { min-height: 50vh; }
.h-\[60vh\] { height: 60vh; }
.h-\[100vh\] { height: 100vh; }
.min-h-\[400px\] { min-height: 400px; }
.min-h-\[800px\] { min-height: 800px; }
.bg-\[\#0b2545\] { background-color: #0b2545; }
.bg-\[\#faf7f2\] { background-color: #faf7f2; }
.text-\[\#0b2545\] { color: #0b2545; }
.bg-orange-100 { background-color: #fff1d6; }
.text-gray-300 { color: #d1d5db; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-orange-300 { color: #ffd08a; }
.text-orange-400 { color: #ffb347; }
.text-orange-500 { color: var(--color-orange); }
.text-orange-600 { color: #d68200; }
.ring-orange-400 { --tw-ring-color: #ffb347; }
.hover\:bg-\[\#1a3a5c\]:hover { background-color: #1a3a5c; }

/* Future Leaders SDG card layout */
.academy-section {
  background-color: #faf7f2;
}

.academy-copy {
  max-width: 52rem;
  margin: 0 auto;
  line-height: 1.7;
}

.sdg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 1.5rem;
  justify-content: center;
  margin: 3rem auto 0 auto;
  max-width: 780px;
}

.sdg-card {
  position: relative;
  width: 220px;
  height: 220px;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.sdg-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.sdg-card-front,
.sdg-card-back {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.sdg-card-front {
  background-color: #fff;
  border: 1px solid #eee;
  transform: rotateY(0deg);
}

.sdg-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
  background-color: #fff;
}

.sdg-card-back {
  background: linear-gradient(135deg, #ffffff 0%, #fff8e6 100%);
  color: #002c6e;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 1.25rem;
  border: 2px solid #f9c74f;
  flex-direction: column;
  text-align: center;
  transform: rotateY(180deg);
}

.sdg-card-back strong {
  display: block;
  margin-bottom: 8px;
  color: #f8961e;
  font-size: 1rem;
}

.sdg-card-back p {
  margin: 0;
}

.sdg-card:hover .sdg-card-inner,
.sdg-card.flip .sdg-card-inner,
.sdg-card:focus-visible .sdg-card-inner {
  transform: rotateY(180deg);
}

.sdg-hint {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
  margin-top: 1rem;
}

.sdg-card:focus-visible {
  outline: 3px solid rgba(255, 158, 1, 0.35);
  outline-offset: 6px;
  border-radius: 16px;
}

@media (max-width: 768px) {
  .sdg-grid {
    grid-template-columns: repeat(2, minmax(0, 200px));
    gap: 1.25rem;
    margin-top: 2rem;
    max-width: 460px;
  }

  .sdg-card {
    width: 200px;
    height: 200px;
  }

  .sdg-card-back {
    font-size: 0.75rem;
    padding: 1rem;
  }
}

@media (max-width: 520px) {
  .sdg-grid {
    grid-template-columns: minmax(0, 220px);
    max-width: 220px;
  }
}

/* Input focus */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 2px rgba(255, 158, 1, 0.3);
}

/* Recent events bento layout */
.recent-events-page {
  position: relative;
  overflow: hidden;
}

.recent-events-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 7% 14%, rgba(255, 158, 1, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 18%, rgba(3, 41, 86, 0.09), transparent 24rem);
  pointer-events: none;
}

.recent-events-container {
  position: relative;
  z-index: 1;
  width: calc(100% - 2rem);
  margin: 0 auto;
}

.recent-events-section-head {
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.recent-events-section-head h2 {
  margin: 0 0 1rem;
  color: var(--color-navy);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.recent-events-section-head p {
  margin: 0;
  color: rgba(3, 41, 86, 0.7);
  font-size: 1.05rem;
}

.recent-events-shell {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.recent-event-feature,
.recent-event-list-item {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.recent-event-feature {
  position: relative;
  display: flex;
  min-height: 28rem;
  overflow: hidden;
  border-radius: 30px;
  background: var(--color-navy);
  box-shadow: 0 24px 48px rgba(2, 27, 58, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recent-event-feature:hover,
.recent-event-feature:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 30px 58px rgba(2, 27, 58, 0.26);
}

.recent-event-feature-image,
.recent-event-feature-overlay {
  position: absolute;
  inset: 0;
}

.recent-event-feature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.recent-event-feature:hover .recent-event-feature-image,
.recent-event-feature:focus-visible .recent-event-feature-image {
  transform: scale(1.04);
}

.recent-event-feature-overlay {
  background:
    linear-gradient(180deg, rgba(2, 27, 58, 0.12) 0%, rgba(2, 27, 58, 0.92) 100%),
    linear-gradient(135deg, rgba(255, 158, 1, 0.2), transparent 42%);
}

.recent-event-feature-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2.2rem);
  color: #fff;
}

.recent-event-feature-header,
.recent-event-feature-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.recent-event-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-event-date,
.recent-event-category,
.recent-event-link {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-event-date {
  color: rgba(255, 255, 255, 0.82);
}

.recent-event-category {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--color-orange);
}

.recent-event-feature-title {
  display: block;
  max-width: 42rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  line-height: 0.98;
}

.recent-event-feature-summary {
  display: -webkit-box;
  max-width: 38rem;
  margin-top: 1rem;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.recent-event-gallery-stack {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
}

.recent-event-gallery-stack-item {
  display: block;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 9px 18px rgba(2, 27, 58, 0.22);
}

.recent-event-gallery-stack-item.is-overlap {
  margin-left: -0.7rem;
}

.recent-event-gallery-stack-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-event-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
}

.recent-events-rail {
  min-width: 0;
}

.recent-events-list-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 1px solid rgba(3, 41, 86, 0.1);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(251, 247, 244, 0.96) 100%);
  box-shadow: 0 20px 38px rgba(2, 27, 58, 0.1);
}

.recent-events-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.recent-events-list-head > span:first-child {
  display: grid;
  gap: 0.25rem;
}

.recent-events-list-kicker {
  color: var(--color-orange);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-events-list-title {
  color: var(--color-navy);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.1;
}

.recent-events-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(255, 158, 1, 0.12);
  color: var(--color-orange);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
}

.recent-events-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-color: rgba(3, 41, 86, 0.24) rgba(3, 41, 86, 0.06);
  scrollbar-width: thin;
}

.recent-events-list::-webkit-scrollbar {
  width: 8px;
}

.recent-events-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(3, 41, 86, 0.06);
}

.recent-events-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(3, 41, 86, 0.24);
}

.recent-events-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-orange);
}

.recent-event-list-item {
  display: grid;
  flex-shrink: 0; /* <--- THIS FIXES THE OVERLAP! */
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-height: 8.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(3, 41, 86, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(2, 27, 58, 0.06);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.recent-event-list-item:hover,
.recent-event-list-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 158, 1, 0.38);
  box-shadow: 0 18px 30px rgba(2, 27, 58, 0.11);
}

.recent-event-list-thumb {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--color-soft-gray);
}

.recent-event-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.recent-event-list-item:hover .recent-event-list-thumb img,
.recent-event-list-item:focus-visible .recent-event-list-thumb img {
  transform: scale(1.05);
}

.recent-event-list-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.recent-event-list-meta {
  color: var(--color-orange);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent-event-list-heading {
  display: block;
  margin-top: 0.35rem;
  color: var(--color-navy);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.15;
}

.recent-event-list-summary {
  display: -webkit-box;
  margin-top: 0.45rem;
  overflow: hidden;
  color: rgba(3, 41, 86, 0.64);
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-events-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.recent-events-modal.hidden {
  display: none;
}

.recent-events-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 27, 58, 0.84);
  backdrop-filter: blur(8px);
}

.recent-events-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 34px 64px rgba(2, 27, 58, 0.36);
}

.recent-events-modal-grid {
  display: grid;
}

.recent-events-modal-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--color-midnight) 0%, var(--color-navy) 100%);
}

.recent-events-modal-image {
  width: 100%;
  max-width: 100%;
  max-height: min(72vh, 40rem);
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.recent-events-modal-copy {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.recent-events-modal-meta {
  margin: 0 0 0.85rem;
  color: var(--color-orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-events-modal-title {
  margin: 0;
  color: var(--color-navy);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
}

.recent-events-modal-description {
  margin: 1rem 0 0;
  color: rgba(3, 41, 86, 0.72);
  font-size: 1rem;
  line-height: 1.7;
}

.recent-events-modal-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.recent-events-modal-counter {
  color: rgba(3, 41, 86, 0.65);
  font-size: 0.82rem;
  font-weight: 700;
}

.recent-events-modal-close,
.recent-events-modal-nav,
.recent-events-modal-dot {
  border: 0;
}

.recent-events-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-navy);
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(2, 27, 58, 0.15);
}

.recent-events-modal-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.recent-events-modal-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.recent-events-modal-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.recent-events-modal-nav-prev {
  left: 1rem;
}

.recent-events-modal-nav-next {
  right: 1rem;
}

.recent-events-modal-dots {
  display: flex;
  flex-wrap: nowrap; /* prevent new line */
  gap: 0.5rem;
  overflow-x: auto; /* optional: scroll if too many */
}

.recent-events-modal-dots:empty {
  display: none;
}

.recent-events-modal-dot {
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(3, 41, 86, 0.18);
  border-radius: 999px;
  background: var(--color-soft-gray);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.recent-events-modal-dot.is-active {
  border-color: var(--color-orange);
  background: var(--color-orange);
  transform: scale(1.12);
}

.recent-event-feature:focus-visible,
.recent-event-list-item:focus-visible,
.recent-events-modal-close:focus-visible,
.recent-events-modal-nav:focus-visible,
.recent-events-modal-dot:focus-visible {
  outline: 3px solid rgba(255, 158, 1, 0.36);
  outline-offset: 4px;
}

/* ============================================================
   SUMMARY CARD STYLES
   ============================================================ */
.recent-events-summary-card {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(3, 41, 86, 0.1);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 158, 1, 0.05) 0%, rgba(3, 41, 86, 0.02) 100%);
  margin-bottom: 1.25rem;
}

.recent-events-summary-chip {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  margin-bottom: 1rem;
  background: rgba(255, 158, 1, 0.12);
  color: var(--color-orange);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recent-events-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(3, 41, 86, 0.1);
}

.recent-events-summary-stat {
  display: flex;
  flex-direction: column;
}

.recent-events-summary-stat strong {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-orange);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.recent-events-summary-stat span {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(3, 41, 86, 0.7);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ============================================================
   MEDIA QUERIES / RESPONSIVE (CLEANED)
   ============================================================ */
@media (min-width: 768px) {
  .recent-events-container {
    width: calc(100% - 3rem); 
  }
}

@media (min-width: 1024px) {
  .recent-events-shell {
    grid-template-columns: minmax(520px, 0.95fr) minmax(420px, 1fr) !important;
    align-items: stretch;
    gap: 1.5rem;
  }

  .recent-event-feature {
    aspect-ratio: 1 / 1;
    min-height: 0;
  }

  .recent-events-rail,
  .recent-events-list-card {
    height: 100%;
  }

  .recent-events-modal-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  }
}

@media (min-width: 1440px) {
  .recent-events-container {
    width: calc(100% - 5rem); 
  }
}

@media (max-width: 1023px) {
  .recent-events-list-card {
    max-height: 36rem;
  }

  .recent-event-list-item {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .recent-events-shell {
    gap: 1.5rem !important;
  }

  .recent-events-list-card {
    max-height: none; 
    border-radius: 20px;
    padding: 1.25rem;
  }
  
  .recent-events-list {
    max-height: none; 
    overflow-y: visible;
    padding-right: 0;
  }

  .recent-events-summary-card {
    border-radius: 20px;
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  .recent-event-feature {
    min-height: 24rem;
    border-radius: 20px;
  }
  
  .recent-event-feature-content {
    padding: 1.25rem;
  }

  .recent-event-gallery-stack {
    flex-shrink: 0; 
  }
  
  .recent-event-gallery-stack-item {
    flex-shrink: 0;
    width: 2.5rem; 
    height: 2.5rem;
  }
  
  .recent-event-feature-footer {
    justify-content: flex-start;
    gap: 1.25rem;
  }

  .recent-event-feature-title {
    font-size: 1.75rem !important; 
    line-height: 1.1;
  }

  .recent-events-list-card,
  .recent-events-summary-card {
    border-radius: 20px;
    padding: 1.25rem;
  }

  .recent-event-list-item {
    grid-template-columns: 5rem minmax(0, 1fr); 
    min-height: auto;
    padding: 0.85rem;
    gap: 1rem;
    border-radius: 16px;
  }

  .recent-event-list-thumb {
    border-radius: 12px;
    height: 5rem;
    width: 5rem;
  }

  .recent-events-summary-grid {
    grid-template-columns: 1fr 1fr; 
  }
}

@media (max-width: 400px) {
  .recent-event-list-item {
    grid-template-columns: 4rem minmax(0, 1fr); 
    gap: 0.75rem;
  }
  
  .recent-event-list-thumb {
    height: 4rem;
    width: 4rem;
  }
  
  .recent-event-feature-title {
    font-size: 1.5rem !important;
  }
}