@font-face {
  font-family: 'JuiceITC-Regular';
  src: url('../assets/fonts/JuiceITC.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Juice ITC';
  src: url('../assets/fonts/JuiceITC.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MVBoli';
  src: url('../assets/fonts/MVBoli.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MV Boli';
  src: url('../assets/fonts/MVBoli.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vertigo';
  src: url('../assets/fonts/Vertigo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f6f3;
  --panel: rgba(255, 255, 255, 0.75);
  --panel-border: rgba(0,0,0,0.06);
  --brand: #7a5cff;
  --ink: #2a2a2a;
  --muted: #6b6b6b;
  --accent: #ffb381;
  --shadow: 0 10px 30px rgba(31, 14, 84, 0.15);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; -webkit-overflow-scrolling: touch; }
body {
  margin: 0;
  font-family: 'Quicksand', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 800px at 10% -10%, #fff5e8 0%, rgba(255,255,255,0) 60%),
              radial-gradient(900px 700px at 110% 10%, #eef2ff 0%, rgba(255,255,255,0) 50%),
              var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--panel-border);
}

.brand {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.menu-button, .back {
  appearance: none;
  border: none;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  transform: perspective(400px) translateZ(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.menu-button:active, .back:active {
  transform: perspective(400px) translateZ(6px);
}

.spacer { flex: 1; }

.layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  height: calc(var(--vh, 100dvh) - var(--header-h, 60px));
}

.sidebar {
  position: fixed;
  inset: var(--header-h, 60px) 0 auto 0;
  max-height: calc(var(--vh, 100dvh) - var(--header-h, 60px));
  transform: translateY(0);
  translate: 0 0;
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  border-radius: 16px 16px 0 0;
  transition: translate 260ms ease;
}
@media (min-width: 900px) {
  .sidebar {
    position: relative;
    inset: auto;
    border-radius: 0;
    border-right: 1px solid var(--panel-border);
    grid-column: 1;
    width: 360px;
    max-height: none;
  }
  .layout {
    grid-template-columns: 360px 1fr;
    height: calc(var(--vh, 100dvh) - var(--header-h, 60px));
  }
}

.sidebar-inner { padding: 0 14px 14px; overflow: auto; max-height: calc(var(--vh, 100dvh) - var(--header-h, 60px) - 14px); }
.sidebar-header { margin-top: 0; }
.sidebar-header h2 { margin-top: 0; }
.sidebar-header h2 { margin: 6px 0 4px; font-size: 16px; }
.sidebar-header p { margin: 0 0 10px; color: var(--muted); }

.place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.place-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.place-item:active { transform: perspective(600px) rotateX(2deg) translateZ(8px); }

.place-item img {
  width: 44px; height: 44px; object-fit: contain;
}
.place-item h3 { margin: 0; font-size: 16px; }
.place-item .meta { font-size: 12px; color: var(--muted); }

.content { position: relative; }
.map { position: absolute; inset: 0; overflow: hidden; }

/* Info drawer overlay */
.info-drawer {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 950;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(60vh);
  transform: translateY(110%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 260ms ease, opacity 260ms ease;
  opacity: 0;
}
.info-drawer.open { transform: translateY(0); opacity: 1; }
.info-drawer .inner { padding: 14px; overflow: auto; max-height: calc(60vh - 28px); }
.info-drawer h3 { margin: 4px 0 8px; }
.info-drawer .header { display: flex; align-items: center; gap: 10px; }
.info-drawer .header .logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; color: white; font-weight: 800;
}
.info-drawer .close {
  margin-left: auto;
  appearance: none; border: 0; background: white; border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 6px 10px; cursor: pointer; box-shadow: var(--shadow);
}

body.info-open .map { filter: saturate(0.98) brightness(0.98); }

.leaflet-control-container .leaflet-control-zoom a {
  border-radius: 10px !important;
  box-shadow: var(--shadow);
}

/* Gentle perspective feel */
.map { transform-style: flat; }
@media (min-width: 900px) {
  body.persp .map { transform: perspective(1400px) rotateX(2.2deg) scale(1.002); transform-origin: center 60%; }
}

/* Detail page tweaks */
body.detail .sidebar { inset: var(--header-h, 60px) 0 auto 0; }

/* Sidebar toggle (mobile) */
@media (max-width: 899px) {
  .sidebar { translate: 0 110%; border-top: 0; border-radius: 0; }
  .sidebar.open { translate: 0 0; }
}

/* Marker labels (optional) */
.marker-label {
  background: white;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  font-weight: 700;
}

/* Map tooltips */
.map-tooltip {
  background: rgba(0, 0, 0, 0.85);
  color: #ffd700;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-tooltip::before {
  border-top-color: rgba(0, 0, 0, 0.85);
}

.map-hotspot {
  transition: fill-opacity 0.2s ease;
}

/* ===== FULLSCREEN MAP MODE ===== */
body.fullscreen-map {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #faa95c;
}

.map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent !important;
}

/* ===== STYLIZED MAP TILES ===== */
/* Apply color filters to match the illustration's warm yellow/orange palette */
.stylized-tiles {
  filter: 
    sepia(40%)           /* Add warm brownish tone */
    hue-rotate(-10deg)   /* Shift towards yellow/orange */
    saturate(0.6)        /* Reduce saturation */
    brightness(0.7)      /* Darken slightly */
    contrast(1.1);       /* Increase contrast */
}

/* Alternative vintage/paper map style */
.stylized-tiles.vintage {
  filter:
    sepia(60%)
    saturate(0.4)
    brightness(0.8)
    contrast(1.2);
}

/* Dark warm style */
.stylized-tiles.dark-warm {
  filter:
    sepia(30%)
    hue-rotate(-15deg)
    saturate(0.5)
    brightness(0.5)
    contrast(1.3);
}

/* Transparent Leaflet container so body orange shows through */
.fullscreen-map .leaflet-container {
  background: transparent !important;
}

/* Hide default Leaflet controls */
.fullscreen-map .leaflet-control-zoom {
  display: none;
}

.fullscreen-map .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 4px 8px;
  border-radius: 8px 0 0 0;
}

.fullscreen-map .leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Bottom Toolbar */
.map-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.toolbar-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.toolbar-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.2);
}

.toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toolbar-btn:disabled:hover {
  background: transparent;
}

.toolbar-btn-text {
  width: auto;
  padding: 0 16px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

/* Location button states */
.toolbar-btn.locating {
  animation: pulse-btn 1s ease-in-out infinite;
}

.toolbar-btn.active {
  background: rgba(255, 215, 0, 0.25);
  color: #ffd700;
}

@keyframes pulse-btn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.toolbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

/* Toolbar animation on load */
@keyframes toolbar-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.map-toolbar {
  animation: toolbar-slide-up 0.4s ease 0.3s both;
}

/* ===== DETAIL PAGE STYLES ===== */
body.detail-page {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #faa95c;
}

body.detail-page .leaflet-container {
  background: transparent !important;
}

body.detail-page .content {
  position: fixed;
  inset: 0;
}

body.detail-page .map {
  position: absolute;
  inset: 0;
}

/* Place header overlay (legacy – kept for backward compat) */
.place-header {
  display: none;
}

/* Description pill – top bar on detail pages */
.place-pill {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35),
              0 0 0 1px rgba(255, 255, 255, 0.08);
  max-width: 90vw;
  animation: pill-slide-down 0.4s ease 0.2s both;
}

.place-pill p {
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes pill-slide-down {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.place-description {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 400px;
}


/* Tile rotation set per-place via JS (--tile-rotate custom property).
   Scale up to cover corner gaps from the rotation. */
body.detail-page .leaflet-tile-pane {
  transform: rotate(var(--tile-rotate, 90deg)) scale(1.45);
  transform-origin: 50vw 50vh;
  will-change: transform;
}

/* Hide default Leaflet controls on detail page */
body.detail-page .leaflet-control-zoom {
  display: none;
}

body.detail-page .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 4px 8px;
  border-radius: 8px 0 0 0;
}

body.detail-page .leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* ===== CLICKABLE POI AREAS (legacy – marker overlay) ===== */
.poi-clickable-area {
  background: transparent !important;
  border: none !important;
}

.poi-hotspot {
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.poi-hotspot:hover {
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ===== SVG OVERLAY INTERACTIVE CURSOR FIX ===== */
/* Leaflet panes set pointer-events:none on child SVGs.
   Re-enable on our interactive elements so clicks go through. */
.leaflet-pane svg .interactive-poi,
.leaflet-pane svg .extra-poi-label,
.leaflet-pane svg .building-group {
  pointer-events: all !important;
  cursor: pointer;
}

/* ===== POI MODAL ===== */
.poi-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.poi-modal.open {
  opacity: 1;
  visibility: visible;
}

.poi-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: backdrop-filter 0.4s ease;
}

.poi-modal-content {
  position: relative;
  width: min(480px, 92vw);
  max-height: 85vh;
  background: linear-gradient(155deg, #1c1817 0%, #2a2218 50%, #1a1a1a 100%);
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 215, 0, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  overflow-y: auto;
  transform: scale(0.88) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poi-modal.open .poi-modal-content {
  transform: scale(1) translateY(0);
}

.poi-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  appearance: none;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.poi-modal-close:hover {
  background: rgba(255, 215, 0, 0.35);
  transform: scale(1.12) rotate(90deg);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}

.poi-modal-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #3a3530 0%, #2a2520 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.poi-modal-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(28, 24, 23, 1) 100%);
}

/* Side images layout for "Om stedet" */
.poi-modal-sides {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  width: 100%;
}

.poi-modal-image-side {
  flex: 0 0 0px;
  min-width: 0;
  overflow: hidden;
  background-color: #2a2520;
  background-size: cover;
  background-position: center;
}

.poi-modal-image-side.has-image {
  flex: 0 0 100px;
  min-width: 80px;
}

.poi-modal-content.poi-modal-has-sides {
  display: flex;
  flex-direction: column;
}

.poi-modal-content.poi-modal-has-sides .poi-modal-image {
  display: none;
}

.poi-modal-content.poi-modal-has-sides .poi-modal-sides {
  flex: 1 1 auto;
  min-height: 200px;
}

.poi-modal-content.poi-modal-has-sides .poi-modal-body {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  overflow-y: auto;
}

.poi-modal-content.poi-modal-has-sides .poi-modal-image-side {
  flex: 0 0 100px;
  min-width: 80px;
}

@media (max-width: 600px) {
  .poi-modal-content.poi-modal-has-sides .poi-modal-sides {
    flex-direction: column;
  }
  .poi-modal-content.poi-modal-has-sides .poi-modal-image-side {
    flex: 0 0 auto;
    min-width: 100%;
    height: 120px;
  }
  .poi-modal-content.poi-modal-has-sides .poi-modal-image-right {
    order: -1;
  }
  .poi-modal-content.poi-modal-has-sides .poi-modal-image-left {
    display: none;
  }
}

.poi-modal-body {
  padding: 0 28px 28px;
  margin-top: -8px;
  position: relative;
}

.poi-modal-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 1px 6px rgba(255, 215, 0, 0.15);
}

.poi-modal-body p {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}

.poi-modal-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poi-detail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.poi-detail-item:hover {
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.15);
  transform: translateX(4px);
}

.poi-detail-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.12);
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

.poi-detail-text {
  flex: 1;
  min-width: 0;
}

.poi-detail-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.poi-detail-value {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}

/* ===== LOCATION LOADING OVERLAY ===== */
.location-loading {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.location-loading.active {
  opacity: 1;
  visibility: visible;
}

.location-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.location-loading-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.15);
  border-radius: 50%;
  animation: location-icon-pulse 1.5s ease-in-out infinite;
}

.location-loading-icon svg {
  color: #ffd700;
  animation: location-icon-spin 2s linear infinite;
}

.location-loading-content p {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  animation: location-text-pulse 1.5s ease-in-out infinite;
}

@keyframes location-icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes location-icon-pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 30px 10px rgba(255, 215, 0, 0.2);
  }
}

@keyframes location-text-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== USER LOCATION MARKER ===== */
.user-location-marker {
  background: transparent !important;
  border: none !important;
}

.user-location-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #ffd700;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-location-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  background: rgba(255, 215, 0, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: location-pulse 2s ease-out infinite;
}

@keyframes location-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* ===== IMAGE GALLERY IN MODAL ===== */
.poi-modal-image.gallery-mode {
  position: relative;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  appearance: none;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-arrow:hover {
  background: rgba(255, 215, 0, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}

.gallery-dot {
  appearance: none;
  border: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-dot.active {
  background: #ffd700;
  transform: scale(1.3);
}

.gallery-dot:hover {
  background: rgba(255, 215, 0, 0.7);
}

/* ===== LINK BUTTONS IN MODAL ===== */
.poi-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.poi-modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 215, 0, 0.08) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 14px;
  color: #ffd700;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.poi-modal-link-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.15) 100%);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.15);
}

.poi-modal-link-btn:active {
  transform: translateY(0);
}

/* ===== MOBILE MAP MARKERS ===== */
.mobile-place-marker {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  width: auto !important;
  height: auto !important;
}

.mobile-marker-inner {
  display: block;
  position: relative;
  width: 48px;
  height: 48px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: mobile-marker-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes mobile-marker-pop {
  0% { opacity: 0; transform: scale(0.3); }
  100% { opacity: 1; transform: scale(1); }
}

.mobile-marker-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #ffd700;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.mobile-marker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 2.5px solid rgba(255, 215, 0, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: mobile-ring-pulse 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes mobile-ring-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
    border-color: rgba(255, 215, 0, 0.5);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.2;
    border-color: rgba(255, 215, 0, 0.3);
  }
}

.mobile-marker-label {
  position: absolute;
  top: 50%;
  left: calc(50% + 28px);
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.82);
  color: #ffd700;
  font-family: 'Quicksand', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.mobile-marker-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid rgba(0, 0, 0, 0.82);
}

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== CALENDAR DROPDOWN ===== */
.calendar-widget {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 1100;
}

.calendar-btn {
  appearance: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 12px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.calendar-btn:hover {
  background: rgba(20, 20, 20, 0.92);
}

.calendar-btn:active {
  transform: scale(0.97);
}

.calendar-widget.open .calendar-btn {
  background: rgba(0, 0, 0, 0.92);
}

.calendar-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  overflow: auto;
  background: #f6efe4;
  color: #2a1f14;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(40, 20, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.calendar-widget.open .calendar-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.calendar-panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(42, 31, 20, 0.1);
}

.calendar-panel-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.calendar-panel-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #7a5a48;
}

.calendar-list {
  display: flex;
  flex-direction: column;
}

.calendar-event {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(42, 31, 20, 0.08);
  transition: background 0.15s ease;
}

.calendar-event:last-child {
  border-bottom: none;
}

.calendar-event:hover {
  background: rgba(192, 57, 43, 0.06);
}

.calendar-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: #7a2e2a;
}

.calendar-event-day {
  font-size: 22px;
  font-weight: 700;
}

.calendar-event-month {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.calendar-event-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.calendar-event-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: #5c4033;
}

.calendar-event-meta {
  margin-top: 3px;
  font-size: 12px;
  color: #7a5a48;
}

.calendar-empty {
  margin: 0;
  padding: 22px 18px;
  font-size: 14px;
  color: #7a5a48;
}

.calendar-panel-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(42, 31, 20, 0.1);
  font-size: 13px;
  color: #7a5a48;
}

.calendar-panel-footer a {
  color: #7a2e2a;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.calendar-panel-footer a:hover {
  text-decoration: underline;
}

/* Sponsor / partner logo on the front page */
.page-logo {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.page-logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.page-logo img {
  display: block;
  width: 130px;
  height: auto;
}
@media (max-width: 768px), (pointer: coarse) {
  .page-logo {
    padding: 4px 8px;
  }
  .page-logo img {
    width: 90px;
  }
}

/* ===== MOBILE PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 768px), (pointer: coarse) {
  .site-header {
    backdrop-filter: none;
    background: rgba(255,255,255,0.92);
  }

  .sidebar {
    backdrop-filter: none;
    background: rgba(255,255,255,0.95);
  }

  .info-drawer {
    backdrop-filter: none;
    background: rgba(255,255,255,0.95);
  }

  .map-toolbar {
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.92);
    animation: none;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .stylized-tiles {
    filter: none;
  }

  body.info-open .map {
    filter: none;
  }

  .poi-modal-backdrop {
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.82);
  }

  .poi-modal-content {
    transition: transform 0.25s ease;
  }

  .poi-modal-close {
    backdrop-filter: none;
  }

  .location-loading {
    backdrop-filter: none;
    background: rgba(0, 0, 0, 0.7);
  }

  .location-loading-icon {
    animation: none;
  }

  .location-loading-icon svg {
    animation: location-icon-spin 2s linear infinite;
  }

  .location-loading-content p {
    animation: none;
  }

  .user-location-pulse {
    animation: none;
    background: rgba(255, 215, 0, 0.2);
    width: 28px;
    height: 28px;
  }

  .toolbar-btn {
    transition: none;
  }

  .place-item {
    transition: none;
  }

  .gallery-track {
    transition: transform 0.25s ease;
  }

  .gallery-arrow {
    transition: none;
  }

  .gallery-dot {
    transition: none;
  }

  .poi-detail-item {
    transition: none;
  }

  .poi-modal-link-btn {
    transition: none;
  }

  .place-pill {
    animation: none;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .calendar-btn {
    transition: none;
  }

  .calendar-panel {
    transition: none;
  }

  .calendar-event {
    transition: none;
  }
}

/* Respect prefers-reduced-motion globally */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

