/* ==========================================================================
   Interactive Waqf Map — Impact Countries + Investment Locations
   Drop-in block for The Waqf Fund home page.
   Identity: burgundy + warm off-white + sand. No emojis. No grid lines.
   ========================================================================== */

/* Default state: fully visible.
   Subtle transitional rise on reveal — never gates visibility. */
.wf-anim-rise {
  opacity: 1;
  transform: translateY(0);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.wf-map-section:not(.is-revealed) .wf-anim-rise {
  transform: translateY(10px);
}

@media (prefers-reduced-motion: reduce) {
  .wf-anim-rise,
  .wf-map-section:not(.is-revealed) .wf-anim-rise {
    transform: none;
    transition: none;
  }
}

.wf-map-section {
  /* Brand tokens — locally scoped so the block is portable. */
  --wf-burgundy: #8e013c;
  --wf-burgundy-deep: #6d002e;
  --wf-burgundy-darker: #4d0020;
  --wf-burgundy-glow: rgba(142, 1, 60, 0.18);
  --wf-burgundy-tint: #f6e6ee;
  --wf-burgundy-tint-2: #fbf1f5;
  --wf-warm-white: #faf7f2;
  --wf-cream: #f3eee7;
  --wf-map-grey: #e7e1dd;
  --wf-map-grey-2: #d8d1cb;
  --wf-border: #e3ddd6;
  --wf-ink: #1a0d12;
  --wf-ink-muted: #5a4f50;
  --wf-sand: #f7e0c1;
  --wf-success: #2f7d5a;

  --wf-radius-card: 28px;
  --wf-radius-pill: 999px;
  --wf-radius-tooltip: 18px;

  --wf-shadow-card: 0 1px 0 rgba(26, 13, 18, 0.04),
                    0 12px 32px -16px rgba(26, 13, 18, 0.16);
  --wf-shadow-pop: 0 24px 60px -28px rgba(142, 1, 60, 0.45),
                   0 8px 18px -10px rgba(26, 13, 18, 0.18);
  --wf-shadow-tooltip: 0 18px 38px -18px rgba(26, 13, 18, 0.28),
                       0 2px 6px rgba(26, 13, 18, 0.06);

  --wf-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --wf-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  position: relative;
  isolation: isolate;
  margin: 80px 0;
  padding: 88px 24px 96px;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--wf-burgundy-tint-2) 0%, transparent 60%),
    linear-gradient(180deg, var(--wf-warm-white) 0%, var(--wf-cream) 100%);
  color: var(--wf-ink);
  overflow: hidden;
}

.wf-map-aurora {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 60%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 15% 20%, rgba(142, 1, 60, 0.08), transparent 70%),
    radial-gradient(40% 60% at 85% 30%, rgba(247, 224, 193, 0.5), transparent 70%);
  filter: blur(20px);
  opacity: 0.9;
}

.wf-map-section * {
  box-sizing: border-box;
}

.wf-map-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---- Header ---- */
.wf-map-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.wf-map-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  margin-bottom: 18px;
  font-family: var(--font-en-body, "BrownLLWeb"), system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wf-burgundy);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--wf-burgundy-tint);
  border-radius: var(--wf-radius-pill);
  backdrop-filter: blur(6px);
}

.wf-map-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wf-burgundy);
  box-shadow: 0 0 0 4px rgba(142, 1, 60, 0.18);
  animation: wfPulseDot 2.4s ease-in-out infinite;
}

.wf-map-title {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--wf-ink);
}

.wf-map-title em {
  font-style: italic;
  color: var(--wf-burgundy);
  position: relative;
  display: inline-block;
}

.wf-map-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 6px;
  background: linear-gradient(90deg, transparent 0%, var(--wf-sand) 30%, var(--wf-sand) 70%, transparent 100%);
  border-radius: 4px;
  opacity: 0.85;
  transform-origin: left;
  animation: wfSweep 1.4s var(--wf-ease) 0.4s both;
}

.wf-map-subtitle {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.55;
  color: var(--wf-ink-muted);
  margin: 0;
}

/* ---- Stats row (BELOW the map) ---- */
.wf-map-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin: 32px auto 0;
  padding: 24px 36px;
  max-width: 880px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-card);
  box-shadow: var(--wf-shadow-card);
  backdrop-filter: blur(8px);
}

.wf-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  text-align: center;
  padding: 4px;
  position: relative;
}

.wf-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: var(--wf-burgundy);
  border-radius: 2px;
  opacity: 0.85;
}

.wf-stat-value {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  color: var(--wf-burgundy);
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 14px;
}

.wf-stat-label {
  font-size: 12px;
  color: var(--wf-ink-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

.wf-stat-divider {
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--wf-border), transparent);
  flex: 0 0 1px;
}

/* ---- Toggle ---- */
.wf-map-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 28px;
  max-width: 1280px;
}

.wf-map-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding: 6px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-pill);
  box-shadow: var(--wf-shadow-card);
  backdrop-filter: blur(8px);
  min-width: 380px;
}

.wf-toggle-thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 6px);
  border-radius: var(--wf-radius-pill);
  background: linear-gradient(135deg, var(--wf-burgundy) 0%, var(--wf-burgundy-deep) 100%);
  box-shadow: 0 6px 18px -6px var(--wf-burgundy-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 360ms var(--wf-ease-out);
  z-index: 0;
  pointer-events: none;
}

.wf-map-toggle[data-mode="invest"] .wf-toggle-thumb {
  transform: translateX(100%);
}

.wf-toggle-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-en-body, "BrownLLWeb"), system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--wf-ink-muted);
  background: transparent;
  border: 0;
  border-radius: var(--wf-radius-pill);
  cursor: pointer;
  transition: color 280ms var(--wf-ease);
  white-space: nowrap;
  width: 100%;
}

.wf-toggle-btn:focus-visible {
  outline: 2px solid var(--wf-burgundy);
  outline-offset: 3px;
}

.wf-toggle-btn.is-active {
  color: #fff;
}

.wf-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transition: transform 240ms var(--wf-ease);
}

.wf-toggle-dot--ring {
  background: transparent;
  border: 1.6px solid currentColor;
}

.wf-toggle-btn.is-active .wf-toggle-dot {
  transform: scale(1.2);
}

.wf-map-help {
  font-size: 13px;
  color: var(--wf-ink-muted);
  margin: 0;
}

.wf-map-help-kbd {
  display: inline-block;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-burgundy);
  background: var(--wf-burgundy-tint);
  border-radius: 6px;
  border: 1px solid rgba(142, 1, 60, 0.15);
}

/* ---- Map grid (map + side panel) ---- */
.wf-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: stretch;
}

.wf-map-stage {
  position: relative;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(247, 224, 193, 0.25), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fcfaf7 100%);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-card);
  box-shadow: var(--wf-shadow-card);
  padding: 22px 22px 18px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.wf-map-stage::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(closest-side, var(--wf-burgundy-tint), transparent 70%);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.wf-map-canvas {
  position: relative;
  flex: 1;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 440px;
}

.wf-map-canvas > .wf-vmap {
  flex: 1;
}

.wf-map-canvas svg {
  user-select: none;
}

.wf-map-loader {
  display: flex;
  gap: 8px;
}

.wf-map-loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wf-burgundy);
  opacity: 0.4;
  animation: wfLoaderBounce 1.2s ease-in-out infinite;
}

.wf-map-loader-dot:nth-child(2) { animation-delay: 0.15s; }
.wf-map-loader-dot:nth-child(3) { animation-delay: 0.3s; }

/* ---- jsVectorMap host ---- */
.wf-vmap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.wf-map-stage .jvm-container {
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 420px;
}

.wf-map-stage .jvm-container svg {
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* default jsVectorMap region styling override (cleaner) */
.wf-map-stage .jvm-region {
  /* No fill transition — preview browsers throttle SVG paint transitions
     and the path can freeze on the previous value. Filter-only transition. */
  transition: filter 220ms var(--wf-ease), opacity 240ms var(--wf-ease);
}

/* Kill the browser's default focus outline (blue) on map regions and pins.
   Keep an accessible burgundy ring for true keyboard navigation only. */
.wf-vmap-region:focus,
.wf-vmap-marker:focus,
.jvm-region:focus,
.jvm-marker:focus {
  outline: none;
}
.wf-vmap-region:focus-visible,
.wf-vmap-marker:focus-visible,
.jvm-region:focus-visible,
.jvm-marker:focus-visible {
  outline: 2px dashed var(--wf-burgundy-deep);
  outline-offset: 3px;
}

/* impact countries — fill takes priority over the SVG presentation attribute
   because CSS rules beat unattributed presentation attrs. */
.wf-vmap-region.wf-vmap-impact {
  fill: var(--wf-burgundy);
  cursor: pointer;
}

.wf-vmap-region.wf-vmap-impact.is-hover {
  fill: var(--wf-burgundy-deep);
  filter: drop-shadow(0 4px 12px var(--wf-burgundy-glow));
}

.wf-vmap-region.is-selected {
  fill: var(--wf-burgundy-darker);
  filter: drop-shadow(0 6px 18px rgba(142, 1, 60, 0.55));
}

/* In invest mode: dim impact countries (waqf works there but not the focus
   here), and light up the UK burgundy as the active investment country. */
.wf-map-canvas.is-invest-mode .wf-vmap-region.wf-vmap-impact {
  fill: #d4ccc4;
  opacity: 0.7;
  cursor: default;
}
.wf-map-canvas.is-invest-mode .wf-vmap-region.wf-vmap-impact.is-hover {
  fill: #d4ccc4;
  filter: none;
}

/* The UK is highlighted only in invest mode (no waqf impact projects there). */
.wf-vmap-region.wf-vmap-invest {
  /* default state: stays grey in impact mode */
  cursor: default;
}
.wf-map-canvas.is-invest-mode .wf-vmap-region.wf-vmap-invest {
  fill: var(--wf-burgundy);
  cursor: pointer;
}
.wf-map-canvas.is-invest-mode .wf-vmap-region.wf-vmap-invest.is-hover {
  fill: var(--wf-burgundy-deep);
  filter: drop-shadow(0 4px 12px var(--wf-burgundy-glow));
}
.wf-map-canvas.is-invest-mode .wf-vmap-region.wf-vmap-invest.is-selected {
  fill: var(--wf-burgundy-darker);
  filter: drop-shadow(0 6px 18px rgba(142, 1, 60, 0.55));
}

/* hide jsVectorMap default tooltip — globally, since it's appended to <body> */
.jvm-tooltip {
  display: none !important;
}

/* zoom controls — restyled for the burgundy theme. Live only when mobile auto-focus is in effect. */
.wf-map-stage .jvm-zoom-btn {
  background-color: rgba(255, 255, 255, 0.96);
  color: #8e013c;
  border: 1px solid rgba(142, 1, 60, 0.15);
  box-shadow: 0 4px 12px -6px rgba(26, 13, 18, 0.18);
  border-radius: 8px;
  height: 28px;
  width: 28px;
  line-height: 20px;
  font-size: 16px;
  font-weight: 700;
  left: 14px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.wf-map-stage .jvm-zoom-btn:hover {
  background-color: #8e013c;
  color: #fff;
}
.wf-map-stage .jvm-zoom-btn.jvm-zoomin { top: 14px; }
.wf-map-stage .jvm-zoom-btn.jvm-zoomout { top: 50px; }


/* ---- Leaflet host containers ---- */
.wf-leaflet {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  background: #f4f0eb;
  overflow: hidden;
}
.wf-leaflet[hidden] { display: none; }
.wf-leaflet .leaflet-control-attribution {
  font-size: 9px;
  background: rgba(255, 255, 255, 0.7);
  padding: 1px 6px;
  border-radius: 4px 0 0 0;
}
.wf-leaflet .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 6px 18px -10px rgba(26, 13, 18, 0.25) !important;
  border-radius: 10px !important;
  overflow: hidden;
}
.wf-leaflet .leaflet-control-zoom a {
  background: #ffffff;
  color: #8e013c;
  border: none !important;
  font-weight: 700;
  font-family: inherit;
  font-size: 17px;
  line-height: 30px;
  width: 32px;
  height: 32px;
}
.wf-leaflet .leaflet-control-zoom a:hover {
  background: #8e013c;
  color: #fff;
}
.wf-leaflet .leaflet-control-zoom a + a {
  border-top: 1px solid rgba(142, 1, 60, 0.1) !important;
}
.wf-leaflet .leaflet-container { background: transparent; font-family: inherit; }

/* Country shapes for impact mode */
.wf-impact-country {
  cursor: pointer;
  outline: none !important;
}
.wf-impact-country:focus,
.wf-impact-country:focus-visible,
.wf-impact-country:active,
.leaflet-interactive:focus,
.leaflet-interactive:focus-visible {
  outline: none !important;
}
.leaflet-container .leaflet-interactive { outline: none !important; }

/* Custom property marker (UK) */
.wf-prop-marker {
  position: relative;
  width: 40px;
  height: 52px;
  cursor: pointer;
  filter: drop-shadow(0 4px 8px rgba(26, 13, 18, 0.28));
}
.wf-prop-marker svg { width: 100%; height: 100%; display: block; }
.wf-prop-marker:hover { transform: translateY(-2px); }
.wf-prop-marker.is-selected svg .pin-body { fill: #6a002c; stroke: #c9a84c; }


.wf-prop-popup .leaflet-popup-content-wrapper {
  background: #1a0d12;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 38px -18px rgba(26, 13, 18, 0.4);
  padding: 0;
}
.wf-prop-popup .leaflet-popup-content { margin: 14px 16px; font-family: inherit; }
.wf-prop-popup .leaflet-popup-tip { background: #1a0d12; }
.wf-prop-popup-name { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.wf-prop-popup-meta { font-size: 12px; opacity: 0.7; margin: 0; }

/* ---- UK map (Investment mode) ---- */
.wf-uk-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  z-index: 2;
}
.wf-uk-stage[hidden] { display: none; }
.wf-uk-svg {
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 100%;
}
.wf-uk-roi {
  fill: #efeae5;
  stroke: #ffffff;
  stroke-width: 0.18;
  opacity: 0.6;
  vector-effect: non-scaling-stroke;
}
.wf-uk-region {
  fill: #e7e1dd;
  stroke: #ffffff;
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
  transition: fill 160ms var(--wf-ease, ease);
  cursor: default;
}
.wf-uk-region.wf-uk-active {
  fill: #8e013c;
}

.wf-uk-callout-label {
  font-family: inherit;
  font-size: 1.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  fill: #8e013c;
  text-anchor: start;
  pointer-events: none;
}
.wf-uk-callout-sub {
  font-family: inherit;
  font-size: 1.2px;
  font-weight: 500;
  letter-spacing: 0.02em;
  fill: rgba(26, 13, 18, 0.55);
  text-anchor: start;
  pointer-events: none;
}

.wf-uk-pin { cursor: pointer; outline: none; }
.wf-uk-pin:focus-visible .wf-uk-pin-outer,
.wf-uk-pin:hover .wf-uk-pin-outer {
  stroke-width: 0.45;
}
.wf-uk-pin-pulse {
  fill: rgba(201, 168, 76, 0.45);
  transform-origin: center;
  transform-box: fill-box;
  animation: wfUkPinPulse 2.2s ease-out infinite;
}
.wf-uk-pin-outer {
  fill: #ffffff;
  stroke: #c9a84c;
  stroke-width: 0.3;
  transition: stroke-width 140ms ease;
}
.wf-uk-pin-inner {
  fill: #8e013c;
  pointer-events: none;
}
@keyframes wfUkPinPulse {
  0%   { transform: scale(0.4); opacity: 0.85; }
  100% { transform: scale(1.4); opacity: 0; }
}

.wf-uk-tip {
  position: absolute;
  display: none;
  padding: 8px 12px;
  background: #1a0d12;
  color: #ffffff;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px -10px rgba(26, 13, 18, 0.55);
  pointer-events: none;
  z-index: 6;
  transform: translate(-50%, -100%);
  white-space: nowrap;
}
.wf-uk-tip.is-visible { display: block; }
.wf-uk-tip-name { font-weight: 600; }
.wf-uk-tip-meta { opacity: 0.7; font-size: 11px; margin-top: 2px; }

@media (hover: none) {
  .wf-uk-tip { display: none !important; }
}

/* legend */
.wf-map-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 4px 0;
  font-size: 12px;
  color: var(--wf-ink-muted);
  border-top: 1px dashed var(--wf-border);
  margin-top: 8px;
  z-index: 1;
}

.wf-legend-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-legend-row[hidden] { display: none; }

.wf-legend-row > span:not(.wf-legend-swatch):not(.wf-legend-pin):not(.wf-legend-pulse) {
  margin-right: 8px;
}

.wf-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.wf-legend-swatch--active { background: var(--wf-burgundy); }
.wf-legend-swatch--inactive { background: var(--wf-map-grey); }

.wf-legend-pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wf-burgundy);
  box-shadow: 0 0 0 4px rgba(142, 1, 60, 0.18);
  display: inline-block;
}

.wf-legend-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wf-burgundy);
  display: inline-block;
  position: relative;
  animation: wfPulseDot 1.6s ease-in-out infinite;
}

/* watermark */
.wf-map-watermark {
  position: absolute;
  bottom: 18px;
  right: 22px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wf-ink-muted);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  font-weight: 600;
}

/* ---- Tooltip ---- */
.wf-map-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 240px;
  padding: 14px 14px 12px;
  background: #ffffff;
  border: 1px solid var(--wf-border);
  border-top: 3px solid var(--wf-burgundy);
  border-radius: var(--wf-radius-tooltip);
  box-shadow: var(--wf-shadow-tooltip);
  pointer-events: none;
  opacity: 0;
  transform: translate(-9999px, -9999px) scale(0.96);
  transition: opacity 200ms var(--wf-ease), transform 200ms var(--wf-ease);
}

.wf-map-tooltip.is-visible {
  opacity: 1;
  transform: translate(var(--wf-tt-x, 0), var(--wf-tt-y, 0)) scale(1);
}

.wf-tooltip-arrow {
  position: absolute;
  top: -6px;
  left: 22px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-top: 1px solid var(--wf-border);
  border-left: 1px solid var(--wf-border);
  transform: rotate(45deg);
}

.wf-tooltip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--wf-border);
}

.wf-tooltip-flag {
  width: 30px;
  height: 22px;
  border-radius: 4px;
  background: var(--wf-burgundy-tint);
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  text-align: center;
  line-height: 22px;
  border: 1px solid rgba(142, 1, 60, 0.12);
}

.wf-tooltip-title {
  margin: 0;
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--wf-ink);
  line-height: 1.1;
}

.wf-tooltip-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--wf-ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.wf-tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.wf-tooltip-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.wf-tooltip-cell-label {
  font-size: 10px;
  color: var(--wf-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.wf-tooltip-cell-value {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--wf-burgundy);
  line-height: 1.1;
}

.wf-tooltip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.wf-tooltip-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--wf-burgundy-tint);
  color: var(--wf-burgundy);
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--wf-radius-pill);
  letter-spacing: 0.01em;
}

.wf-tooltip-cta {
  margin: 0;
  font-size: 11px;
  color: var(--wf-ink-muted);
  text-align: right;
  font-style: italic;
}

/* ---- Side panel ---- */
.wf-map-panel {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-card);
  box-shadow: var(--wf-shadow-card);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  overflow: hidden;
}

.wf-map-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: radial-gradient(80% 100% at 50% 0%, var(--wf-burgundy-tint), transparent 70%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.wf-panel-default,
.wf-panel-detail {
  position: relative;
  z-index: 1;
}

.wf-panel-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  background: var(--wf-burgundy-tint);
  color: var(--wf-burgundy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--wf-radius-pill);
  margin-bottom: 16px;
  border: 1px solid rgba(142, 1, 60, 0.1);
}

.wf-panel-pill-dot {
  width: 8px;
  height: 8px;
  background: var(--wf-burgundy);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(142, 1, 60, 0.15);
}

.wf-panel-pill--accent {
  background: var(--wf-ink);
  color: var(--wf-sand);
  border-color: rgba(247, 224, 193, 0.18);
}

.wf-panel-title,
.wf-panel-detail-titles h3 {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--wf-ink);
  letter-spacing: -0.01em;
}

.wf-panel-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--wf-ink-muted);
  margin: 0 0 18px;
}

.wf-panel-checklist {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-panel-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--wf-ink);
  font-weight: 500;
}

.wf-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--wf-burgundy);
  color: #fff;
  font-size: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}

.wf-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wf-burgundy);
  cursor: pointer;
  border-bottom: 1px solid var(--wf-burgundy-tint);
  align-self: flex-start;
  margin-top: auto;
  transition: color 200ms var(--wf-ease), border-color 200ms var(--wf-ease), gap 200ms var(--wf-ease);
}

.wf-panel-link:hover {
  color: var(--wf-burgundy-deep);
  border-color: var(--wf-burgundy);
  gap: 12px;
}

/* ---- Detail panel ---- */
.wf-panel-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.wf-panel-flag {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--wf-burgundy-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  border: 1px solid rgba(142, 1, 60, 0.12);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04);
}

.wf-panel-detail-titles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wf-panel-detail-titles h3 {
  font-size: 24px;
  margin: 0;
}

.wf-panel-detail-titles .wf-panel-pill {
  margin: 0;
  align-self: flex-start;
}

.wf-panel-close {
  align-self: flex-start;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wf-border);
  background: #ffffff;
  font-size: 16px;
  line-height: 1;
  color: var(--wf-ink-muted);
  cursor: pointer;
  transition: all 200ms var(--wf-ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wf-panel-close:hover {
  background: var(--wf-burgundy-tint);
  color: var(--wf-burgundy);
  border-color: var(--wf-burgundy);
}

.wf-panel-detail-sub {
  margin: 8px 0 18px;
  font-size: 13px;
  color: var(--wf-ink-muted);
  line-height: 1.5;
}

.wf-panel-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.wf-panel-stat {
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, var(--wf-warm-white) 0%, #fff 100%);
  border: 1px solid var(--wf-border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.wf-panel-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 100% at 0% 0%, var(--wf-burgundy-tint), transparent 60%);
  opacity: 0.6;
  z-index: 0;
}

.wf-panel-stat > * { position: relative; z-index: 1; }

.wf-panel-stat-label {
  font-size: 10px;
  color: var(--wf-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 4px;
}

.wf-panel-stat-value {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--wf-burgundy);
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.wf-panel-stat--full {
  grid-column: span 2;
}

.wf-panel-section {
  margin-bottom: 18px;
}

.wf-panel-section-label {
  font-size: 11px;
  color: var(--wf-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin: 0 0 8px;
}

.wf-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wf-panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid var(--wf-burgundy-tint);
  color: var(--wf-burgundy);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--wf-radius-pill);
  transition: all 200ms var(--wf-ease);
  text-decoration: none;
}
a.wf-panel-tag { cursor: pointer; }

.wf-panel-tag:hover {
  background: var(--wf-burgundy-tint);
  border-color: var(--wf-burgundy);
  transform: translateY(-1px);
}

.wf-panel-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--wf-burgundy);
  border-radius: 50%;
}

/* Portfolio cards (shown when the UK cluster pin is clicked) */
.wf-portfolio-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 200ms var(--wf-ease);
  font-family: inherit;
  text-align: left;
  margin-bottom: 8px;
}

.wf-portfolio-card:last-child { margin-bottom: 0; }

.wf-portfolio-card:hover,
.wf-portfolio-card:focus-visible {
  background: var(--wf-burgundy-tint);
  border-color: var(--wf-burgundy);
  transform: translateY(-1px);
  outline: none;
}

.wf-portfolio-card-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--wf-warm-white);
}
.wf-portfolio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wf-portfolio-card-thumb--empty {
  background: linear-gradient(135deg, rgba(142, 1, 60, 0.08), rgba(201, 168, 76, 0.08));
}

.wf-portfolio-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

/* Building image inside the detail panel + bottom sheet (Investment mode) */
.wf-panel-property {
  margin: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wf-warm-white);
  border: 1px solid var(--wf-border);
}
.wf-panel-property-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wf-portfolio-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.wf-portfolio-card-name {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--wf-ink);
  letter-spacing: -0.01em;
}

.wf-portfolio-card-yield {
  font-family: var(--font-en-heading, "BeatriceStandard"), serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--wf-burgundy);
  letter-spacing: -0.01em;
}

.wf-portfolio-card-meta {
  font-size: 11px;
  color: var(--wf-ink-muted);
  letter-spacing: 0.01em;
}

.wf-panel-detail-blurb {
  font-size: 13px;
  line-height: 1.55;
  color: var(--wf-ink-muted);
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--wf-warm-white);
  border-left: 3px solid var(--wf-burgundy);
  border-radius: 0 12px 12px 0;
}
.wf-panel-detail-blurb:empty {
  display: none;
}

.wf-panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px;
  background: var(--wf-ink);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--wf-radius-pill);
  margin-top: auto;
  transition: all 240ms var(--wf-ease);
  align-self: stretch;
  position: relative;
  overflow: hidden;
}

.wf-panel-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--wf-burgundy) 0%, var(--wf-burgundy-deep) 100%);
  z-index: 0;
  transform: translateX(-100%);
  transition: transform 360ms var(--wf-ease);
}

.wf-panel-cta:hover::before {
  transform: translateX(0);
}

.wf-panel-cta > * {
  position: relative;
  z-index: 1;
}

.wf-panel-cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transition: transform 240ms var(--wf-ease);
}

.wf-panel-cta-arrow svg {
  width: 14px;
  height: 11px;
}

.wf-panel-cta:hover .wf-panel-cta-arrow {
  transform: translateX(4px);
}

/* Panel transitions */
.wf-panel-default[hidden],
.wf-panel-detail[hidden] {
  display: none !important;
}

.wf-panel-detail {
  animation: wfSlideIn 360ms var(--wf-ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wf-panel-default {
  animation: wfFadeUp 360ms var(--wf-ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ---- Country / investment list ---- */
.wf-map-list-wrap {
  margin-top: 28px;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-card);
  backdrop-filter: blur(6px);
}

.wf-map-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wf-map-list-eyebrow {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--wf-ink-muted);
  font-weight: 600;
}

.wf-map-list-count {
  font-size: 12px;
  color: var(--wf-burgundy);
  font-weight: 600;
  padding: 3px 10px;
  background: var(--wf-burgundy-tint);
  border-radius: var(--wf-radius-pill);
}

.wf-map-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.wf-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 200ms var(--wf-ease);
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.wf-list-item:hover,
.wf-list-item:focus-visible {
  background: var(--wf-burgundy-tint);
  border-color: var(--wf-burgundy);
  transform: translateY(-1px);
  outline: none;
}

.wf-list-item.is-active {
  background: var(--wf-burgundy);
  border-color: var(--wf-burgundy-deep);
  color: #fff;
}

.wf-list-item.is-active .wf-list-name { color: #fff; }
.wf-list-item.is-active .wf-list-meta { color: rgba(255,255,255,0.75); }
.wf-list-item.is-active .wf-list-flag { background: rgba(255,255,255,0.18); }

.wf-list-flag {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--wf-burgundy-tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.wf-list-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.wf-list-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--wf-ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-list-meta {
  font-size: 11px;
  color: var(--wf-ink-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Footer note ---- */
.wf-map-foot {
  margin-top: 22px;
  text-align: center;
}

.wf-map-foot-note {
  font-size: 12px;
  color: var(--wf-ink-muted);
  margin: 0;
  font-style: italic;
}

/* ---- Mobile bottom sheet ---- */
.wf-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms var(--wf-ease);
}

.wf-sheet.is-open {
  pointer-events: auto;
  opacity: 1;
}

.wf-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 13, 18, 0.45);
  backdrop-filter: blur(4px);
}

.wf-sheet-card {
  position: relative;
  width: 100%;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  /* Generous bottom padding so the existing "Donate for Waqf" floating
     bar at the bottom of the page never covers the last lines of content. */
  padding: 28px 22px calc(96px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px -10px rgba(26, 13, 18, 0.3);
  transform: translateY(100%);
  transition: transform 360ms var(--wf-ease-out);
  overflow-y: auto;
}

.wf-sheet.is-open .wf-sheet-card {
  transform: translateY(0);
}

.wf-sheet-handle {
  display: block;
  width: 44px;
  height: 4px;
  background: var(--wf-border);
  border-radius: 2px;
  margin: 0 auto 18px;
}

.wf-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--wf-border);
  background: #fff;
  font-size: 16px;
  color: var(--wf-ink-muted);
  cursor: pointer;
}

.wf-sheet-body {
  padding-top: 4px;
}

/* ---- Animations ---- */
@keyframes wfPulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(142, 1, 60, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(142, 1, 60, 0); }
}

@keyframes wfSweep {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 0.85; }
}

@keyframes wfLoaderBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 1; }
}

@keyframes wfRing {
  0% { transform: scale(0.4); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes wfFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wfSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes wfCountryEnter {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes wfPinDrop {
  0% { opacity: 0; transform: translateY(-12px) scale(0.6); }
  60% { opacity: 1; transform: translateY(2px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.wf-pin-enter {
  animation: wfPinDrop 420ms var(--wf-ease-out) both;
}

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .wf-map-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 920px) {
  .wf-map-section {
    padding: 64px 16px 72px;
  }
  .wf-map-grid {
    grid-template-columns: 1fr;
  }
  .wf-map-stage {
    min-height: 520px;
    padding: 16px 14px 14px;
  }
  .wf-map-panel {
    min-height: 0;
    padding: 24px 22px;
  }
  .wf-map-stats {
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 16px;
  }
  .wf-stat-card {
    flex: 1 1 30%;
  }
  .wf-stat-divider {
    display: none;
  }
  .wf-map-toggle-row {
    flex-direction: column;
    align-items: stretch;
  }
  .wf-map-toggle {
    align-self: center;
  }
  .wf-map-help {
    text-align: center;
  }
  .wf-map-watermark {
    display: none;
  }
  .wf-map-tooltip {
    display: none !important;
  }
}

@media (max-width: 540px) {
  .wf-map-title {
    font-size: 30px;
  }
  .wf-map-stats {
    flex-direction: column;
    align-items: stretch;
  }
  .wf-stat-card {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 6px 4px;
  }
  .wf-stat-icon { margin-bottom: 0; }
  .wf-stat-label { flex: 1; }
  .wf-stat-value { margin-left: auto; }
  .wf-toggle-btn {
    padding: 9px 14px;
    font-size: 13px;
  }
  .wf-panel-stat-grid {
    grid-template-columns: 1fr;
  }
  .wf-map-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wf-map-eyebrow-dot,
  .wf-pin-ring,
  .wf-legend-pulse,
  .wf-map-loader-dot,
  .wf-map-title em::after {
    animation: none;
  }
  .wf-map-canvas svg * {
    transition: none !important;
  }
}
