/* ==========================================================================
   Venues Page
   ========================================================================== */

.venues-page { padding: 0; }

/* ---- Map hero ---- */
.venues-map-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  max-height: 680px;
}

#venues-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(23,23,56,0.88) 0%,
    rgba(23,23,56,0.45) 30%,
    rgba(23,23,56,0.1) 60%,
    transparent 100%
  );
  z-index: 2;
  pointer-events: none;
}

.map-content {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  padding: 2rem;
  pointer-events: none;
  text-align: center;
}

.map-content > * { pointer-events: auto; }

.map-content h1 {
  color: var(--scne-white);
  font-family: var(--scne-font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.map-content > p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ---- Search box ---- */
.venues-search-box {
  max-width: 480px;
  margin: 0 auto;
  background: var(--scne-white);
  border-radius: 60px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.venues-search-box .search-icon { font-size: 1.2rem; color: #94a3b8; flex-shrink: 0; }

.venues-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--scne-font-body);
  font-size: 1rem;
  color: var(--scne-navy);
  text-transform: uppercase;
  outline: none;
  min-width: 0;
  padding: 0.75rem 0.25rem;
}

.venues-search-box input::placeholder { text-transform: none; color: #94a3b8; }

.venues-search-box button {
  background: var(--scne-red);
  color: var(--scne-white);
  border: none;
  border-radius: 50px;
  padding: 0.85rem 1.75rem;
  font-family: var(--scne-font-body);
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.venues-search-box button:hover  { background: var(--scne-red-dark); transform: scale(1.02); }
.venues-search-box button:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

.search-status {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--scne-white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  min-height: 1.2em;
}
.search-status.error { color: #fca5a5; }

/* ---- Results bar ---- */
.results-bar {
  background: var(--scne-navy-light);
  border-bottom: 1px solid rgba(255,217,125,0.12);
  padding: 2rem 2rem 1.25rem;
  text-align: center;
}

.results-bar h2 {
  font-family: var(--scne-font-heading);
  font-size: 2.2rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
}

.results-bar p {
  color: var(--scne-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

/* ---- Cards section ---- */
.venues-cards-section {
  background: var(--scne-navy-light);
  padding: 2rem 2rem 3rem;
}

.venues-empty {
  text-align: center;
  color: var(--scne-text-muted);
  padding: 3rem 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ---- Horizontal venue row cards ---- */
.venues-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.venue-row-card {
  display: flex;
  background: var(--scne-white);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--scne-navy);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.venue-row-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
}

/* Image column */
.vrc-image {
  width: 160px;
  min-height: 140px;
  flex-shrink: 0;
  position: relative;
  background: #e8edf5;
  overflow: hidden;
}

.vrc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.venue-row-card:hover .vrc-image img { transform: scale(1.05); }

.venue-ph {
  width: 100%;
  height: 100%;
  min-height: 140px;
  background: linear-gradient(135deg, #e8edf5, #d0d8e8);
  border: none;
}

.venue-ph .ph-icon { font-size: 2rem; opacity: 0.4; }

/* Badge */
.venue-card-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--scne-gold);
  color: var(--scne-navy);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  z-index: 1;
}

/* Body */
.vrc-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vrc-body h3 {
  font-family: var(--scne-font-heading);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  color: var(--scne-navy);
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.venue-dist-badge {
  background: var(--scne-gold);
  color: var(--scne-navy);
  font-family: var(--scne-font-body);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.vrc-address {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

/* Chips on light card */
.vrc-body .venue-chips { margin-bottom: 0.75rem; }

.vrc-body .venue-chip {
  background: rgba(219,84,97,0.08);
  border: 1px solid rgba(219,84,97,0.2);
  color: var(--scne-red-dark);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.vrc-cta {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--scne-navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}

.venue-row-card:hover .vrc-cta { text-decoration: underline; }

/* ---- Booking / upcoming section ---- */
.venues-booking-section {
  padding: 4rem 2rem;
  background: var(--scne-navy);
}

.venues-booking-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Camp dates fallback grid ---- */
.camp-dates-fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.scne-camp-date-card {
  background: var(--scne-navy-light);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.scne-camp-date-card[href]:hover {
  border-color: rgba(255,217,125,0.3);
  transform: translateY(-3px);
}

.scne-camp-date-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

.scne-camp-date-card h4 {
  font-family: var(--scne-font-heading);
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
}

.scne-camp-date-card p {
  font-size: 0.9rem;
  color: var(--scne-text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.scne-camp-date-cta {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--scne-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Map markers ---- */
.scne-venue-marker {
  background: var(--scne-gold);
  border: 2px solid var(--scne-navy);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--scne-navy);
  font-family: var(--scne-font-body);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.user-marker {
  background: var(--scne-red);
  border: 3px solid var(--scne-white);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { margin: 10px 14px; font-family: var(--scne-font-body); font-size: 0.9rem; }
.leaflet-popup-content strong { font-family: var(--scne-font-heading); font-size: 1.1rem; display: block; margin-bottom: 2px; }
.leaflet-popup-content a {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--scne-gold);
  color: var(--scne-navy);
  padding: 0.35rem 0.8rem;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
}
.leaflet-popup-content a:hover { background: var(--scne-gold-dark); }

/* ---- Single venue page ---- */
.single-venue-hero {
  position: relative;
  height: 360px;
  background: var(--scne-navy-mid);
  overflow: hidden;
  /* Contain the Leaflet map z-index within this element */
  isolation: isolate;
}

.single-venue-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}

.single-venue-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(23,23,56,0.95) 40%, rgba(23,23,56,0.4) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2.5rem 0;
  z-index: 2;
}

.single-venue-hero-content h1 { font-size: clamp(2.2rem, 4vw, 4rem); margin-bottom: 0.5rem; }
.single-venue-hero-content p  { color: var(--scne-text-muted); font-size: 1rem; font-weight: 600; }

/* Body grid */
.single-venue-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

/* Main column blocks */
.svenue-block { margin-bottom: 2.5rem; }
.svenue-block:last-child { margin-bottom: 0; }

.svenue-heading {
  font-family: var(--scne-font-heading);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  color: var(--scne-white);
}

.svenue-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.svenue-photo {
  border-radius: 8px;
  overflow: hidden;
  height: 160px;
}

.svenue-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.svenue-photo:hover img { transform: scale(1.04); }

/* Sidebar cards */
.single-venue-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 120px; /* header height + a little breathing room */
}

.svsb-card {
  background: var(--scne-navy-light);
  border: 1px solid rgba(255,217,125,0.15);
  border-radius: 12px;
  overflow: hidden;
  /* Critical: contain Leaflet map within card, below site header z-index */
  isolation: isolate;
}

.svsb-map {
  height: 200px;
  width: 100%;
  position: relative;
  z-index: 1; /* stays inside isolation context, never bleeds above header */
}

.svsb-card-body {
  padding: 1.25rem 1.5rem;
}

.svsb-card-body h3,
.svsb-card--padded h3 {
  font-family: var(--scne-font-heading);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--scne-gold);
  margin-bottom: 0.75rem;
}

.svsb-card-body p,
.svsb-card--padded > p {
  font-size: 0.88rem;
  color: var(--scne-text-muted);
  font-weight: 600;
  line-height: 1.5;
}

.svsb-card--padded {
  padding: 1.25rem 1.5rem;
}

.svsb-back-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--scne-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.svsb-back-link:hover { color: var(--scne-gold); }

/* Responsive */
@media (max-width: 900px) {
  .single-venue-body { grid-template-columns: 1fr; }
  .single-venue-sidebar { position: static; }
  .svenue-photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .single-venue-hero { height: 260px; }
  .svenue-photo-grid { grid-template-columns: 1fr 1fr; }
  .svenue-photo:last-child { display: none; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .venues-map-hero { height: 65vh; min-height: 420px; }
  .map-content { padding: 1rem; }
  .venues-search-box { border-radius: 12px; flex-wrap: wrap; padding: 0.75rem; }
  .venues-search-box input { width: 100%; text-align: center; font-size: 1rem; }
  .venues-search-box button { width: 100%; padding: 0.8rem; border-radius: 8px; }
  .venues-list { grid-template-columns: 1fr; }
  .vrc-image { width: 110px; }
  .vrc-body { padding: 1rem 1.25rem; }
  .single-venue-body { grid-template-columns: 1fr; }
  .single-venue-hero { height: 260px; }
}

@media (max-width: 480px) {
  .vrc-image { width: 90px; min-height: 120px; }
  .vrc-body h3 { font-size: 1.1rem; }
}
