/* ══════════════════════════════════════════════════════════════════
   TRAVEL MAP WIDGET STYLES  —  travel_map.css
   ──────────────────────────────────────────────────────────────────
   CONFLICT PREVENTION STRATEGY:
   • All CSS custom properties live inside .tm-page {} — they do NOT
     leak to :root and cannot clash with the site's own variables.
   • Every class name is prefixed with "tm-" so none can match the
     site's su-*, su_*, block-*, field-*, layout-*, paragraph-* etc.
   • Element resets (* { margin:0 }) are NOT repeated here — the
     site's main.css already handles that.
   • html/body overflow:hidden is NOT set here — the site needs
     normal scrolling for its header/footer. The map shell uses an
     explicit height instead.
   • Leaflet popup overrides are scoped to .tm-popup (the custom
     className passed to bindPopup).
   • The lightbox uses z-index:99999, safely above the site header
     (~500) and Leaflet panes (~400-600).
══════════════════════════════════════════════════════════════════ */

/* ── Design tokens — scoped inside .tm-page, never on :root ── */
.tm-page {
  --tm-sand:        #ffffff;
  --tm-sand2:       #ffffff;
  --tm-sand3:       #afafaf;
  --tm-ink:         #1a1612;
  --tm-ink3:        #4a4035;
  --tm-muted:       #9a8e82;
  --tm-amber:       #f0441a;
  --tm-amber2:      #d31c04;
  --tm-amber-pale:  rgba(200,96,26,.08);
  --tm-amber-glow:  rgba(200,96,26,.18);
  --tm-green:       #469604;
  --tm-card:        rgba(247, 246, 246, 0.92);
  --tm-card-border: rgba(223, 223, 223, 0.685);
  --tm-sh-sm:       0 2px 12px rgba(26,22,18,.08);
  --tm-sh-md:       0 8px 32px rgba(26,22,18,.12);
}

/* page wrapper — sits between site header & footer */
.tm-page {
  display: block;
  width: 100%;
}

/* Tighten the site's panel bottom padding so toggle bar sits close to heading */
#academics {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
#academics header {
  padding-bottom: 4px !important;
  margin-bottom: 0 !important;
}

/* Remove default top margin on main so map hugs the toggle bar */
main.page-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ── Whitespace between map and footer ── */
.tm-page-spacer {
  height: 32px;
  width: 100%;
  display: block;
}

/* ── Map shell wrapper — adds breathing room above and below the map ── */
.tm-shell-wrap {
  padding: 0 0 32px;
  background: #f7f6f4;
}

/* ── Map shell — explicit height set by JS after measuring header ── */
.tm-shell {
  position: relative;
  width: 100%;
  height: 90vh;        /* fallback; JS overrides to fill viewport gap */
  min-height: 560px;
  overflow: hidden;
  background: var(--tm-sand);
  color: var(--tm-ink);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(26,22,18,.1);
}

#tm-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* No filter on the map — photos display in their original colors */

.tm-map-fade {
  display: none; /* Removed edge fade overlays — map now shows full bleed */
}

/* ── Floating top-bar ── */
.tm-top-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 28px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}

.tm-brand { pointer-events: none; animation: tm-enterDown .8s cubic-bezier(.16,1,.3,1) .05s both; }
@keyframes tm-enterDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: none; }
}

.tm-brand-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tm-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tm-amber);
  box-shadow: 0 0 0 2px rgba(200,96,26,.25);
  animation: tm-pulse 4s ease-in-out infinite;
  will-change: box-shadow;
}
@keyframes tm-pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(200,96,26,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(200,96,26,0); }
}
.tm-brand-eyebrow > span {
  font-size: 1.7rem; font-weight: 600; letter-spacing: .16em;   /* was 1.63rem → >1.6rem */
  text-transform: uppercase; color: var(--tm-amber);
}

/* Use h2 so it doesn't conflict with the site's h1 in the header */
.tm-brand h2 {
  font-size: 3rem; font-weight: 600; line-height: .88;
  letter-spacing: -.02em; color: var(--tm-ink);
  margin: 0; padding: 0; border: none; /* reset any site h2 styles */
  text-transform: none;
}
.tm-brand h2 em { font-style: italic; color: var(--tm-amber); }
.tm-brand-sub {
  font-size: 3rem; font-weight: 400; color: var(--tm-muted);
  margin-top: 8px; letter-spacing: .02em;
}

/* Stat pills */
.tm-top-stats {
  display: flex; gap: 10px; margin-top: 8px;
  pointer-events: none;
  animation: tm-enterDown .8s cubic-bezier(.16,1,.3,1) .15s both;
}
.tm-stat-pill {
  background: var(--tm-card); border: 1px solid var(--tm-card-border);
  border-radius: 100px; padding: 8px 18px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--tm-sh-sm); backdrop-filter: blur(12px);
}
.tm-stat-pill .tm-num {
  font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--tm-amber); /* was 1.6rem */
}
.tm-stat-pill .tm-lbl {
  font-size: 1.5rem; font-weight: 600; letter-spacing: .1em;    /* was 1.4rem */
  text-transform: uppercase; color: var(--tm-muted);
}

/* ── Side Panel ── */
.tm-panel {
  position: absolute;
  top: 16px;          /* breathing room from top */
  bottom: 16px;       /* breathing room from bottom */
  right: 0;
  width: 330px; z-index: 200;
  display: flex; flex-direction: row; align-items: stretch;
  pointer-events: none; /* panel itself is pass-through; children opt in */
}

/* The tab that sticks out to the left — always visible */
.tm-panel-toggle {
  pointer-events: all;
  position: absolute;
  left: -36px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 52px;
  background: var(--tm-card); border: 1px solid var(--tm-card-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 16px rgba(26,22,18,.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--tm-muted);
  transition: background .18s, color .18s;
  backdrop-filter: blur(12px);
}
.tm-panel-toggle:hover { background: var(--tm-amber-pale); color: var(--tm-amber); }
.tm-panel-toggle i { font-size: 1.4rem; transition: transform .3s cubic-bezier(.16,1,.3,1); }

/* Collapsed state */
.tm-panel.tm-panel--collapsed .tm-panel-inner { opacity: 0; pointer-events: none; }
.tm-panel.tm-panel--collapsed { width: 0; }
.tm-panel.tm-panel--collapsed .tm-panel-toggle { left: -36px; }
.tm-panel.tm-panel--collapsed #tm-panel-chevron { transform: rotate(180deg); }

/* The scrollable inner panel */
.tm-panel-inner {
  pointer-events: all;
  flex: 1; display: flex; flex-direction: column;
  background: rgba(247, 246, 246, 0.97);
  /* backdrop-filter removed — caused continuous GPU compositing on the panel */
  border: 1px solid var(--tm-card-border);
  border-radius: 16px 0 0 16px;
  box-shadow: -8px 0 40px rgba(26,22,18,.1);
  overflow: hidden;
  transition: opacity .25s ease;
  /* entrance animation */
  transform: translateX(100%);
  animation: tm-slidePanel .9s cubic-bezier(.16,1,.3,1) .2s both;
}
.tm-panel-inner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tm-amber), var(--tm-amber2), #f0a060);
  border-radius: 16px 0 0 0;
}
@keyframes tm-slidePanel { to { transform: none; } }

.tm-panel-header {
  padding: 24px 22px 16px; border-bottom: 1px solid var(--tm-sand3); flex-shrink: 0;
}
.tm-panel-label {
  font-size: 1.7rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;  /* was 1.6rem */
  color: var(--tm-amber); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.tm-panel-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--tm-amber-glow), transparent);
}
.tm-panel-title-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.tm-panel-title {
  font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--tm-ink);
  margin: 0; padding: 0;
}
.tm-nations-badge {
  background: var(--tm-amber-pale); border: 1px solid var(--tm-amber-glow);
  border-radius: 100px; padding: 4px 12px; font-size: 1.7rem; font-weight: 600; /* was 1.6rem */
  color: var(--tm-amber);
}

/* Search input inside panel */
.tm-search-row { position: relative; }
.tm-search-row > i {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--tm-muted); font-size: 1.7rem; pointer-events: none; /* was 1.6rem */
}
.tm-search-row input {
  width: 100%; background: var(--tm-sand2); border: 1px solid var(--tm-sand3);
  border-radius: 12px; padding: 10px 14px 10px 36px;
  font-size: 1.8rem; color: var(--tm-ink); outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  /* reset site form styles that might bleed in */
  box-shadow: none; appearance: none; -webkit-appearance: none;
}
.tm-search-row input::placeholder { color: var(--tm-muted); }
.tm-search-row input:focus {
  border-color: var(--tm-amber); background: #fff;
  box-shadow: 0 0 0 3px var(--tm-amber-pale);
}

/* Country list */
.tm-country-list {
  flex: 1; overflow-y: auto; padding: 10px 12px;
  scrollbar-width: thin; scrollbar-color: var(--tm-sand3) transparent;
}
.tm-country-list::-webkit-scrollbar { width: 3px; }
.tm-country-list::-webkit-scrollbar-thumb { background: var(--tm-sand3); border-radius: 3px; }

.tm-country-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 14px; cursor: pointer; border: 1px solid transparent;
  margin-bottom: 3px;
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s;
  /* opacity/animation removed — was re-triggering for every item on each search keystroke */
  position: relative; overflow: hidden;
}
@keyframes tm-itemIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: none; }
}
.tm-country-item::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 0;
  background: var(--tm-amber); border-radius: 0 3px 3px 0; transition: width .2s;
}
.tm-country-item:hover {
  background: var(--tm-sand2); border-color: var(--tm-sand3);
  transform: translateX(-2px); box-shadow: var(--tm-sh-sm);
}
.tm-country-item:hover::before,
.tm-country-item.tm-active::before { width: 3px; }
.tm-country-item.tm-active {
  background: #fff; border-color: var(--tm-amber-glow); box-shadow: var(--tm-sh-sm);
}
.tm-country-item.tm-active .tm-c-name { color: var(--tm-amber); }

.tm-c-flag {
  font-size: 2rem; width: 38px; height: 38px; background: var(--tm-sand);
  border-radius: 10px; border: 1px solid var(--tm-sand3);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tm-c-body { flex: 1; min-width: 0; }
.tm-c-name {
  font-size: 1.7rem; font-weight: 600; color: var(--tm-ink); line-height: 1.1; /* was 1.6rem */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s; margin: 0;
}
.tm-c-desc {
  font-size: 1.55rem; font-weight: 400; color: var(--tm-muted); margin-top: 2px; /* was 1.5rem */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tm-c-arrow {
  color: var(--tm-sand3); font-size: 1.7rem; flex-shrink: 0; /* was 1.6rem */
  transition: color .18s, transform .18s;
}
.tm-country-item:hover .tm-c-arrow,
.tm-country-item.tm-active .tm-c-arrow { color: var(--tm-amber); transform: translateX(2px); }

/* Panel footer / reset button */
.tm-panel-footer {
  padding: 14px 16px; border-top: 1px solid var(--tm-sand3); flex-shrink: 0;
}
.tm-reset-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--tm-sand3); border-radius: 12px;
  padding: 11px; cursor: pointer;
  font-size: 1.7rem; font-weight: 500; color: var(--tm-muted); transition: all .2s; /* was 1.6rem */
}
.tm-reset-btn:hover {
  background: var(--tm-amber-pale); border-color: var(--tm-amber-glow); color: var(--tm-amber);
}

/* ── Country pin (amber, larger) ── */
.tm-pin-outer {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.tm-pin-inner {
  width: 28px; height: 28px; background: #fff; border: 2px solid var(--tm-amber);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(200,96,26,.35), 0 1px 4px rgba(26,22,18,.2);
  transition: transform .22s cubic-bezier(.2,.9,.4,1.1), box-shadow .22s;
  position: relative; z-index: 1;
}
.tm-pin-inner i { color: var(--tm-amber); font-size: 1.75rem; }
.tm-pin-ring {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid rgba(200,96,26,.2);
  /* Ripple animation only plays on hover to avoid per-marker GPU work */
  opacity: 0;
}
.tm-pin-ring2 {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(200,96,26,.1);
  opacity: 0;
}
.tm-pin-outer:hover .tm-pin-ring {
  animation: tm-ripple 2.8s ease-out infinite;
}
.tm-pin-outer:hover .tm-pin-ring2 {
  animation: tm-ripple 2.8s ease-out .6s infinite;
}
@keyframes tm-ripple {
  0%   { transform: scale(.6); opacity: .8; }
  70%  { transform: scale(1);  opacity: 0; }
  100% { opacity: 0; }
}
.tm-pin-outer:hover .tm-pin-inner {
  transform: scale(1.25);
  box-shadow: 0 6px 20px rgba(200,96,26,.5), 0 2px 8px rgba(26,22,18,.2);
}

/* ── City / Location pin — Rexby style: filled circle + white icon ── */
.tm-city-pin-outer {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.tm-city-pill {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.2);
  transition: transform .18s cubic-bezier(.2,.9,.4,1.2), box-shadow .18s;
  position: relative; z-index: 1;
}
.tm-city-pill i {
  color: #fff; font-size: 1.25rem;
  /* slight text-shadow so icon stays crisp on all bg colours */
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.tm-city-pin-outer:hover .tm-city-pill {
  transform: scale(1.22) translateY(-2px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.25);
}

/* Type tag inside popup badge */
.tm-type-tag {
  display: inline-block; font-size: 1.3rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255,255,255,0.6); border-radius: 100px;
  padding: 1px 7px; margin-left: 4px; opacity: .85;
}

/* ── Map Legend ── */
/* ── Map Legend — mirrors the Destinations panel style ── */
.tm-legend {
  position: absolute; bottom: 16px; left: 16px; z-index: 200;
  width: 210px;
  display: flex; flex-direction: column; align-items: stretch;
  pointer-events: none;
  opacity: 0; animation: tm-hintIn .5s ease 2.8s both;
}

/* Toggle tab — sits at the top of the legend box, always visible */
.tm-legend-toggle {
  pointer-events: all;
  position: absolute;
  top: -36px; left: 50%; transform: translateX(-50%);
  height: 36px; padding: 0 18px;
  background: var(--tm-card); border: 1px solid var(--tm-card-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 16px rgba(26,22,18,.07);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; color: var(--tm-muted);
  font-size: 1.4rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  transition: background .18s, color .18s;
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
.tm-legend-toggle::before {
  content: 'Pin Types';
  font-size: 1.3rem;
}
.tm-legend-toggle:hover { background: var(--tm-amber-pale); color: var(--tm-amber); }
.tm-legend-toggle i { font-size: 1.3rem; transition: transform .3s cubic-bezier(.16,1,.3,1); }

/* Collapsed state */
.tm-legend.tm-legend--collapsed .tm-legend-inner {
  opacity: 0; pointer-events: none; max-height: 0;
}
.tm-legend.tm-legend--collapsed .tm-legend-toggle i { transform: rotate(180deg); }

/* Inner card — same glass-card treatment as panel-inner */
.tm-legend-inner {
  pointer-events: all;
  display: flex; flex-direction: column;
  background: rgba(247, 246, 246, 0.97);
  /* backdrop-filter removed — caused continuous GPU compositing */
  border: 1px solid var(--tm-card-border);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(26,22,18,.13);
  overflow: hidden;
  transition: opacity .25s ease, max-height .35s cubic-bezier(.16,1,.3,1);
  max-height: 60vh;
}
.tm-legend-inner::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tm-amber), var(--tm-amber2), #f0a060);
  border-radius: 0 0 16px 16px;
}

/* Header — mirrors tm-panel-header */
.tm-legend-header {
  padding: 16px 16px 10px; border-bottom: 1px solid var(--tm-sand3); flex-shrink: 0;
}
.tm-legend-label {
  font-size: 1.5rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--tm-amber); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.tm-legend-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--tm-amber-glow), transparent);
}
.tm-legend-title-row {
  display: flex; align-items: center; justify-content: space-between;
}
.tm-legend-title {
  font-size: 1.7rem; font-weight: 600; line-height: 1.1; color: var(--tm-ink);
  margin: 0; padding: 0;
}
.tm-types-badge {
  background: var(--tm-amber-pale); border: 1px solid var(--tm-amber-glow);
  border-radius: 100px; padding: 3px 10px;
  font-size: 1.5rem; font-weight: 600; color: var(--tm-amber);
  white-space: nowrap;
}

/* Scrollable list — mirrors tm-country-list */
.tm-legend-list {
  flex: 1; overflow-y: auto; padding: 8px 10px;
  scrollbar-width: thin; scrollbar-color: var(--tm-sand3) transparent;
}
.tm-legend-list::-webkit-scrollbar { width: 3px; }
.tm-legend-list::-webkit-scrollbar-thumb { background: var(--tm-sand3); border-radius: 3px; }

/* Individual filter row — mirrors tm-country-item */
.tm-legend-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; margin-bottom: 2px;
  font-size: 1.45rem; color: var(--tm-ink3);
  transition: background .18s, border-color .18s, transform .18s;
  user-select: none; position: relative; overflow: hidden;
}
.tm-legend-item::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 0;
  background: var(--tm-amber); border-radius: 0 3px 3px 0; transition: width .2s;
}
.tm-legend-item:hover {
  background: var(--tm-sand2); border-color: var(--tm-sand3);
  transform: translateX(2px);
}
.tm-legend-item:hover::before { width: 3px; }
.tm-legend-item.tm-legend-active {
  background: var(--tm-amber-pale);
  border-color: var(--tm-amber-glow);
  color: var(--tm-ink); font-weight: 600;
}
.tm-legend-item.tm-legend-active::before { width: 3px; }
.tm-legend-item.tm-legend-active .tm-legend-pill {
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transform: scale(1.1);
}

/* Filled circle matching the map pin */
.tm-legend-pill {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform .18s, box-shadow .18s;
}
.tm-legend-pill i { color: #fff; font-size: 1.05rem; }

/* Footer reset button — mirrors tm-panel-footer */
.tm-legend-footer {
  padding: 10px 12px; border-top: 1px solid var(--tm-sand3); flex-shrink: 0;
}
.tm-legend-reset-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: transparent; border: 1.5px solid var(--tm-sand3); border-radius: 10px;
  padding: 8px; cursor: pointer;
  font-size: 1.55rem; font-weight: 500; color: var(--tm-muted); transition: all .2s;
}
.tm-legend-reset-btn:hover {
  background: var(--tm-amber-pale); border-color: var(--tm-amber-glow); color: var(--tm-amber);
}

/* Flag-icons sizing inside panel list and popup */
.tm-c-flag .fi {
  font-size: 1.6rem; line-height: 1;
  border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.tm-city-badge .fi {
  font-size: 1.4rem; line-height: 1;
  border-radius: 2px; vertical-align: middle;
}

@media (max-width: 768px) { .tm-legend { display: none; } }

/* ── Leaflet popup — scoped to .tm-popup className ── */
.tm-popup .leaflet-popup-content-wrapper {
  background: #fff !important; border: none !important;
  border-radius: 20px !important; padding: 0 !important; overflow: hidden !important;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 20px 50px rgba(26,22,18,.18) !important;
}
.tm-popup .leaflet-popup-tip-container { display: none !important; }
.tm-popup .leaflet-popup-close-button {
  color: var(--tm-muted) !important; top: 14px !important; right: 14px !important;
  font-size: 1.9rem !important; background: var(--tm-sand) !important;
  width: 26px !important; height: 26px !important; border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  line-height: 26px !important; z-index: 10 !important;
  transition: background .18s, color .18s !important;
}
.tm-popup .leaflet-popup-close-button:hover {
  background: var(--tm-amber) !important; color: #fff !important;
}
.tm-popup .leaflet-popup-content {
  margin: 0 !important; width: auto !important;
  min-width: 340px; max-width: 400px;
}

/* ── Popup internals ── */
.tm-popup-body { padding: 0; }

/* ── Base photo grid ── */
.tm-popup-photos {
  display: grid;
  gap: 3px;
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

/* Shared tile styles */
.tm-popup-photos .tm-ph {
  overflow: hidden; cursor: zoom-in; position: relative;
  background: var(--tm-sand2);
}
.tm-popup-photos .tm-ph img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s cubic-bezier(.25,.8,.25,1); display: block;
}
.tm-popup-photos .tm-ph:hover img { transform: scale(1.08); }
.tm-popup-photos .tm-ph::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(26,22,18,0); transition: background .2s;
}
.tm-popup-photos .tm-ph:hover::after { background: rgba(26,22,18,.10); }

/* Zoom hint */
.tm-zoom-hint {
  position: absolute; top: 6px; right: 6px;
  background: rgba(26,22,18,.55); color: #fff; border-radius: 6px;
  padding: 3px 7px; font-size: 1.4rem;
  opacity: 0; transition: opacity .2s; pointer-events: none;
  display: flex; align-items: center; gap: 4px;
}
.tm-popup-photos .tm-ph:hover .tm-zoom-hint { opacity: 1; }

/* "+N more" overflow overlay on tile 6 */
.tm-ph-more {
  position: absolute; inset: 0;
  background: rgba(10,8,6,.52);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700; color: #fff;
  letter-spacing: -.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  pointer-events: none;
}

/* Photo count badge — bottom-right corner of the grid */
.tm-photo-count {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(10,8,6,.55); backdrop-filter: blur(6px);
  color: #fff; border-radius: 100px;
  padding: 3px 9px; font-size: 1.3rem; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  pointer-events: none; z-index: 5;
}

/* ════════════════════════════════════════════════
   LAYOUT VARIANTS — keyed on number of photos
   ════════════════════════════════════════════════ */

/* ── 1 photo: wide hero ── */
.tm-photos--1 {
  grid-template-columns: 1fr;
}
.tm-photos--1 .tm-ph { height: 200px; }

/* ── 2 photos: side-by-side ── */
.tm-photos--2 {
  grid-template-columns: 1fr 1fr;
}
.tm-photos--2 .tm-ph { height: 160px; }

/* ── 3 photos: hero left + 2 stacked right ── */
.tm-photos--3 {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 110px 110px;
}
.tm-photos--3 .tm-ph:nth-child(1) { grid-row: 1 / 3; }
.tm-photos--3 .tm-ph:nth-child(2),
.tm-photos--3 .tm-ph:nth-child(3) { height: 110px; }

/* ── 4 photos: classic 2×2 ── */
.tm-photos--4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 120px 100px;
}

/* ── 5+ photos: hero top-left (spans 2 cols) + 1 top-right + 3 bottom ── */
.tm-photos--5-6 {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 130px 90px;
}
.tm-photos--5-6 .tm-ph:nth-child(1) {
  grid-column: 1 / 3; /* hero spans left 2 cols of top row */
}
/* tiles 2-5 fill the remaining slots naturally */

.tm-popup-text { padding: 16px 20px 14px; }
.tm-city-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 1.7rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; /* was 1.6rem */
  color: var(--tm-green); background: rgba(45,106,79,.08);
  border: 1px solid rgba(45,106,79,.18); border-radius: 100px;
  padding: 3px 10px; margin-bottom: 8px;
}
.tm-popup-title {
  font-size: 1.8rem; font-weight: 600; color: var(--tm-ink);
  line-height: 1; margin: 0 0 8px;
}
.tm-popup-desc {
  font-size: 1.6rem; font-weight: 300; line-height: 1.6; /* was 1.5rem */
  color: var(--tm-ink3); margin-bottom: 12px;
}
.tm-popup-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--tm-sand2);
}
.tm-popup-link  { display: none; }
.tm-popup-coord { display: none; }
.tm-popup-actions { display: none; }

/* ── Tooltip ── */
.tm-tt {
  background: #fff !important; border: 1px solid var(--tm-sand3) !important;
  border-radius: 100px !important; box-shadow: 0 4px 16px rgba(26,22,18,.12) !important;
  color: var(--tm-ink) !important;
  font-size: 1.85rem !important; font-weight: 600 !important; padding: 5px 14px !important;
}
.tm-tt::before { display: none !important; }

/* ── Leaflet zoom control — scoped to .tm-shell ── */
.tm-shell .leaflet-control-zoom {
  border: 1px solid var(--tm-sand3) !important; border-radius: 14px !important;
  overflow: hidden !important; box-shadow: var(--tm-sh-md) !important;
}
.tm-shell .leaflet-control-zoom a {
  background: #fff !important; border-color: var(--tm-sand3) !important;
  color: var(--tm-ink3) !important; width: 36px !important; height: 36px !important;
  line-height: 36px !important;
  transition: background .18s, color .18s !important;
}
.tm-shell .leaflet-control-zoom a:hover {
  background: var(--tm-amber-pale) !important; color: var(--tm-amber) !important;
}
.tm-shell .leaflet-control-attribution { display: none !important; }
.tm-shell .leaflet-popup { margin-bottom: 16px !important; }

/* ── Bottom hint ── */
.tm-bottom-hint {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; align-items: center; gap: 8px;
  background: var(--tm-card); border: 1px solid var(--tm-card-border);
  border-radius: 100px; padding: 8px 18px; box-shadow: var(--tm-sh-md);
  pointer-events: none; white-space: nowrap;
  opacity: 0; animation: tm-hintIn .5s ease 2.5s both;
}
@keyframes tm-hintIn { to { opacity: 1; } }
.tm-bottom-hint i { color: var(--tm-amber); font-size: 1.7rem; } /* was 1.7rem — already ok */
.tm-bottom-hint span { font-size: 1.7rem; font-weight: 400; color: var(--tm-ink3); } /* was 1.6rem */

/* ── Lightbox — fixed, above everything including site header ── */
.tm-lb {
  display: none; position: fixed; inset: 0;
  background: rgba(10,8,6,.94); backdrop-filter: blur(24px);
  z-index: 99999;
  justify-content: center; align-items: center; flex-direction: column;
}
.tm-lb.tm-on { display: flex; }
.tm-lb-close {
  position: absolute; top: 22px; right: 26px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(247,243,236,.1); border: 1px solid rgba(247,243,236,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 1.7rem; transition: background .2s; /* was 1.6rem */
}
.tm-lb-close:hover { background: var(--tm-amber); border-color: var(--tm-amber); }
.tm-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(247,243,236,.1); border: 1px solid rgba(247,243,236,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 1.7rem; transition: background .2s; /* was 1.6rem */
}
.tm-lb-nav:hover { background: rgba(200,96,26,.7); border-color: var(--tm-amber); }
.tm-lb-prev { left: 20px; }
.tm-lb-next { right: 20px; }
.tm-lb img {
  max-width: 90vw; max-height: 82vh; object-fit: contain;
  border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.7);
  animation: tm-lbPop .28s cubic-bezier(.16,1,.3,1);
}
@keyframes tm-lbPop {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: none; }
}
.tm-lb-caption {
  margin-top: 14px; color: rgba(247,243,236,.7);
  font-size: 1.7rem; letter-spacing: .06em; /* was 1.6rem */
}
.tm-lb-dots { display: flex; gap: 7px; margin-top: 10px; }
.tm-lb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(247,243,236,.3); cursor: pointer; transition: background .2s, transform .2s;
}
.tm-lb-dot.tm-on { background: var(--tm-amber); transform: scale(1.3); }

/* ── Mobile Filter FAB (floating button) — hidden on desktop ── */
.tm-filter-fab {
  display: none; /* shown only in mobile media query */
  position: absolute;
  bottom: 58px; left: 16px; z-index: 200;
  align-items: center; gap: 7px;
  background: var(--tm-card);
  border: 1px solid var(--tm-card-border);
  border-radius: 100px;
  padding: 10px 18px 10px 14px;
  box-shadow: var(--tm-sh-md);
  backdrop-filter: blur(16px);
  cursor: pointer;
  pointer-events: all;
  color: var(--tm-ink3);
  font-size: 1.5rem; font-weight: 600;
  transition: background .18s, color .18s, transform .15s;
  white-space: nowrap;
}
.tm-filter-fab i { color: var(--tm-amber); font-size: 1.5rem; }
.tm-filter-fab:hover { background: var(--tm-amber-pale); color: var(--tm-amber); transform: scale(1.03); }
.tm-filter-fab .tm-fab-badge {
  background: var(--tm-amber); color: #fff;
  font-size: 1.2rem; font-weight: 700;
  border-radius: 100px; padding: 1px 7px;
  margin-left: 2px; display: none;
}
.tm-filter-fab .tm-fab-badge.tm-fab-badge--on { display: inline-block; }

/* ── Mobile Filter Bottom Sheet — hidden on desktop ── */
.tm-filter-sheet {
  display: none; /* shown only in mobile media query */
  position: fixed; inset: 0; z-index: 99998;
  align-items: flex-end; justify-content: center;
  background: rgba(10,8,6,.45);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.tm-filter-sheet.tm-sheet--open {
  opacity: 1; pointer-events: all;
}
.tm-filter-sheet-inner {
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 40px rgba(26,22,18,.18);
  display: flex; flex-direction: column;
  max-height: 75vh;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.tm-filter-sheet.tm-sheet--open .tm-filter-sheet-inner {
  transform: translateY(0);
}

/* Drag handle */
.tm-sheet-handle {
  width: 36px; height: 4px; border-radius: 100px;
  background: #d0ccc8; margin: 12px auto 0; flex-shrink: 0;
}

/* Sheet header */
.tm-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(180,170,160,.2); flex-shrink: 0;
}
.tm-sheet-title {
  font-size: 1.8rem; font-weight: 700; color: var(--tm-ink);
}
.tm-sheet-badge {
  background: var(--tm-amber-pale); border: 1px solid var(--tm-amber-glow);
  border-radius: 100px; padding: 3px 12px;
  font-size: 1.4rem; font-weight: 600; color: var(--tm-amber);
}
.tm-sheet-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(180,170,160,.15); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--tm-muted); font-size: 1.5rem;
  transition: background .18s, color .18s;
}
.tm-sheet-close:hover { background: var(--tm-amber); color: #fff; }

/* Sheet list — reuses legend item styles */
.tm-sheet-list {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; align-content: start;
  scrollbar-width: thin; scrollbar-color: var(--tm-sand3) transparent;
}
.tm-sheet-list .tm-legend-item {
  /* reuse tm-legend-item, just ensure good sizing for touch */
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 1.45rem;
}

/* Sheet footer */
.tm-sheet-footer {
  padding: 12px 16px 20px;
  border-top: 1px solid rgba(180,170,160,.2); flex-shrink: 0;
}
.tm-sheet-reset-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--tm-sand3); border-radius: 12px;
  padding: 12px; cursor: pointer;
  font-size: 1.6rem; font-weight: 500; color: var(--tm-muted); transition: all .2s;
}
.tm-sheet-reset-btn:hover {
  background: var(--tm-amber-pale); border-color: var(--tm-amber-glow); color: var(--tm-amber);
}

/* ── Responsive — Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .tm-panel { width: 300px; }
  .tm-stat-pill { padding: 6px 14px; }
  .tm-stat-pill .tm-num { font-size: 1.5rem; }
  .tm-stat-pill .tm-lbl { font-size: 1.3rem; }
}

/* ── Responsive — Mobile & small tablet (≤ 768px) ── */
@media (max-width: 768px) {
  /* Map shell — use dvh where available for accurate viewport on mobile browsers */
  .tm-shell {
    height: calc(100dvh - 120px);
    height: calc(100vh - 120px); /* fallback */
    min-height: 420px;
  }

  /* Panel — full height, slides in from right as a drawer */
  .tm-panel {
    width: 88vw;
    max-width: 320px;
    top: 0;
    bottom: 0;
    border-radius: 0;
  }
  .tm-panel-inner {
    border-radius: 16px 0 0 16px;
  }
  .tm-panel.tm-panel--collapsed { width: 0; }

  /* Toggle tab — bigger tap target on mobile */
  .tm-panel-toggle {
    width: 44px; height: 60px;
    left: -44px;
    border-radius: 16px 0 0 16px;
  }
  .tm-panel-toggle i { font-size: 1.6rem; }

  /* Stats pills — smaller, stacked differently */
  .tm-top-stats { gap: 8px; margin-top: 6px; }
  .tm-stat-pill {
    padding: 6px 12px; gap: 7px;
    border-radius: 100px;
  }
  .tm-stat-pill .tm-num { font-size: 1.4rem; }
  .tm-stat-pill .tm-lbl {
    font-size: 1.1rem; letter-spacing: .07em;
  }

  /* Top bar — tighter padding */
  .tm-top-bar { padding: 12px 16px 0; }

  /* Legend — hide the desktop bottom-left widget; show mobile FAB + sheet instead */
  .tm-legend { display: none; }
  .tm-filter-fab { display: flex; }
  .tm-filter-sheet { display: flex; }

  /* Bottom hint — smaller text, prevent overflow */
  .tm-bottom-hint {
    padding: 6px 14px;
    font-size: 0;        /* hide text, show icon only */
    white-space: nowrap;
    left: 50%;
    max-width: calc(100% - 120px);
  }
  .tm-bottom-hint i {
    font-size: 1.5rem;
    display: block;
  }
  .tm-bottom-hint span {
    display: none;       /* too long for mobile — icon is sufficient */
  }

  /* Popup — full-width friendly */
  .tm-popup .leaflet-popup-content {
    min-width: 280px;
    max-width: calc(100vw - 40px);
  }
  /* All layouts get slightly shorter rows on mobile */
  .tm-photos--1 .tm-ph              { height: 160px; }
  .tm-photos--2 .tm-ph              { height: 120px; }
  .tm-photos--3                     { grid-template-rows: 90px 90px; }
  .tm-photos--4                     { grid-template-rows: 100px 85px; }
  .tm-photos--5-6                   { grid-template-rows: 110px 75px; }
  .tm-photos--7-9                   { grid-template-rows: 85px 70px 65px; }
  .tm-photos--10plus                { grid-template-rows: 100px 65px 60px; }
  .tm-photos--10plus .tm-ph:nth-child(1) { height: 100px; }
}

/* ── Responsive — Small phones (≤ 480px) ── */
@media (max-width: 480px) {
  .tm-shell {
    height: calc(100dvh - 100px);
    height: calc(100vh - 100px);
    min-height: 380px;
  }

  .tm-panel {
    width: 92vw;
    max-width: 300px;
  }

  /* Hide stat pills entirely on very small screens — they clutter the map */
  .tm-top-stats { display: none; }

  .tm-top-bar { padding: 10px 12px 0; }

  /* Popup narrower */
  .tm-popup .leaflet-popup-content {
    min-width: 250px;
  }
  .tm-photos--1 .tm-ph              { height: 130px; }
  .tm-photos--2 .tm-ph              { height: 100px; }
  .tm-photos--3                     { grid-template-rows: 75px 75px; }
  .tm-photos--4                     { grid-template-rows: 85px 70px; }
  .tm-photos--5-6                   { grid-template-rows: 95px 65px; }
  .tm-photos--7-9                   { grid-template-rows: 75px 60px 55px; }
  .tm-photos--10plus                { grid-template-rows: 85px 55px 50px; }
  .tm-photos--10plus .tm-ph:nth-child(1) { height: 85px; }
  .tm-popup-text { padding: 12px 16px 10px; }
}


/* ══════════════════════════════════════════════════════════════
   VIEW TOGGLE BAR
══════════════════════════════════════════════════════════════ */
.tm-view-toggle-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 20px;
  margin-bottom: 0;
}
.tm-view-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 32px;
  border-radius: 100px;
  border: 1.5px solid #e0ddd8;
  background: #fff;
  font-size: 1.55rem; font-weight: 600;
  color: #9a8e82;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tm-view-btn i { font-size: 1.4rem; }
.tm-view-btn:hover { border-color: #f0441a; color: #f0441a; background: rgba(240,68,26,.04); }
.tm-view-btn--active {
  background: #1a1612; border-color: #1a1612; color: #fff !important;
  box-shadow: 0 4px 16px rgba(26,22,18,.2);
}
.tm-view-btn--active:hover { background: #2e2822; border-color: #2e2822; }

/* ══════════════════════════════════════════════════════════════
   GALLERY VIEW WRAPPER
══════════════════════════════════════════════════════════════ */
.tm-gallery-view {
  display: none;
  width: 100%;
  padding: 24px 0 64px;
  background: #f7f6f4;
  min-height: 60vh;
}

/* Countries container */
.tm-gallery-countries { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* Per-country section */
.tm-gc-section { margin-bottom: 56px; }

/* Country header */
.tm-gc-country-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 2px solid #ece9e4;
}
.tm-gc-flag { font-size: 2.4rem; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.18); flex-shrink: 0; }
.tm-gc-country-name {
  font-size: 2.2rem; font-weight: 700; color: #1a1612;
  margin: 0; padding: 0; border: none; text-transform: none; line-height: 1;
}
.tm-gc-country-desc { font-size: 1.5rem; color: #9a8e82; font-weight: 400; }

/* Locations grid — 3 cols desktop */
.tm-gc-locations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Card ── */
.tm-gc-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26,22,18,.07), 0 1px 3px rgba(26,22,18,.04);
  border: 1px solid rgba(220,216,210,.6);
  transition: transform .22s cubic-bezier(.2,.9,.4,1.1), box-shadow .22s;
  display: flex; flex-direction: column;
}
.tm-gc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(26,22,18,.13), 0 2px 8px rgba(26,22,18,.06);
}

/* ── Photo wrap ── */
.tm-gc-photo-wrap { position: relative; flex-shrink: 0; }

/* Shared tile */
.tm-gc-ph {
  overflow: hidden; cursor: zoom-in; position: relative; background: #ede9e3;
}
.tm-gc-ph img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s cubic-bezier(.25,.8,.25,1);
}
.tm-gc-ph:hover img { transform: scale(1.07); }
.tm-gc-ph::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(26,22,18,0); transition: background .2s;
}
.tm-gc-ph:hover::after { background: rgba(26,22,18,.08); }

/* +N overlay */
.tm-gc-more {
  position: absolute; inset: 0;
  background: rgba(10,8,6,.5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  pointer-events: none;
}

/* Photo count badge */
.tm-gc-photo-count {
  position: absolute; bottom: 8px; right: 8px; z-index: 4;
  background: rgba(10,8,6,.55); backdrop-filter: blur(6px);
  color: #fff; border-radius: 100px;
  padding: 3px 10px; font-size: 1.3rem; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   PHOTO GRID LAYOUTS — uniform fixed height
   Every layout is exactly 220px tall total.
   ════════════════════════════════════════════ */

/* Shared: all photo grids are the same total height */
.tm-gc-photos {
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
  gap: 2px;
  border-radius: 18px 18px 0 0;
}

/* ── 1 photo: single hero ── */
.tm-gc-photos--1 { display: block; }
.tm-gc-photos--1 .tm-gc-ph { height: 220px; }

/* ── 2 photos: equal side by side ── */
.tm-gc-photos--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tm-gc-photos--2 .tm-gc-ph { height: 220px; }

/* ── 3 photos: hero left (full height) + 2 equal stacked right ── */
.tm-gc-photos--3 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 109px 109px;
}
.tm-gc-photos--3 .tm-gc-ph:nth-child(1) { grid-row: 1 / 3; height: 220px; }
.tm-gc-photos--3 .tm-gc-ph:nth-child(2),
.tm-gc-photos--3 .tm-gc-ph:nth-child(3) { height: 109px; }

/* ── 4 photos: 2×2 equal grid ── */
.tm-gc-photos--4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 109px 109px;
}
.tm-gc-photos--4 .tm-gc-ph { height: 109px; }

/* ── 5+ photos: hero top (fixed height) + strip of 4 thumbs below ── */
.tm-gc-photos--5plus {
  display: flex;
  flex-direction: column;
  height: 220px;
  gap: 2px;
}
.tm-gc-photos--5plus .tm-gc-ph--hero {
  height: 148px;
  flex-shrink: 0;
}
.tm-gc-ph-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 70px;
  flex-shrink: 0;
}
.tm-gc-ph-strip .tm-gc-ph { height: 70px; }

/* ── Card info ── */
.tm-gc-info {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; gap: 7px;
  flex: 1;
}
.tm-gc-type-badges {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 2px;
}
.tm-gc-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 1.25rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 100px; padding: 3px 10px; border: 1px solid;
  align-self: flex-start;
}
.tm-gc-loc-name {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.8rem; font-weight: 700; color: #1a1612;
  background: none !important; border: none !important;
  padding: 0 !important; margin: 0 !important;
  box-shadow: none !important; outline: none;
  border-radius: 0 !important;
  cursor: pointer; text-align: left; line-height: 1.2;
  transition: color .18s;
}
.tm-gc-loc-name i { font-size: 1.3rem; color: #f0441a; transition: transform .2s; }
.tm-gc-loc-name:hover { color: #f0441a; }
.tm-gc-loc-name:hover i { transform: translateX(3px) scale(1.1); }

/* ── Back to Gallery bar — floats at bottom-left of the map ── */
.tm-back-bar {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; align-items: center;
  animation: tm-backIn .35s cubic-bezier(.16,1,.3,1);
}
@keyframes tm-backIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.tm-back-btn {
  display: inline-flex !important; align-items: center; gap: 8px;
  padding: 10px 20px !important; border-radius: 100px !important;
  background: #1a1612 !important; border: none !important;
  color: #fff !important; font-size: 1.4rem; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 20px rgba(26,22,18,.35) !important;
  transition: background .18s, transform .15s, box-shadow .18s;
  white-space: nowrap; letter-spacing: .04em;
}
.tm-back-btn i { font-size: 1.3rem; color: #f0441a; transition: transform .2s; }
.tm-back-btn:hover {
  background: #f0441a !important;
  box-shadow: 0 6px 24px rgba(240,68,26,.4) !important;
  transform: translateY(-2px);
}
.tm-back-btn:hover i { color: #fff; transform: translateX(-3px); }

/* ── Card highlight pulse after back-navigation ── */
.tm-gc-card--highlight {
  animation: tm-cardPulse 1.8s cubic-bezier(.16,1,.3,1);
}
@keyframes tm-cardPulse {
  0%   { box-shadow: 0 0 0 0 rgba(240,68,26,.5); }
  40%  { box-shadow: 0 0 0 8px rgba(240,68,26,.15); }
  100% { box-shadow: 0 2px 12px rgba(26,22,18,.07), 0 1px 3px rgba(26,22,18,.04); }
}
.tm-gc-loc-desc {
  font-size: 1.5rem; font-weight: 400;
  color: #6b6259; line-height: 1.55; margin: 0;
}

.tm-gallery-empty {
  text-align: center; color: #9a8e82;
  font-size: 1.7rem; padding: 64px 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .tm-gc-locations { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
  .tm-gc-locations { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tm-gc-photos,
  .tm-gc-photos--1 .tm-gc-ph,
  .tm-gc-photos--2 .tm-gc-ph      { height: 190px; }
  .tm-gc-photos--3 .tm-gc-ph:nth-child(1) { height: 190px; }
  .tm-gc-photos--3                { grid-template-rows: 94px 94px; }
  .tm-gc-photos--3 .tm-gc-ph:nth-child(2),
  .tm-gc-photos--3 .tm-gc-ph:nth-child(3) { height: 94px; }
  .tm-gc-photos--4                { grid-template-rows: 94px 94px; }
  .tm-gc-photos--4 .tm-gc-ph     { height: 94px; }
  .tm-gc-photos--5plus            { height: 190px; }
  .tm-gc-photos--5plus .tm-gc-ph--hero { height: 126px; }
  .tm-gc-ph-strip                 { height: 62px; }
  .tm-gc-ph-strip .tm-gc-ph      { height: 62px; }
  .tm-gc-country-desc             { display: none; }
  .tm-view-btn { padding: 10px 22px; }
}
@media (max-width: 540px) {
  .tm-gc-locations { grid-template-columns: 1fr; }
  .tm-gallery-countries { padding: 0 16px; }
  .tm-gc-photos,
  .tm-gc-photos--1 .tm-gc-ph,
  .tm-gc-photos--2 .tm-gc-ph      { height: 220px; }
  .tm-gc-photos--3 .tm-gc-ph:nth-child(1) { height: 220px; }
  .tm-gc-photos--3                { grid-template-rows: 109px 109px; }
  .tm-gc-photos--3 .tm-gc-ph:nth-child(2),
  .tm-gc-photos--3 .tm-gc-ph:nth-child(3) { height: 109px; }
  .tm-gc-photos--4                { grid-template-rows: 109px 109px; }
  .tm-gc-photos--4 .tm-gc-ph     { height: 109px; }
  .tm-gc-photos--5plus            { height: 220px; }
  .tm-gc-photos--5plus .tm-gc-ph--hero { height: 148px; }
  .tm-gc-ph-strip                 { height: 70px; }
  .tm-gc-ph-strip .tm-gc-ph      { height: 70px; }
}


/* ══════════════════════════════════════════════════════════════
   GALLERY LAYOUT — fixed sidebars + scrollable centre
══════════════════════════════════════════════════════════════ */

/* Outer wrapper — positions sidebars absolutely */
.tm-gallery-view {
  display: none;
  position: relative;
  background: #f5f3f0;
  min-height: 80vh;
}

/* ── Main content column (centre) ── */
.tm-gallery-main {
  padding: 24px 28px 64px;
  transition: margin .3s cubic-bezier(.16,1,.3,1);
}

/* ── Search bar ── */
.tm-gallery-search-bar {
  position: relative;
  max-width: 560px;
  margin: 0 auto 10px;
}
.tm-gallery-search-bar i.fa-magnifying-glass {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: #b0a89e; font-size: 1.5rem; pointer-events: none;
}
.tm-gallery-search-bar input {
  width: 100%; padding: 12px 42px 12px 42px;
  border: 1.5px solid #e0ddd8; border-radius: 14px;
  font-size: 1.6rem; color: #1a1612; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  outline: none; transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.tm-gallery-search-bar input::placeholder { color: #c0b8b0; }
.tm-gallery-search-bar input:focus {
  border-color: #f0441a; box-shadow: 0 0 0 3px rgba(240,68,26,.1);
}
.tm-gallery-search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 7px;
  background: #ece9e3; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #6b6259; font-size: 1.1rem; transition: background .15s, color .15s;
}
.tm-gallery-search-clear:hover { background: #f0441a; color: #fff; }

/* ── Active filter bar ── */
.tm-gallery-active-bar {
  max-width: 560px;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.tm-gallery-active-bar #tm-gallery-result-count {
  font-size: 1.4rem; color: #9a8e82; font-weight: 500;
}
.tm-gallery-clear-all {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 8px;
  border: 1px solid #e0ddd8; background: #fff;
  font-size: 1.35rem; font-weight: 500; color: #9a8e82;
  cursor: pointer; transition: all .15s;
}
.tm-gallery-clear-all:hover { border-color: #f0441a; color: #f0441a; }

/* ── Countries container ── */
.tm-gallery-countries { max-width: 1200px; margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════

/* ══════════════════════════════════════════════════════════════
   FIXED SIDEBARS — Activity (left) · Country (right)
   Layout: panel sits flush to screen edge, toggle is a small
   ear tab protruding from the panel edge.
══════════════════════════════════════════════════════════════ */
.tm-gs-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 600;
  display: none;
  flex-direction: row;
  align-items: center;
  writing-mode: horizontal-tb !important;
}
.tm-gs-sidebar.tm-gs--visible { display: flex; }

/* Left sidebar: panel on left edge, ear tab on right side of panel */
.tm-gs-sidebar--left  { left: 0; flex-direction: row; }
/* Right sidebar: panel on right edge, ear tab on left side of panel */
.tm-gs-sidebar--right { right: 0; flex-direction: row-reverse; }

/* ── Ear-tab toggle — small tab protruding from the panel ── */
.tm-gs-toggle {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  width: 28px !important;
  min-height: 90px;
  padding: 14px 0 !important;
  background: #1a1612;
  border: none;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  writing-mode: vertical-rl !important;
  box-shadow: none;
  transition: background .2s;
  margin: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
}
.tm-gs-sidebar--left  .tm-gs-toggle { border-radius: 0 10px 10px 0 !important; order: 2; }
.tm-gs-sidebar--right .tm-gs-toggle { border-radius: 10px 0 0 10px !important; order: 2; }
.tm-gs-toggle:hover { background: #f0441a; transform: none !important; }

.tm-gs-toggle > i:first-child {
  font-size: 1.2rem; color: #f0441a;
  writing-mode: horizontal-tb !important;
}
.tm-gs-toggle:hover > i:first-child { color: #fff; }
.tm-gs-toggle > span {
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  writing-mode: vertical-rl !important;
  color: #fff;
}
.tm-gs-chevron {
  font-size: .8rem;
  writing-mode: horizontal-tb !important;
  color: rgba(255,255,255,.5);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.tm-gs-sidebar--left:not(.tm-gs--collapsed)  .tm-gs-chevron { transform: rotate(180deg); }
.tm-gs-sidebar--right:not(.tm-gs--collapsed) .tm-gs-chevron { transform: rotate(180deg); }

/* Badge dot */
.tm-gs-badge {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f0441a;
  writing-mode: horizontal-tb !important;
  display: none; flex-shrink: 0;
  box-shadow: 0 0 0 2px #1a1612;
}
.tm-gs-badge.tm-gs-badge--on { display: block; }
.tm-gs-toggle:hover .tm-gs-badge { box-shadow: 0 0 0 2px #f0441a; }

/* ── Panel — slides open from the edge ── */
.tm-gs-panel {
  width: 0;
  max-height: min(420px, calc(100vh - 100px));
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  writing-mode: horizontal-tb !important;
  border: 1px solid #e8e3dc;
  box-shadow: 0 8px 32px rgba(26,22,18,.16);
  transition: width .32s cubic-bezier(.16,1,.3,1), opacity .22s ease;
  order: 1;
}
.tm-gs-sidebar--left  .tm-gs-panel { border-radius: 0 16px 16px 0; border-left: none; }
.tm-gs-sidebar--right .tm-gs-panel { border-radius: 16px 0 0 16px; border-right: none; }

.tm-gs-sidebar:not(.tm-gs--collapsed) .tm-gs-panel { width: 220px; opacity: 1; }
.tm-gs--collapsed .tm-gs-panel { width: 0; opacity: 0; pointer-events: none; }

/* Coloured top accent line */
.tm-gs-panel::before {
  content: ''; display: block; height: 3px; flex-shrink: 0;
  background: linear-gradient(90deg, #f0441a, #ff8c5a);
}
.tm-gs-sidebar--left  .tm-gs-panel::before { border-radius: 0 16px 0 0; }
.tm-gs-sidebar--right .tm-gs-panel::before { border-radius: 16px 0 0 0; }

/* ── Panel header ── */
.tm-gs-panel-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid #f2eeea;
  flex-shrink: 0;
}
.tm-gf-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 1.1rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: #f0441a;
}
.tm-gf-label i { font-size: 1.05rem; }
.tm-gf-label::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(240,68,26,.2), transparent);
}

/* ── Scrollable chip list ── */
.tm-gf-chips {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.tm-gf-chips::-webkit-scrollbar { width: 3px; }
.tm-gf-chips::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

/* ── Each filter row — bordered box with small gap ── */
.tm-gf-chip {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid #ede9e3;
  background: #fff;
  color: #2a2218;
  font-size: 1.4rem; font-weight: 400;
  cursor: pointer; text-align: left;
  transition: border-color .12s, background .12s;
  position: relative;
  margin-bottom: 4px;
  box-sizing: border-box;
}
.tm-gf-chip:last-child { margin-bottom: 0; }
.tm-gf-chip:hover { border-color: #d8d2ca; background: #faf8f5; }
.tm-gf-chip--on {
  background: #fff4f1 !important;
  border-color: rgba(240,68,26,.35) !important;
}
.tm-gf-chip--on .tm-gf-chip-label { color: #c0340e; font-weight: 600; }

/* Left accent bar on selected */
.tm-gf-chip--on::before {
  content: ''; position: absolute; left: -1px; top: 15%; bottom: 15%;
  width: 3px; background: #f0441a; border-radius: 0 3px 3px 0;
}

/* Flag wrap */
.tm-gf-flag-wrap {
  width: 26px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.tm-gf-flag-wrap .fi { font-size: 1.4rem; border-radius: 2px; }

/* Icon circle */
.tm-gf-icon-circle {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.22);
}
.tm-gf-icon-circle i { color: #fff; font-size: 1rem; }

.tm-gf-chip-label { flex: 1; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Panel footer ── */
.tm-gs-panel-footer {
  padding: 8px 10px 12px;
  border-top: 1px solid #f2eeea;
  flex-shrink: 0;
}
.tm-gf-reset-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; border: 1.5px solid #e8e3dc; border-radius: 10px;
  padding: 8px; cursor: pointer;
  font-size: 1.3rem; font-weight: 600; color: #b0a89e;
  transition: all .15s;
}
.tm-gf-reset-btn:hover {
  border-color: #f0441a; color: #f0441a;
  background: rgba(240,68,26,.04);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE SIDEBARS
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
  .tm-gs-sidebar:not(.tm-gs--collapsed) .tm-gs-panel { width: 190px; }
}

@media (max-width: 768px) {
  .tm-gs-sidebar {
    top: auto; bottom: 14px; transform: none;
    flex-direction: column-reverse;
  }
  .tm-gs-sidebar--left  { left: 10px; right: auto; }
  .tm-gs-sidebar--right { right: 10px; left: auto; flex-direction: column-reverse; }

  .tm-gs-toggle {
    writing-mode: horizontal-tb !important;
    flex-direction: row !important;
    width: auto !important; min-height: auto !important;
    padding: 9px 14px !important;
    border-radius: 100px !important;
    box-shadow: 0 3px 14px rgba(26,22,18,.3) !important;
    gap: 7px; order: 1;
  }
  .tm-gs-toggle > span { writing-mode: horizontal-tb !important; font-size: 1.15rem; }
  .tm-gs-chevron { display: none; }

  .tm-gs-panel {
    width: 210px !important; max-height: 0 !important;
    border-radius: 14px !important;
    border: 1px solid #e8e3dc !important;
    box-shadow: 0 -3px 20px rgba(26,22,18,.14) !important;
    margin-bottom: 8px; order: 2;
  }
  .tm-gs-sidebar:not(.tm-gs--collapsed) .tm-gs-panel { max-height: 55vh !important; opacity: 1; }
  .tm-gs--collapsed .tm-gs-panel { max-height: 0 !important; opacity: 0; }
}

@media (max-width: 480px) {
  .tm-gs-sidebar--left  { left: 8px; }
  .tm-gs-sidebar--right { right: 8px; }
  .tm-gs-panel { width: 190px !important; }
  .tm-gf-chip { font-size: 1.3rem; padding: 6px 7px; }
}

