/* ===========================
   CSS Variables
   =========================== */
:root {
  --navy: #002856;
  --olive: #606C38;
  --blue: #0075C9;
  --cream: #FEFAE0;
  --earth: #DDA15E;
  --brown: #BC6C25;
  --bg: #FEFAE0;
  --text: #002856;
  --text-light: #FEFAE0;
  --panel-bg: #002856;
  --panel-text: #FEFAE0;
  --pos-white: #FFFFFF;
  --pos-green: #2E8B57;
  --pos-red: #CC3333;
  --pos-black: #222222;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Poppins', Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 40, 86, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 40, 86, 0.2);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header { background: var(--navy); color: var(--cream); padding: 1.5rem 2rem; text-align: center; }
.site-title { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; letter-spacing: 2px; }
.site-subtitle { font-family: var(--font-body); font-size: 1rem; font-weight: 300; opacity: 0.8; margin-top: 0.25rem; }

/* Map Section */
.map-section { position: relative; max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.map-container { background: #f5f0e8; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.map-container svg { width: 100%; height: auto; display: block; }

/* SVG Hotspot Styles - these apply to elements INSIDE the inline SVG */
.hotspot { cursor: pointer; transition: fill 0.2s, stroke 0.2s; }
.hotspot:hover { fill: rgba(221, 161, 94, 0.3) !important; stroke: #DDA15E !important; stroke-width: 2 !important; }
.hotspot.active { fill: rgba(221, 161, 94, 0.2) !important; stroke: #DDA15E !important; stroke-width: 2.5 !important; stroke-dasharray: 6 3; }

/* Tour Controls */
.tour-controls { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; background: rgba(0, 40, 86, 0.9); backdrop-filter: blur(8px); padding: 0.75rem 1.5rem; border-radius: var(--radius); z-index: 10; }
.tour-btn { background: var(--olive); color: var(--cream); border: none; padding: 0.5rem 1rem; border-radius: var(--radius); font-family: var(--font-body); font-weight: 500; cursor: pointer; transition: background 0.2s; font-size: 0.9rem; }
.tour-btn:hover { background: #4d5a2c; }
.tour-close { background: transparent; font-size: 1.5rem; padding: 0.25rem 0.75rem; }
.tour-close:hover { background: rgba(255,255,255,0.1); }
.tour-indicator { color: var(--cream); font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }

/* Intro Section */
.intro-section { text-align: center; padding: 3rem 2rem; max-width: 800px; margin: 0 auto; }
.intro-section h2 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 1rem; color: var(--navy); }
.intro-section p { font-size: 1.05rem; color: #444; margin-bottom: 2rem; line-height: 1.8; }
.btn-primary { background: var(--olive); color: var(--cream); border: none; padding: 0.875rem 2rem; border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem; font-weight: 500; cursor: pointer; transition: background 0.2s, transform 0.2s; letter-spacing: 0.5px; }
.btn-primary:hover { background: #4d5a2c; transform: translateY(-1px); }

/* Photo Panel */
.photo-panel { position: fixed; top: 0; right: 0; width: 420px; height: 100vh; background: var(--panel-bg); color: var(--panel-text); transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; overflow-y: auto; box-shadow: var(--shadow-lg); }
.photo-panel.is-open { transform: translateX(0); }
.panel-close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: var(--cream); font-size: 2rem; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.2s; z-index: 1; }
.panel-close:hover { background: rgba(255,255,255,0.1); }
.panel-content { padding: 2rem 1.5rem; }
.panel-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; padding-right: 2rem; }
.panel-image-wrap { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0.75rem; margin-bottom: 1.25rem; border-radius: var(--radius); }
.panel-image-wrap img { min-width: 100%; scroll-snap-align: start; border-radius: var(--radius); object-fit: cover; max-height: 280px; }
.panel-description { font-size: 0.95rem; line-height: 1.7; opacity: 0.9; margin-bottom: 1rem; }
.panel-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.pos-badge { display: inline-flex; align-items: center; padding: 0.35rem 0.75rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; }
.pos-color-label { font-size: 0.85rem; opacity: 0.7; }

/* Image gallery dots */
.gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 0.5rem; }
.gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(254, 250, 224, 0.3); border: none; cursor: pointer; transition: background 0.2s; }
.gallery-dot.active { background: var(--cream); }

/* Position Strip */
.position-strip { max-width: 1200px; margin: 0 auto 2rem; padding: 0 1rem; }
.strip-inner { display: flex; gap: 0.75rem; overflow-x: auto; padding: 1rem 0; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.strip-card { flex: 0 0 auto; width: 90px; text-align: center; cursor: pointer; scroll-snap-align: start; transition: transform 0.2s; }
.strip-card:hover { transform: translateY(-3px); }
.strip-card.active { transform: translateY(-3px); }
.strip-dot { width: 36px; height: 36px; border-radius: 50%; margin: 0 auto 0.35rem; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: white; border: 3px solid var(--navy); transition: border-color 0.2s, box-shadow 0.2s; }
.strip-card.active .strip-dot { border-color: var(--earth); box-shadow: 0 0 0 3px rgba(221, 161, 94, 0.4); }
.strip-dot.color-white { background: #ccc; color: #333; }
.strip-dot.color-green { background: var(--pos-green); }
.strip-dot.color-red { background: var(--pos-red); }
.strip-dot.color-black { background: var(--pos-black); }
.strip-label { font-size: 0.7rem; font-weight: 500; color: var(--navy); }

/* Footer */
.site-footer { background: var(--navy); color: var(--cream); text-align: center; padding: 1.5rem; font-size: 0.85rem; opacity: 0.8; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1023px) {
  .photo-panel { width: 340px; }
}

@media (max-width: 767px) {
  .site-title { font-size: 1.75rem; }
  .site-subtitle { font-size: 0.85rem; }
  .intro-section h2 { font-size: 1.5rem; }

  /* Bottom sheet on mobile */
  .photo-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: auto; max-height: 70vh; transform: translateY(100%); border-radius: var(--radius) var(--radius) 0 0; }
  .photo-panel.is-open { transform: translateY(0); }
  .panel-image-wrap img { max-height: 200px; }

  /* Tour controls */
  .tour-controls { bottom: 0; left: 0; right: 0; transform: none; border-radius: 0; justify-content: center; }

  .map-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .map-container svg { min-width: 800px; }
}

/* Only apply hover effects on devices that support hover */
@media (hover: hover) {
  .hotspot:hover { fill: rgba(221, 161, 94, 0.3) !important; }
}

/* Overlay for panel background on mobile */
.panel-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.panel-overlay.is-visible { display: block; }
