/* ============================================================
   OurMovieScene — Main Stylesheet
   Design system by Agent 6: Burgundy/Gold brand, Playfair + Inter
   ============================================================ */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500;600&display=swap');

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- DESIGN TOKENS (Agent 6) ---- */
:root {
  /* Primary */
  --color-primary:       #740001;
  --color-primary-light: #A61415;
  --color-primary-dark:  #4A0000;
  /* Accent */
  --color-accent:        #D3A625;
  --color-accent-light:  #E8B935;
  --color-accent-dark:   #B8910B;
  /* Neutrals */
  --color-bg-primary:    #F9F7F4;
  --color-bg-secondary:  #FFFFFF;
  --color-text-primary:  #2C2C2C;
  --color-text-secondary:#666666;
  --color-text-light:    #999999;
  --color-border:        #E8E6E3;
  /* Status */
  --color-success:       #4CAF50;
  --color-error:         #F44336;
  --color-warning:       #FF9800;
  --color-disabled:      #CCCCCC;
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Type scale */
  --text-h1:   48px;
  --text-h2:   36px;
  --text-h3:   28px;
  --text-h4:   22px;
  --text-h5:   18px;
  --text-body: 16px;
  --text-sm:   14px;
  --text-xs:   12px;
  /* Spacing (8px grid) */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;
  /* Borders */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-full: 9999px;
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text-primary);
}

/* ---- STICKY HEADER / NAV ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo:hover { opacity: 0.85; }

/* Actual logo image — hidden until JS loads the URL */
.site-logo-img {
  display: none;
  height: auto;
  max-width: 180px;
  width: 100%;
  object-fit: contain;
}

/* Text fallback — shown until logo image loads */
.site-logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
}

.footer-brand .site-logo-text { color: white; }

/* Responsive logo sizing */
@media (max-width: 768px) {
  .site-logo-img { max-width: 150px; }
  .site-logo-text { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .site-logo-img { max-width: 120px; }
  .site-logo-text { font-size: 1rem; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover { color: white; }

.nav-cta {
  background: var(--color-accent);
  color: var(--color-primary-dark) !important;
  padding: 8px var(--space-sm);
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
  background: var(--color-accent-light) !important;
  transform: translateY(-1px);
}

/* ---- HERO SECTION ---- */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #8B0002 100%);
  color: white;
  padding: var(--space-2xl) var(--space-sm);
  text-align: center;
}

.hero h1 {
  font-size: var(--text-h1);
  color: white;
  margin-bottom: var(--space-sm);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-tagline {
  margin-top: var(--space-xl);
  font-size: var(--text-sm);
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* ---- SEARCH BOX ---- */
.search-box {
  background: var(--color-bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-lg) auto;
  max-width: 640px;
  box-shadow: var(--shadow-sm);
}

.search-box h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-h5);
}

.search-box input[type="search"],
.search-box select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input[type="search"]:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(116,0,1,0.12);
}

#results-count {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  display: block;
  text-align: right;
  margin-top: var(--space-xs);
}

/* ---- SECTIONS ---- */
section { margin: var(--space-xl) 0; }

section h2 {
  font-size: var(--text-h2);
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

/* ---- MAP ---- */
#map {
  height: 480px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  z-index: 0;
}

.map-tooltip {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ---- HOW IT WORKS ---- */
.how-it-works {
  background: var(--color-bg-secondary);
  padding: var(--space-xl) 0;
  margin: var(--space-xl) 0;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.how-step {
  text-align: center;
  padding: var(--space-md);
}

.how-step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.how-step h3 {
  font-size: var(--text-h5);
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.how-step p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ---- LOCATION CARDS ---- */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.location-card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.location-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.location-card:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.location-image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  padding: var(--space-sm);
  overflow: hidden;
  position: relative;
}

.location-content { padding: var(--space-md); }

.location-content h3 {
  font-size: var(--text-h5);
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.location-meta {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
  align-items: center;
}

.location-region {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.location-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

button.location-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  transition: color 0.15s;
}

button.location-link:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.badge-difficulty { background: #fef9e7; color: #b7950b; }
.badge-region     { background: #fdf2f2; color: var(--color-primary); }
.badge-tier       { background: #fef9e7; color: var(--color-accent-dark); }

/* ---- SKELETON LOADING ---- */
.skeleton-line, .loading-skeleton .location-image {
  background: linear-gradient(90deg, #ede9e4 25%, #f5f2ee 50%, #ede9e4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
}

.skeleton-title { width: 70%; height: 18px; }
.skeleton-short { width: 45%; }

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-text-secondary);
}

.no-results p   { margin-bottom: var(--space-md); font-size: 1.1rem; }

/* ---- INSTAGRAM SECTION ---- */
.instagram-section {
  background: var(--color-bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: var(--space-lg) 0;
}

.instagram-section p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-sm);
}

.instagram-item {
  aspect-ratio: 1;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.instagram-item:hover { transform: scale(1.04); }

/* ---- EMAIL CTA ---- */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: white;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  margin: var(--space-xl) 0;
}

.cta-section h3 {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: white;
  margin-bottom: var(--space-sm);
}

.cta-section p {
  margin-bottom: var(--space-md);
  opacity: 0.9;
}

.cta-trust {
  font-size: var(--text-xs);
  opacity: 0.65;
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

.cta-form {
  display: flex;
  gap: var(--space-xs);
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px var(--space-sm);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: var(--font-body);
}

.cta-form input:focus {
  outline: 3px solid rgba(255,255,255,0.5);
}

.cta-form button {
  padding: 12px var(--space-md);
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: background 0.15s, transform 0.15s;
}

.cta-form button:hover {
  background: var(--color-accent-light);
  transform: scale(1.02);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 12px var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover { background: var(--color-primary-light); }

.btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover { background: #fdf2f2; }

.btn-accent {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}
.btn-accent:hover { background: var(--color-accent-light); }

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); box-shadow: none; }

.btn-back {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  padding: var(--space-sm) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.btn-back:hover { color: var(--color-primary-light); text-decoration: underline; }

/* ---- MODAL ---- */
.modal-wrapper {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-wrapper.modal-visible { opacity: 1; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wrapper:not(.modal-visible) .modal-card { transform: translateY(20px); }

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0,0,0,0.45);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s;
}

.modal-close:hover { background: rgba(0,0,0,0.7); }

.modal-hero {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

.modal-hero-img { width: 100%; height: 100%; object-fit: cover; }

.modal-hero-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  gap: var(--space-xs);
}

.modal-hero-icon  { font-size: 2.5rem; }
.modal-hero-label { font-weight: 600; font-size: 1rem; text-align: center; padding: 0 var(--space-md); }

.modal-body { padding: var(--space-md); }

.modal-badges {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
  flex-wrap: wrap;
}

.modal-title {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.modal-film  { font-size: var(--text-xs); color: var(--color-text-light); margin-bottom: var(--space-sm); }
.modal-desc  { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; margin-bottom: var(--space-md); }

.modal-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.modal-actions .btn { flex: 1; text-align: center; font-size: var(--text-sm); }

/* ---- DETAIL PAGE ---- */
#detail-page { display: none; }

.detail-back {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.breadcrumb {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--color-text-light); }

.detail-hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
}

.detail-hero-img     { width: 100%; height: 100%; object-fit: cover; }

.detail-hero-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  gap: var(--space-sm);
  font-weight: 700;
}

.detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}

.detail-hero-badges { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.detail-title-block {
  padding: var(--space-md) 0 var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.detail-title-block h1 {
  font-size: var(--text-h2);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.detail-film { color: var(--color-text-light); font-size: var(--text-sm); }

/* Quick info grid */
.quick-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.quick-info-item { display: flex; align-items: flex-start; gap: var(--space-xs); }
.quick-info-icon { font-size: 1.2rem; flex-shrink: 0; }
.quick-info-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-light); font-weight: 600; }
.quick-info-value { display: block; font-size: var(--text-sm); color: var(--color-text-primary); }

/* Detail columns */
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin-bottom: var(--space-lg); }

.detail-section { margin-bottom: var(--space-lg); }

.detail-section h3 {
  font-size: var(--text-h5);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-border);
  font-family: var(--font-heading);
}

.detail-section p { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.7; }

.detail-tips {
  background: #fdf8f2;
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.detail-tips h3 { border-bottom-color: #f0e0c0; }

/* Characters */
.character-tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.character-tag {
  background: #fdf2f2;
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Photo gallery */
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-thumb:hover { transform: scale(1.02); }

.detail-gallery-placeholder {
  background: var(--color-bg-primary);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

/* Video */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--radius-md); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Related locations */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.related-card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.related-card-img {
  height: 120px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.related-card-body { padding: var(--space-sm); }
.related-card-body h4 { font-size: var(--text-sm); color: var(--color-primary); margin-bottom: var(--space-xs); }

/* Share buttons */
.share-buttons { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.share-btn {
  padding: 10px var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--font-body);
}

.share-btn:hover { border-color: var(--color-primary); background: #fdf2f2; }

.detail-footer {
  padding: var(--space-xl) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xl);
}

/* ---- LOADING + ERROR ---- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--color-text-light);
  gap: var(--space-md);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-state { text-align: center; padding: var(--space-xl); }
.error-state h2 { color: var(--color-primary); margin-bottom: var(--space-sm); }
.error-state p  { color: var(--color-text-secondary); margin-bottom: var(--space-md); }

/* ---- FOOTER ---- */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .site-logo { margin-bottom: var(--space-sm); display: inline-flex; }
.footer-brand .site-logo-img { max-width: 140px; filter: brightness(0) invert(1); } /* white version in dark footer */

.footer-brand p {
  font-size: var(--text-sm);
  color: #888;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.footer-badge {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }

.footer-col a {
  color: #888;
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color 0.15s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid #333;
  text-align: center;
  font-size: var(--text-xs);
  color: #666;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  :root {
    --text-h1: 32px;
    --text-h2: 26px;
    --text-h3: 22px;
  }

  .site-nav .nav-links { display: none; }

  .hero { padding: var(--space-xl) var(--space-sm); }

  .hero-actions { flex-direction: column; align-items: center; }

  .how-steps { grid-template-columns: 1fr; }

  .locations-grid { grid-template-columns: 1fr; }

  .cta-form { flex-direction: column; }
  .cta-form input, .cta-form button { width: 100%; min-width: unset; }

  #map { height: 320px; }

  .detail-columns { grid-template-columns: 1fr; }
  .detail-hero { height: 240px; }
  .detail-title-block h1 { font-size: var(--text-h3); }
  .quick-info-grid { grid-template-columns: 1fr 1fr; }

  .modal-card { margin: var(--space-sm); max-height: 85vh; }
  .modal-actions { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .quick-info-grid  { grid-template-columns: 1fr; }
  .share-buttons    { flex-direction: column; }
  .footer-grid      { grid-template-columns: 1fr; }
}

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

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
