/* BUTTONS */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-weight: 600;
  text-align: center;
  border-radius: 50px;
  /* Pill shape for a modern, elegant look */
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(145, 56, 50, 0.15);
  /* Subtle shadow using primary color */
}

.btn-primary {
  background-color: var(--color-red-ochre);
  color: var(--color-bg);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--color-red-ochre-dark);
  color: var(--color-bg);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(145, 56, 50, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-red-ochre);
  border: 2px solid var(--color-red-ochre);
}

.btn-secondary:hover {
  background-color: var(--color-red-ochre-dark);
  border-color: var(--color-red-ochre-dark);
  color: var(--color-bg) !important;
}

/* SECTION STRUCTURE */
.home-section {
  padding: var(--space-6) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-sand);
  padding-bottom: var(--space-2);
}

.view-all {
  font-weight: 600;
  font-size: 0.875rem;
}

.text-center {
  text-align: center;
}

.lead {
  font-size: 1.25rem;
  max-width: var(--article-max-width);
  margin: 0 auto var(--space-4);
  color: var(--color-stone);
}

/* CARDS & GRIDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--color-bg);
  color: var(--color-text);
  /* Modern clean radius instead of messy organic one */
  border-radius: var(--radius-lg);
  border: 1px solid rgba(216, 201, 173, 0.4);
  /* Subtle Sand border */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  /* Keep paper texture for character but soften it */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  box-shadow: 0 4px 20px rgba(41, 40, 36, 0.04);
  /* Very soft initial shadow */
}

/* Base Card Hover Effect */
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(41, 40, 36, 0.12);
  /* Elegant float */
}

/* SVG Leaf Line-draw animation on hover */
.card .card-hover-leaf {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  stroke: var(--color-grass);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  transition: stroke-dashoffset 0.6s ease;
  pointer-events: none;
  opacity: 0.5;
}

.card:hover .card-hover-leaf {
  stroke-dashoffset: 0;
}

/* Base Card Content Padding */
.card-content {
  padding: var(--space-3);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* RESEARCH CARD */
.card-research .card-image-container {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--color-grass);
}

.card-research .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-research:hover .card-image {
  transform: scale(1.03);
}

.card-research .card-badge {
  font-size: 0.75rem;
  color: var(--color-grass);
  margin-bottom: var(--space-2);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-research .card-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.card-research .card-summary {
  color: var(--color-leaf-green);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.card-research .read-more {
  color: var(--color-red-ochre);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-top: auto;
}

/* TEAM CARD (Polaroid Style) */
.card-team-polaroid {
  background: var(--color-bg);
  padding: 6px 6px 12px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  align-items: center;
  text-align: center;
  border-radius: 2px;
  height: 100%;
  position: relative;
}

.card-team-polaroid:nth-child(even) {
  transform: rotate(2deg);
}

.card-team-polaroid:nth-child(odd) {
  transform: rotate(-2deg);
}

.card-team-polaroid:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.polaroid-image {
  width: 100%;
  aspect-ratio: 1;
  /* square photo */
  background: #eee;
  margin-bottom: 8px;
  overflow: hidden;
  display: block;
}

.polaroid-image.no-photo {
  background: transparent;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.polaroid-title {
  font-size: 1rem;
  margin-bottom: 0;
  color: var(--color-text);
}

.polaroid-subtitle {
  font-size: 0.65rem;
  color: var(--color-red-ochre);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.polaroid-read-more {
  font-size: 0.65rem;
  color: var(--color-grass);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: auto;
}

.polaroid-read-more::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.polaroid-read-more:hover {
  color: var(--color-red-ochre);
}

/* NAME PLATE STYLE (For team members without photos) */
.card-team-nameplate {
  background: var(--color-bg);
  border: 1px solid var(--color-sand);
  border-left: 6px solid var(--color-red-ochre);
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 4px;
  height: 100%;
  min-height: auto;
  position: relative;
}

.card-team-nameplate:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.nameplate-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.nameplate-title {
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: var(--color-text);
  font-family: var(--font-heading);
}

.nameplate-subtitle {
  font-size: 0.75rem;
  color: var(--color-forest-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.nameplate-read-more {
  font-size: 0.65rem;
  color: var(--color-red-ochre);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: auto;
}

.nameplate-read-more::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.nameplate-read-more:hover {
  color: var(--color-red-ochre);
}

/* PUBLICATION CARD (Academic Style) */
.publication-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-publication {
  border-left: 4px solid var(--color-forest-green);
  border-radius: 2px 8px 6px 2px;
  background-color: var(--color-bg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-publication .card-link-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-publication .card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-publication .publication-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-forest-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.card-publication .publication-separator {
  margin: 0 4px;
  color: var(--color-stone);
}

.card-publication .publication-category {
  color: var(--color-grass, #d4a373);
}

.card-publication .card-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.card-publication .card-authors {
  font-size: 0.85rem;
  color: var(--color-grass);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--color-sand);
}

.card-publication .card-journal {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-leaf-green);
  margin-bottom: var(--space-4);
}

.card-publication .card-actions {
  margin-top: auto;
}

.card-publication .card-actions .btn {
  font-size: 0.8rem;
  padding: 6px 16px;
  border-color: var(--color-grass);
  color: var(--color-leaf-green);
  display: inline-block;
}

.card-publication .card-actions .btn:hover {
  background-color: var(--color-forest-green);
  color: var(--color-bg) !important;
  border-color: var(--color-forest-green);
}

/* TEXT CARD (Prose Sections) */
.text-card {
  padding: var(--space-6);
}

@media (max-width: 480px) {
  .text-card {
    padding: var(--space-4);
  }
}




.text-card .pull-quote {
  position: relative;
  padding: var(--space-4);
  margin: var(--space-5) 0;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-forest-green);
  border-left: 2px solid var(--color-red-ochre-dark);
}

.text-card .pull-quote::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: 6rem;
  color: var(--color-red-ochre);
  opacity: 0.15;
  font-family: var(--font-heading);
}

/* Stagger Fade-in Animation */
@keyframes staggerFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-in {
  animation: staggerFade 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 200ms;
}

.reveal-delay-3 {
  transition-delay: 300ms;
}

/* FULLSCREEN INTRO */
.fullscreen-intro {
  position: relative;
  height: 100vh;
  min-height: 500px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg);
}

.intro-direct-overlay {
  max-width: 900px;
  margin: 0 auto;
  color: var(--color-bg);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  padding: 0 var(--space-4);
}

.intro-direct-overlay .welcome-text h1,
.intro-direct-overlay .welcome-text h2,
.intro-direct-overlay .welcome-text h3 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-bg);
}

.intro-direct-overlay .welcome-text p {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: var(--space-5);
  color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: var(--space-4);
    }
    
    .map-visual:not(.is-expanded) {
        width: 110px;
        height: 150px;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 120px);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}
  .intro-direct-overlay .welcome-text h1,
  .intro-direct-overlay .welcome-text h2,
  .intro-direct-overlay .welcome-text h3 {
    font-size: 2.5rem;
  }
  .intro-direct-overlay .welcome-text p {
    font-size: 1.1rem;
  }


.btn-pill-theme {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-bg) !important;
  font-weight: 700;
  padding: var(--space-3) var(--space-5);
  border-radius: 50px;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-pill-theme:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-pill-theme .icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-forest-green);
  color: var(--color-bg);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
}

.overlap-cards {
  margin-top: -120px;
  position: relative;
  z-index: 20;
}

/* HERO SLIDER */
.hero-slider {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  background: #111;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.slider-container {
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.slide-caption {
  position: absolute;
  bottom: var(--space-5);
  left: var(--space-5);
  color: var(--color-bg);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slider-controls {
  position: absolute;
  bottom: calc(120px + var(--space-4));
  right: var(--space-4);
  display: flex;
  gap: var(--space-2);
  z-index: 30;
  pointer-events: auto;
}

@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: var(--space-4);
    }
    
    .map-visual:not(.is-expanded) {
        width: 110px;
        height: 150px;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 120px);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}


.slider-controls button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--color-bg);
  color: var(--color-bg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.slider-controls button:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   HOMEPAGE: WELCOME INTRO
   ========================================================================== */
.home-welcome-intro {
  text-align: center;
  max-width: 900px;
  margin: 0 auto var(--space-6);
  padding: var(--space-6) var(--space-5);
  background: radial-gradient(circle at center,
      rgba(217, 113, 78, 0.08) 0%,
      transparent 80%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(217, 113, 78, 0.15);
}

.welcome-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-forest-green);
  margin-bottom: var(--space-5);
}

.welcome-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: var(--space-4);
    }
    
    .map-visual:not(.is-expanded) {
        width: 110px;
        height: 150px;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 120px);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}


/* ==========================================================================
   HOMEPAGE: PREVIEW CARD (Replaces Scrollytelling)
   ========================================================================== */
.case-preview-section {
  padding: var(--space-6) 0;
}

.case-preview-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-slider.fullscreen-slider {
  height: 100vh;
  min-height: 500px;
  border-radius: 0;
  box-shadow: none;
}

.slider-dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  /* Let clicks pass through if needed, though button is inside */
}

.slider-dark-overlay .container {
  pointer-events: auto;
  /* Re-enable clicks for the button */
}

.case-preview-card.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-bg);
}

.case-preview-card .glass-overlay {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding: var(--space-5);
  background: rgba(253, 252, 240, 0.95); /* Swapped to cream */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: 100%;
  height: 100%;
}

@media (min-width: 992px) {
  .case-preview-card .glass-overlay {
    grid-template-columns: 3fr 2fr;
    padding: var(--space-6);
    gap: var(--space-6);
  }
}

.post-fixed-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.post-glass-content {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 40px;
  padding: var(--space-4) var(--space-6) var(--space-4) var(--space-6);
  margin-top: var(--space-6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: var(--space-4);
    }
    
    .map-visual:not(.is-expanded) {
        width: 110px;
        height: 150px;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 120px);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}


@media (max-width: 480px) {
  .post-glass-content {
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
  }
}

.case-preview-content .eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-forest-green);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.case-preview-content .preview-text {
  font-size: var(--text-md);
  /* Reduced from --text-lg */
  line-height: 1.6;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.case-preview-content .preview-text.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stat Highlights Column */
.case-preview-stats {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-glow-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
      rgba(230, 194, 138, 0.2) 0%,
      transparent 70%);
  /* --color-sand */
  z-index: 0;
}

.preview-chips-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3) var(--space-4);
  background: #ffffff; /* Swapped to white */
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  width: 100%;
}

.stat-chip {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--color-stone);
  padding: 0 0 var(--space-3) 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--font-body);
  /* Technical/Small text */
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.stat-chip:nth-last-child(-n + 2) {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-chip strong,
.stat-chip b {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-forest-green);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.1;
  margin: 4px 0;
  display: block;
}

.stat-chip-hidden {
  opacity: 1;
  transform: none;
}

.stat-chip.is-revealed {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   FULL STORY PAGE HIGHLIGHTS
   ========================================================================== */
.case-story-content {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-forest-green);
}

.case-story-content p {
  margin-bottom: var(--space-5);
}

.case-story-content strong,
.case-story-content b {
  background-color: rgba(217, 113, 78, 0.15);
  /* --color-red-ochre */
  padding: 2px 4px;
  border-radius: 3px;
  border-bottom: 2px solid var(--color-red-ochre);
  font-weight: 700;
}

/* ==========================================================================
   FEATURE 8: INTERACTIVE MAP
   ========================================================================== */
.interactive-map-section {
  position: relative;
  padding: var(--space-6) 0;
  overflow: hidden;
  text-align: center;
  /* Centers the inline-block map container */
}

.map-container {
  position: relative;
  display: inline-block;
  /* Shrink-wraps the image so hotspots align perfectly */
  max-width: 100%;
  margin: 0 auto;
}

.map-svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  /* Constrains the map to the screen height */
  display: block;
}

.map-hotspots-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-hotspot {
  position: absolute;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  background: var(--color-red-ochre);
  border: 2px solid var(--color-bg);
  color: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.map-hotspot svg {
  display: none;
}

.map-hotspot:hover,
.map-hotspot:focus {
  transform: translate(-50%, -50%) scale(1.2);
  outline: none;
}

.map-hotspot:focus-visible {
  box-shadow:
    0 0 0 3px var(--color-bg),
    0 0 0 5px var(--color-red-ochre);
}

/* Subtle pulse animation for hotspots */
@keyframes hotspotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 113, 78, 0.7);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(217, 113, 78, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(217, 113, 78, 0);
  }
}

.map-hotspot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  animation: hotspotPulse 3s infinite;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .map-hotspot::after {
    animation: none;
  }
}

/* Desktop Popover */
.map-popover {
  position: absolute;
  z-index: 20;
  width: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.95);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.map-popover.is-active {
  opacity: 1;
  pointer-events: auto;
}

.map-popover.is-active:not(.popover-bottom) {
  transform: translate(-50%, -10px) scale(1);
}

.map-popover.is-active.popover-bottom {
  transform: translate(-50%, 10px) scale(1);
}

.map-popover-content {
  position: relative;
  padding: var(--space-3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}

/* Arrow */
.map-popover:not(.popover-bottom) .map-popover-content::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.4) transparent transparent transparent;
}

.map-popover.popover-bottom .map-popover-content::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent rgba(255, 255, 255, 0.4) transparent;
}

.map-popover-close {
  display: none;
  /* Hidden on desktop, handled by mouseleave */
}

.map-popover-icon {
  display: none;
}

.map-popover-title {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
  font-weight: 700;
}

/* Mobile Bottom Sheet */
@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: var(--space-4);
    }
    
    .map-visual:not(.is-expanded) {
        width: 110px;
        height: 150px;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 120px);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}

  .map-popover.is-active {
    transform: translateY(0);
  }

  .map-popover-content {
    border-radius: 20px 20px 0 0;
    padding: var(--space-5);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.2);
  }

  .map-popover-content::after {
    display: none;
    /* No arrow on mobile */
  }

  .map-popover-close {
    display: block;
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-grass);
    cursor: pointer;
  }

/* PDF PREVIEW MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  width: 90vw;
  height: 90vh;
  max-width: 1200px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: #333;
  color: var(--color-bg);
  border: none;
  font-size: 24px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--color-forest-green);
}

.modal-content {
  flex-grow: 1;
  width: 100%;
  height: 100%;
}

/* FORCE SPACE ABOVE EMBEDDED PLUGIN FORMS */
.post-content form {
  margin-top: 90px !important;
}

/* Fallback for margin-collapse: target the Ghost card wrapper */
.post-content *:has(> form) {
  margin-top: 90px !important;
  padding-top: 10px !important;
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVENESS FIXES
   ========================================================================== */
@media (min-width: 768px) {
  .preview-chips-container {
    grid-template-columns: 1fr 1fr;
  }
}



/* ==========================================================================
   DYNAMIC MAPS SECTION
   ========================================================================== */
.dynamic-maps-section {
    padding: 0;
    position: relative;
}

.maps-slider-container {
    position: relative;
    height: 600px;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
    z-index: 2;
}

.maps-nav-controls {
    position: absolute;
    top: auto;
    bottom: calc(280px + var(--space-4) + 40px);
    transform: translateY(50%);
    left: calc(50% + var(--space-2));
    z-index: 20;
    display: flex;
    gap: var(--space-2);
}

.map-nav-btn {
    background: rgba(253, 252, 240, 0.9);
    border: 1px solid rgba(216, 201, 173, 0.6);
    color: var(--color-text);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 1.2rem;
}

.map-nav-btn:hover {
    background: var(--color-red-ochre);
    color: var(--color-bg);
    transform: translateY(-2px);
}

/* Right Side: Info Panel (Top Right) */
.maps-info-panel {
    position: absolute;
    left: 50%;
    top: 0;
    right: var(--space-6);
    bottom: calc(280px + var(--space-4) + 80px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.map-info {
    position: relative;
    width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.map-info-desc {
    padding: var(--space-5);
    font-size: var(--text-md);
    line-height: 1.6;
    color: #000;
    overflow-y: auto;
}

.map-info.is-active {
    opacity: 1;
    transform: translateY(0);
}

.map-info-caption {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--space-3);
    color: #000;
}


/* Visual Map Cards */
.map-visual {
    position: absolute;
    /* top and left are set dynamically by JS for dock positioning */
    bottom: var(--space-4);
    left: calc(50% + var(--dock-index, 0) * 220px);
    width: 200px;
    height: 280px;
    border-radius: var(--radius-md);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.map-visual:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.map-visual.is-expanded .map-image {
    object-fit: contain;
    mix-blend-mode: multiply;
    cursor: zoom-in;
    transition: transform 0.4s ease;
}
.map-visual.is-expanded:hover .map-image {
    transform: scale(1.02);
}

.map-thumbnail-title {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    color: #000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 2;
}

.map-visual.is-expanded {
    top: 0 !important;
    left: var(--space-6) !important;
    bottom: var(--space-4) !important;
    width: calc(50% - var(--space-6) * 1.5);
    height: auto !important;
    border-radius: var(--radius-lg);
    z-index: 5;
    box-shadow: none;
    background: transparent;
    cursor: default;
    transform: none;
}

.map-visual.is-expanded .map-thumbnail-title {
    opacity: 0;
}

.glass-panel {
    background: rgba(253, 252, 240, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(216, 201, 173, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1200px) {
    .map-visual:not(.is-expanded) {
        width: 14vw;
        height: 19vw;
        left: calc(50% + var(--dock-index, 0) * 15vw);
    }
}

@media (max-width: 768px) {
    .maps-slider-container {
        height: auto;
        min-height: 85vh;
        display: flex;
        flex-direction: column;
        padding-bottom: 180px;
    }

    .maps-info-panel {
        position: relative;
        left: 0;
        top: auto;
        bottom: auto;
        width: 100%;
        padding: 0;
    }
    
    .map-info-title {
        font-size: 2rem;
        margin-bottom: var(--space-2);
    }
    
    .map-visual.is-expanded {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        width: 100%;
        height: 45vh;
        bottom: auto !important;
        margin-top: 0;
    }
    
    .map-visual:not(.is-expanded) {
        width: 25vw;
        height: 35vw;
        bottom: var(--space-2);
        left: calc(var(--space-2) + var(--dock-index, 0) * 27vw);
    }

    .maps-nav-controls {
        bottom: 170px;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* Map Lightbox Preview */
.map-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.map-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.map-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.map-lightbox-img {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    z-index: 2;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.map-lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}

.map-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}



 . m a p - l i g h t b o x - d o w n l o a d   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   v a r ( - - s p a c e - 4 ) ; 
         r i g h t :   c a l c ( v a r ( - - s p a c e - 4 )   +   6 4 p x ) ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 ) ; 
         c o l o r :   w h i t e ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 4 ) ; 
         w i d t h :   4 8 p x ; 
         h e i g h t :   4 8 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         c u r s o r :   p o i n t e r ; 
         z - i n d e x :   3 ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
         t e x t - d e c o r a t i o n :   n o n e ; 
 } 
 . m a p - l i g h t b o x - d o w n l o a d : h o v e r   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 4 ) ; 
 } 
 
 
 
