/* ==========================================================================
   EVF Werkgebied Map — Plugin Styles
   Design System: "The Scholarly Consultant"
   ========================================================================== */

/* --- Custom Properties (with fallbacks matching the theme) --- */
:root {
  --evf-primary: var(--utt-primary, #0042A8);
  --evf-primary-container: var(--utt-primary-container, #1459D3);
  --evf-secondary: var(--utt-secondary, #712AE2);
  --evf-tertiary: var(--utt-tertiary, #7C3400);
  --evf-surface: var(--utt-surface, #F9F9FF);
  --evf-surface-low: var(--utt-surface-container-low, #F0F3FF);
  --evf-surface-container: var(--utt-surface-container, #E7EEFF);
  --evf-on-surface: var(--utt-on-surface, #111C2D);
  --evf-on-surface-variant: var(--utt-on-surface-variant, #434654);
  --evf-outline: var(--utt-outline, #737686);
  --evf-outline-variant: var(--utt-outline-variant, #C3C5D7);
  --evf-white: #FFFFFF;
  --evf-font-headline: 'Manrope', sans-serif;
  --evf-font-body: 'Work Sans', sans-serif;
  --evf-font-label: 'Manrope', sans-serif;
  --evf-radius-sm: 0.25rem;
  --evf-radius-lg: 0.75rem;
  --evf-radius-xl: 1.5rem;
  --evf-radius-pill: 50rem;
  --evf-shadow: 0 24px 48px -12px rgba(17, 28, 45, 0.08);
  --evf-shadow-sm: 0 8px 24px -4px rgba(17, 28, 45, 0.05);
  --evf-transition: all 0.2s ease-in-out;
}


/* ==========================================================================
   1. Section
   ========================================================================== */

.evf-werkgebied {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  background-color: var(--evf-surface);
}

.evf-werkgebied--full {
  background:
    radial-gradient(circle at top center, rgba(20, 89, 211, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(249, 249, 255, 0.98), rgba(240, 243, 255, 0.72));
}


/* ==========================================================================
   2. Section Header
   ========================================================================== */

.evf-werkgebied__header {
  text-align: center;
  margin-bottom: 1.5rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.evf-werkgebied__label {
  display: inline-flex;
  margin-bottom: 0.8rem;
}

.evf-werkgebied__heading {
  font-family: var(--evf-font-headline);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--evf-on-surface);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.evf-werkgebied__intro {
  font-family: var(--evf-font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--evf-on-surface-variant);
  max-width: 600px;
  margin: 0 auto;
}


/* ==========================================================================
   3. Stats Bar
   ========================================================================== */

.evf-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  background-color: var(--evf-white);
  border: 1px solid rgba(195, 197, 215, 0.8);
  border-radius: var(--evf-radius-xl);
  box-shadow: var(--evf-shadow);
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.evf-stats::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--evf-primary), var(--evf-primary-container));
}

.evf-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
}

.evf-stats__number {
  font-family: var(--evf-font-headline);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.1;
  color: var(--evf-primary);
  margin-bottom: 0.25rem;
}

.evf-stats__label {
  font-family: var(--evf-font-headline);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evf-on-surface-variant, #434654);
}


/* ==========================================================================
   4. Stats Divider
   ========================================================================== */

.evf-stats__divider {
  display: none;
}


/* ==========================================================================
   5. Map + List Layout
   ========================================================================== */

.evf-map-layout {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.evf-map-layout__map {
  flex: 0 0 60%;
  max-width: 60%;
  position: relative;
  order: 1;
  overflow: hidden;
}

.evf-map-layout__list {
  flex: 0 0 calc(40% - 1rem);
  max-width: calc(40% - 1rem);
  order: 2;
  background-color: var(--evf-white);
  border: 1px solid rgba(195, 197, 215, 0.8);
  border-radius: var(--evf-radius-xl);
  box-shadow: var(--evf-shadow-sm);
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.evf-map-layout__list::after {
  content: '';
  display: block;
  position: sticky;
  bottom: 0;
  height: 3rem;
  background: linear-gradient(transparent, var(--evf-white, #fff));
  pointer-events: none;
}


/* ==========================================================================
   6. Map Container
   ========================================================================== */

.evf-map {
  width: 100%;
  min-height: 550px;
  height: 600px;
  border-radius: var(--evf-radius-xl);
  overflow: hidden;
  z-index: 5;
  position: relative;
}


/* ==========================================================================
   7. Map Legend
   ========================================================================== */

.evf-map__legend {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 6;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evf-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--evf-white);
  border-radius: var(--evf-radius-pill);
  padding: 0.25rem 0.75rem;
  font-family: var(--evf-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--evf-on-surface);
  box-shadow: var(--evf-shadow-sm);
  line-height: 1.4;
}


/* ==========================================================================
   8. Legend Dot
   ========================================================================== */

.evf-map__legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.evf-role--interim .evf-map__legend-dot {
  background-color: var(--evf-primary);
}

.evf-role--coaching .evf-map__legend-dot {
  background-color: var(--evf-secondary);
}

.evf-role--board .evf-map__legend-dot {
  background-color: var(--evf-tertiary);
}

.evf-role--other .evf-map__legend-dot {
  background-color: var(--evf-on-surface-variant);
}


/* ==========================================================================
   9. Assignment List
   ========================================================================== */

.evf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1 1 auto;
}


/* ==========================================================================
   10. List Header
   ========================================================================== */

.evf-list__header {
  font-family: var(--evf-font-headline);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evf-on-surface-variant);
  padding: 1.25rem 1.25rem 0.75rem;
  position: sticky;
  top: 0;
  background-color: color-mix(in srgb, var(--evf-surface-low) 70%, white);
  border-bottom: 1px solid rgba(195, 197, 215, 0.75);
  z-index: 2;
}


/* ==========================================================================
   10b. Role Filter Buttons
   ========================================================================== */

.evf-filters {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(195, 197, 215, 0.75);
  background: color-mix(in srgb, var(--evf-surface-low) 55%, white);
  flex-wrap: wrap;
}

.evf-filter-btn {
  border: 1px solid var(--evf-outline-variant, #C3C5D7);
  background: transparent;
  border-radius: 50rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--evf-font-label, 'Manrope', sans-serif);
  color: var(--evf-on-surface-variant, #434654);
  transition: all 0.2s;
}

.evf-filter-btn:hover {
  background: var(--evf-surface-container, #E7EEFF);
}

.evf-filter-btn--active {
  background: var(--evf-primary, #0042A8);
  color: white;
  border-color: var(--evf-primary, #0042A8);
}

.evf-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.25rem 0;
  font-family: var(--evf-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--evf-on-surface-variant, #434654);
  cursor: pointer;
  transition: color 0.2s ease;
}

.evf-active-toggle:hover {
  color: var(--evf-primary, #0042A8);
}

.evf-active-toggle input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--evf-primary, #0042A8);
  cursor: pointer;
}

.evf-active-toggle input:focus-visible {
  outline: 2px solid var(--evf-primary, #0042A8);
  outline-offset: 2px;
}

.evf-active-toggle input:checked + span {
  color: var(--evf-primary, #0042A8);
}


/* ==========================================================================
   11. List Item
   ========================================================================== */

.evf-list__item {
  padding: 0.75rem 1.25rem;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: var(--evf-transition);
  border-bottom: 1px solid var(--evf-outline-variant);
}

.evf-list__item:last-child {
  border-bottom: none;
}

.evf-list__item:hover {
  background-color: var(--evf-surface-low);
  border-radius: 0 var(--evf-radius-sm) var(--evf-radius-sm) 0;
}

.evf-list__item:focus-visible {
  outline: 2px solid var(--evf-primary);
  outline-offset: -2px;
  border-radius: var(--evf-radius-sm);
}


/* --- Role color left borders --- */

.evf-list__item.evf-role--interim {
  border-left-color: var(--evf-primary);
}

.evf-list__item.evf-role--coaching {
  border-left-color: var(--evf-secondary);
}

.evf-list__item.evf-role--board {
  border-left-color: var(--evf-tertiary);
}

.evf-list__item.evf-role--other {
  border-left-color: var(--evf-on-surface-variant);
}


/* ==========================================================================
   12. Active List Item
   ========================================================================== */

.evf-list__item--active {
  background-color: var(--evf-surface-low);
}

/* Selected list item */
.evf-list__item--selected {
  background-color: var(--evf-surface-container, #E7EEFF);
}

/* Hidden list item (filtered by timeline) */
.evf-list__item--hidden {
  display: none;
}


/* ==========================================================================
   13. List Item Header
   ========================================================================== */

.evf-list__item-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.evf-list__item-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evf-list__item-title {
  font-family: var(--evf-font-headline);
  font-weight: 700;
  font-size: 1rem;
  color: var(--evf-on-surface, #111C2D);
  line-height: 1.3;
}

.evf-list__item-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.evf-list__item-city {
  font-family: var(--evf-font-body);
  font-size: 0.8125rem;
  color: var(--evf-on-surface-variant, #434654);
  line-height: 1.4;
}

.evf-list__item-period {
  font-family: var(--evf-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--evf-on-surface, #111C2D);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ==========================================================================
   14. List Item Detail (expandable)
   ========================================================================== */

/* No-JS: details visible by default; JS adds .js-evf-loaded to hide them */
.js-evf-loaded .evf-list__item-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out, margin-top 0.2s ease-in-out;
  margin-top: 0;
}

.js-evf-loaded .evf-list__item[aria-expanded="true"] .evf-list__item-detail {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.75rem;
}

.evf-list__item-stichting {
  font-family: var(--evf-font-body);
  font-size: 0.8125rem;
  color: var(--evf-outline);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.evf-list__item-section {
  margin-bottom: 0.5rem;
}

.evf-list__item-section:last-child {
  margin-bottom: 0;
}

.evf-list__item-section strong {
  display: block;
  font-family: var(--evf-font-headline);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--evf-on-surface);
  margin-bottom: 0.125rem;
}

.evf-list__item-section p {
  font-family: var(--evf-font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--evf-on-surface-variant);
  margin: 0;
}


/* ==========================================================================
   15. Badge — Type (school type pill)
   ========================================================================== */

.evf-list__badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--evf-font-headline);
  font-weight: 600;
  line-height: 1;
}

.evf-list__badge--type {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  font-weight: 700;
  border-radius: var(--evf-radius-pill);
  background-color: var(--evf-surface-container);
  color: var(--evf-on-surface-variant);
  flex-shrink: 0;
}


/* ==========================================================================
   16. Badge — Active
   ========================================================================== */

.evf-list__badge--active {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  font-weight: 700;
  border-radius: var(--evf-radius-pill);
  background-color: rgba(25, 135, 84, 0.15);
  color: #198754;
  margin-top: 0.25rem;
  align-self: flex-start;
}


/* ==========================================================================
   17. Role Color Classes (generic accents)
   ========================================================================== */

.evf-role--interim {
  --evf-role-color: var(--evf-primary);
}

.evf-role--coaching {
  --evf-role-color: var(--evf-secondary);
}

.evf-role--board {
  --evf-role-color: var(--evf-tertiary);
}

.evf-role--other {
  --evf-role-color: var(--evf-on-surface-variant);
}


/* ==========================================================================
   18. Timeline
   ========================================================================== */

.evf-timeline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--evf-white);
  border-radius: var(--evf-radius-xl);
  box-shadow: var(--evf-shadow-sm);
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 0 0 100%;
  order: 3;
  position: relative;
}


/* ==========================================================================
   19. Timeline Slider (custom range input)
   ========================================================================== */

.evf-timeline__slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 120px;
  height: 8px;
  border-radius: var(--evf-radius-pill);
  background: linear-gradient(
    to right,
    var(--evf-primary) 0%,
    var(--evf-primary) var(--evf-slider-fill, 100%),
    var(--evf-outline-variant) var(--evf-slider-fill, 100%),
    var(--evf-outline-variant) 100%
  );
  outline: none;
  cursor: pointer;
  transition: opacity 0.15s ease-in-out, background 0.5s ease-out;
}

/* Webkit thumb */
.evf-timeline__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--evf-primary);
  border: 3px solid var(--evf-white);
  box-shadow: 0 2px 6px rgba(17, 28, 45, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.evf-timeline__slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(17, 28, 45, 0.3);
}

/* Firefox thumb */
.evf-timeline__slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--evf-primary);
  border: 3px solid var(--evf-white);
  box-shadow: 0 2px 6px rgba(17, 28, 45, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.evf-timeline__slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(17, 28, 45, 0.3);
}

/* Firefox track */
.evf-timeline__slider::-moz-range-track {
  height: 8px;
  border-radius: var(--evf-radius-pill);
  background: var(--evf-outline-variant);
}

/* Focus style */
.evf-timeline__slider:focus-visible {
  outline: 2px solid var(--evf-primary);
  outline-offset: 4px;
  border-radius: var(--evf-radius-pill);
}

/* Year labels */
.evf-timeline__year-label {
  font-family: var(--evf-font-headline);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--evf-on-surface-variant);
  flex-shrink: 0;
  user-select: none;
}


/* ==========================================================================
   20. Timeline Chevrons
   ========================================================================== */

.evf-timeline__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--evf-outline-variant);
  border-radius: 50%;
  background-color: var(--evf-white);
  color: var(--evf-on-surface);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--evf-transition);
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}

.evf-timeline__chevron:hover {
  background-color: var(--evf-surface-low);
  border-color: var(--evf-primary);
  color: var(--evf-primary);
}

.evf-timeline__chevron:focus-visible {
  outline: 2px solid var(--evf-primary);
  outline-offset: 2px;
}


/* ==========================================================================
   21. Timeline Info
   ========================================================================== */

.evf-timeline__info {
  width: 100%;
  text-align: center;
  font-family: var(--evf-font-body);
  font-size: 0.8125rem;
  color: var(--evf-outline);
  margin-top: 0.25rem;
}


/* ==========================================================================
   22. Leaflet Popup Override
   ========================================================================== */

.leaflet-popup-content-wrapper {
  border-radius: var(--evf-radius-lg) !important;
  box-shadow: var(--evf-shadow) !important;
  font-family: var(--evf-font-body) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  color: var(--evf-on-surface) !important;
}

.leaflet-popup-content strong {
  font-family: var(--evf-font-headline) !important;
  font-weight: 700 !important;
}

.leaflet-popup-tip {
  box-shadow: var(--evf-shadow-sm) !important;
}

.leaflet-popup-close-button {
  color: var(--evf-outline) !important;
  font-size: 1.25rem !important;
  padding: 0.375rem 0.5rem 0 0 !important;
}

.leaflet-popup-close-button:hover {
  color: var(--evf-on-surface) !important;
}

.evf-gemeente-tooltip {
  background: white;
  border: 1px solid #C3C5D7;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: 'Manrope', sans-serif;
  color: #111C2D;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* ==========================================================================
   23. Pulse Animation (active markers)
   ========================================================================== */

/* Timeline fill animation on load */
@keyframes evf-timeline-fill {
  from {
    --evf-slider-fill: 0%;
  }
  to {
    --evf-slider-fill: 100%;
  }
}

@keyframes evf-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.6);
    opacity: 0.4;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Pulse animation on active Leaflet circleMarker SVG paths */
path.evf-marker--pulse {
  animation: evf-pulse 2s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}


/* ==========================================================================
   24. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .js-evf-loaded .evf-list__item-detail {
    transition: none;
  }

  .evf-timeline__slider::-webkit-slider-thumb {
    transition: none;
  }

  .evf-timeline__slider::-moz-range-thumb {
    transition: none;
  }

  .evf-timeline__chevron {
    transition: none;
  }

  .evf-active-toggle {
    transition: none;
  }

  .evf-list__item {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   25. Responsive — Tablet (<992px)
   ========================================================================== */

@media (max-width: 991.98px) {
  .evf-werkgebied {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .evf-werkgebied__heading {
    font-size: 2rem;
  }

  .evf-werkgebied__header {
    margin-bottom: 1.25rem;
  }

  /* Stack map + timeline + list vertically */
  .evf-map-layout {
    flex-direction: column;
  }

  .evf-map-layout__map {
    flex: 0 0 auto;
    max-width: 100%;
    order: 1;
  }

  .evf-timeline {
    order: 2;
  }

  .evf-map-layout__list {
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 400px;
    order: 3;
  }

  .evf-map {
    min-height: 250px;
    height: 300px;
  }

  /* Stats: keep horizontal but tighter */
  .evf-stats {
    gap: 1rem;
    padding: 1.5rem 1.25rem;
  }

  .evf-stats__number {
    font-size: 2.25rem;
  }
}


/* ==========================================================================
   25b. Responsive — Mobile (<576px)
   ========================================================================== */

@media (max-width: 575.98px) {
  .evf-werkgebied {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .evf-werkgebied__heading {
    font-size: 1.75rem;
  }

  .evf-werkgebied__intro {
    font-size: 1rem;
  }

  /* Stats: 2x2 grid on narrow screens */
  .evf-stats {
    flex-wrap: wrap;
    gap: 1rem 0.5rem;
    padding: 1.25rem 1rem;
  }

  .evf-stats__item {
    flex: 0 0 calc(50% - 0.5rem);
  }

  .evf-stats__divider {
    display: none;
  }

  .evf-stats__number {
    font-size: 2rem;
  }

  .evf-stats__label {
    font-size: 0.6875rem;
  }

  /* Map compact — taller on mobile so Netherlands isn't tiny */
  .evf-map {
    min-height: 280px;
    height: 320px;
    border-radius: var(--evf-radius-lg);
  }

  .evf-map-layout__list {
    border-radius: var(--evf-radius-lg);
    max-height: 350px;
  }

  /* Legend — compact single row, above attribution */
  .evf-map__legend {
    bottom: 1.75rem;
    left: 0.5rem;
    gap: 0.25rem;
  }

  .evf-map__legend-item {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    gap: 0.25rem;
  }

  .evf-map__legend-dot {
    width: 7px;
    height: 7px;
  }

  /* List items tighter */
  .evf-list__item {
    padding: 0.625rem 1rem;
  }

  .evf-list__item-title {
    font-size: 0.875rem;
  }

  .evf-list__item-city {
    font-size: 0.75rem;
  }

  .evf-list__item-period {
    font-size: 0.6875rem;
  }

  .evf-active-toggle {
    width: 100%;
    margin-left: 0;
  }

  /* Timeline compact — prevent wrapping */
  .evf-timeline {
    padding: 0.75rem;
    gap: 0.375rem;
    flex-wrap: nowrap;
  }

  .evf-timeline__year-label {
    font-size: 0.6875rem;
    min-width: 2rem;
    text-align: center;
  }

  .evf-timeline__chevron {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.875rem;
    flex-shrink: 0;
  }

  .evf-timeline__slider {
    min-width: 80px;
  }
}


/* ==========================================================================
   Scrollbar Styling (list panel)
   ========================================================================== */

.evf-map-layout__list::-webkit-scrollbar,
.evf-list::-webkit-scrollbar {
  width: 6px;
}

.evf-map-layout__list::-webkit-scrollbar-track,
.evf-list::-webkit-scrollbar-track {
  background: transparent;
}

.evf-map-layout__list::-webkit-scrollbar-thumb,
.evf-list::-webkit-scrollbar-thumb {
  background-color: var(--evf-outline-variant);
  border-radius: var(--evf-radius-pill);
}

.evf-map-layout__list::-webkit-scrollbar-thumb:hover,
.evf-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--evf-outline);
}

/* Firefox scrollbar */
.evf-map-layout__list,
.evf-list {
  scrollbar-width: thin;
  scrollbar-color: var(--evf-outline-variant) transparent;
}

/* ==========================================================================
   26. Brand Grid + Logos
   ========================================================================== */

.evf-brand-grid {
  display: grid;
  gap: 1.5rem 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto 2.5rem;
}

.evf-brand-cloud__intro {
  margin: 0 auto 1.2rem;
  max-width: 38rem;
  text-align: center;
}

.evf-brand-cloud__label {
  display: inline-block;
  margin-bottom: 0.35rem;
}

.evf-brand-item {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a.evf-brand-item {
  cursor: pointer;
}

.evf-brand-item:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

.evf-brand-item:focus-visible {
  border-radius: 0.75rem;
  outline: 2px solid var(--evf-primary);
  outline-offset: 4px;
}

.evf-brand-item__logo {
  display: block;
  height: 64px;
  object-fit: contain;
  width: 64px;
}

.evf-brand-item__name {
  color: var(--evf-on-surface);
  font-family: var(--evf-font-headline);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.evf-brand-item__city {
  color: var(--evf-on-surface-variant);
  font-family: var(--evf-font-body);
  font-size: 0.75rem;
  line-height: 1.3;
}

.evf-list__item-logo {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.4rem;
  justify-content: center;
  min-width: 2.8rem;
  overflow: hidden;
}

.evf-list__item-logo img {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
  width: auto;
}

.evf-list__item:hover .evf-list__item-logo img,
.evf-list__item--selected .evf-list__item-logo img {
  opacity: 0.8;
}

/* ==========================================================================
   27. Preview Layout
   ========================================================================== */

.evf-werkgebied--preview {
  background: var(--evf-surface);
}

.evf-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 1.5rem;
  align-items: stretch;
}

.evf-preview__copy {
  position: relative;
}

.evf-preview__map-shell {
  background: var(--evf-white);
  border-radius: var(--evf-radius-xl);
  overflow: hidden;
  position: relative;
}

.evf-preview__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.55rem;
}

.evf-preview__label {
  margin: 0;
}

.evf-preview__heading {
  color: var(--evf-on-surface);
  font-family: var(--evf-font-headline);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  max-width: 15ch;
}

.evf-preview__text {
  color: var(--evf-on-surface-variant);
  font-family: var(--evf-font-body);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  max-width: 58ch;
}

.evf-preview__brand-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.evf-preview__brand-item {
  display: inline-flex;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a.evf-preview__brand-item {
  cursor: pointer;
}

.evf-preview__brand-item:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

.evf-preview__brand-item:focus-visible {
  border-radius: 0.5rem;
  outline: 2px solid var(--evf-primary);
  outline-offset: 2px;
}

.evf-preview__brand-logo {
  display: block;
  height: 48px;
  object-fit: contain;
  width: auto;
  max-width: 100px;
}

.evf-preview__stats {
  display: flex;
  gap: 2rem;
}

.evf-preview__stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.evf-preview__stat-number {
  color: var(--evf-primary);
  font-family: var(--evf-font-headline);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.evf-preview__stat-label {
  color: var(--evf-on-surface-variant);
  font-family: var(--evf-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}


.evf-preview__button {
  align-items: center;
  align-self: flex-start;
  display: inline-flex;
  gap: 0.45rem;
  margin-top: auto;
}

.evf-preview__button:hover,
.evf-preview__button:focus-visible {
  color: var(--evf-white);
}

.evf-preview__map-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.evf-preview__map-intro {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
}

.evf-preview__map-label {
  color: var(--evf-primary);
  font-family: var(--evf-font-headline);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evf-map--preview {
  flex: 1 1 auto;
  height: 100%;
  min-height: 420px;
}

.evf-preview__map-caption {
  color: var(--evf-on-surface-variant);
  font-family: var(--evf-font-body);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   28. CV Downloads
   ========================================================================== */

.evf-cv-downloads {
  align-items: center;
  background: #F0F3FF;
  border-radius: 1rem;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1.5rem 2rem;
}

.evf-cv-downloads__copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.evf-cv-downloads__heading {
  color: var(--evf-on-surface);
  font-family: var(--evf-font-headline);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.evf-cv-downloads__text {
  color: var(--evf-on-surface-variant);
  font-family: var(--evf-font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  max-width: 42ch;
}

.evf-cv-downloads__actions {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 0.5rem;
}

.evf-cv-downloads__btn {
  align-items: center;
  border-radius: 100px;
  display: inline-flex;
  font-family: var(--evf-font-headline);
  font-size: 0.88rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.6rem 1.4rem;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.evf-cv-downloads__btn .material-symbols-outlined {
  font-size: 1.1rem;
}

.evf-cv-downloads__btn--primary {
  background: var(--evf-primary);
  color: var(--evf-white);
}

.evf-cv-downloads__btn--primary:hover {
  background: color-mix(in srgb, var(--evf-primary) 85%, black);
  box-shadow: 0 4px 12px -4px rgba(0, 66, 168, 0.35);
  color: var(--evf-white);
}

.evf-cv-downloads__btn--outline {
  background: var(--evf-white);
  border: 1.5px solid var(--evf-primary);
  color: var(--evf-primary);
}

.evf-cv-downloads__btn--outline:hover {
  background: rgba(0, 66, 168, 0.06);
  box-shadow: 0 4px 12px -4px rgba(0, 66, 168, 0.2);
  color: var(--evf-primary);
}

.evf-cv-downloads__btn:focus-visible {
  outline: 2px solid var(--evf-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   29. Popup + Marker Improvements
   ========================================================================== */

.evf-popup__header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.evf-popup__logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--evf-outline-variant);
  border-radius: 0.9rem;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 2.8rem;
  min-width: 3rem;
  overflow: hidden;
  padding: 0.35rem 0.45rem;
}

.evf-popup__logo img {
  display: block;
  height: auto;
  max-height: 1.8rem;
  max-width: 100%;
}

.evf-popup__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.evf-popup__title {
  display: block;
}

.evf-popup__badge {
  color: var(--evf-on-surface-variant);
  display: inline-flex;
  font-family: var(--evf-font-headline);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evf-popup__meta,
.evf-popup__period {
  color: var(--evf-on-surface-variant);
  font-size: 0.8rem;
}

.evf-popup__role {
  font-family: var(--evf-font-headline);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-top: 0.45rem;
  text-transform: uppercase;
}

.evf-popup__period {
  margin-top: 0.1rem;
}

.evf-marker-icon {
  background: transparent !important;
  border: 0 !important;
}

.evf-marker {
  align-items: center;
  color: var(--evf-role-color, var(--evf-primary));
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  position: relative;
  transform: scale(0.8);
  transition: transform 0.18s ease;
  width: 40px;
}

.evf-marker.is-ready {
  transform: scale(1);
}

.evf-marker__halo,
.evf-marker__core {
  border-radius: 999px;
  display: block;
  inset: 0;
  position: absolute;
}

.evf-marker__halo {
  background: color-mix(in srgb, currentColor 16%, transparent);
  transform: scale(1);
}

.evf-marker__core {
  background: currentColor;
  border: 4px solid #fff;
  box-shadow: 0 12px 18px -12px rgba(17, 28, 45, 0.65);
  inset: 9px;
}

.evf-marker:hover,
.evf-marker-icon:focus-visible .evf-marker {
  transform: scale(1.08);
}

.evf-marker-icon:focus-visible {
  outline: none;
}

.evf-marker-icon:focus-visible .evf-marker__core {
  box-shadow:
    0 0 0 3px color-mix(in srgb, currentColor 28%, white),
    0 12px 18px -12px rgba(17, 28, 45, 0.65);
}

.evf-marker--active .evf-marker__halo {
  animation: evf-marker-pulse 1.9s ease-out infinite;
}

@keyframes evf-marker-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.65);
  }
  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

.evf-map .leaflet-overlay-pane svg path:focus,
.evf-map .leaflet-overlay-pane svg path:focus-visible,
.evf-map .leaflet-interactive:focus,
.evf-map .leaflet-interactive:focus-visible {
  outline: none !important;
}

.evf-map .leaflet-interactive {
  transition: fill-opacity 0.18s ease, opacity 0.18s ease, stroke-width 0.18s ease;
}

.evf-gemeente-path--has-data {
  cursor: pointer;
}

/* ==========================================================================
   30. Responsive Additions
   ========================================================================== */

@media (max-width: 991.98px) {
  .evf-brand-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evf-preview {
    grid-template-columns: 1fr;
  }

  .evf-map--preview {
    min-height: 320px;
  }

  .evf-cv-downloads {
    flex-direction: column;
    align-items: flex-start;
  }

  .evf-cv-downloads__actions {
    flex-direction: row;
  }
}

@media (max-width: 767.98px) {
  .evf-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evf-preview__stats {
    gap: 1.5rem;
  }

  .evf-preview__brand-grid {
    gap: 0.75rem;
  }

  .evf-preview__brand-logo {
    height: 36px;
  }

  .evf-cv-downloads__actions {
    flex-direction: column;
    width: 100%;
  }

  .evf-cv-downloads__btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .evf-preview__map-shell {
    border-radius: 1.15rem;
  }

  .evf-map--preview {
    min-height: 260px;
  }

  .evf-cv-downloads {
    border-radius: 0.85rem;
    padding: 1.15rem;
  }

  .evf-brand-item__logo {
    height: 48px;
    width: 48px;
  }
}
