/* ================================================
   BANGPOT — On Site (Photo Series) Styles
   Shared components (header, nav, hero, buttons)
   come from style.css. This file is on-site-specific only.
   ================================================ */

/* ================================================
   ON SITE — month select + sort toggle
   (sits in the reused .time-filters row, matches chip look)
   ================================================ */
.onsite-month-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-dark);
  cursor: pointer;
  font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b6b6b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* ================================================
   HERO — custom banner background, logo + centered text
   ================================================ */
.onsite-hero {
  position: relative;
  background: var(--color-dark);
  color: var(--color-hero-text);
  padding: var(--space-10) var(--space-4) var(--space-8);
  overflow: hidden;
  text-align: center;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.onsite-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.onsite-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 0.5) 0%,
    rgba(13, 13, 13, 0.3) 45%,
    rgba(13, 13, 13, 0.72) 100%
  );
  z-index: 1;
}

.onsite-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  max-width: 720px;
}

.onsite-hero-logo {
  width: clamp(280px, 72vw, 520px);
  height: auto;
}

.onsite-hero p {
  color: var(--color-white);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

/* ================================================
   GRID — 1 card per row mobile, 2 per row desktop
   ================================================ */
.onsite-grid {
  padding: var(--space-4) var(--space-4) var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ================================================
   CARD — series cover photo on top (portrait), the
   real map event card in a white slab overlapping it
   ================================================ */
.onsite-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.onsite-card {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.onsite-card-link:hover .onsite-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.onsite-card-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-dark);
}

.onsite-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.onsite-card-link:hover .onsite-card-photo {
  transform: scale(1.03);
}

.onsite-card-photo-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a2e1a 100%);
}

/* White slab holding the real map card, overlapping the photo bottom */
.onsite-card-slab {
  position: relative;
  margin-top: -28px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
}

/* Keep the On Site index card a fixed height: the venue line must truncate the
   same way the title does, so a long "Venue Soi 33 · Neighborhood" never wraps
   and pushes the card taller than the others. Scoped to the index card only. */
.onsite-card-slab .map-card-content {
  min-width: 0;
}
.onsite-card-slab .map-card-meta {
  flex-wrap: nowrap;
  min-width: 0;
}
.onsite-card-slab .map-card-venue-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ================================================
   SKELETON + EMPTY STATE
   ================================================ */
.onsite-card-skeleton {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
}

/* ================================================
   SERIES DETAIL PAGE
   ================================================ */

/* ── HERO — full-bleed cover photo, no map texture ── */
.series-hero {
  --eventcard-h: 144px;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background: var(--color-dark);
}

.series-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13, 13, 13, 0.55) 0%,
    rgba(13, 13, 13, 0.35) 40%,
    rgba(13, 13, 13, 0.55) 100%
  );
}

.series-hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-8) var(--space-4);
  /* Nudge the host group up so it centres between the hero top and the card top */
  transform: translateY(-64px);
}

.series-hero-title {
  color: var(--color-white);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.series-hero-intro {
  color: var(--color-bg);
  opacity: 0.8;
  font-size: var(--text-base);
  line-height: 1.5;
  max-width: 640px;
}

/* ORGANIZED BY: premium frosted host cards, centered over the hero photo */
.series-hero-hosts {
  margin-top: var(--space-8);
  text-align: center;
}

.series-hero-hosts-label {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--space-5);
}

.series-hero-hosts-grid {
  display: flex;
  gap: var(--space-4);
  /* Mobile: horizontal scroll row, swipe to see all hosts. Centred when they fit. */
  justify-content: flex-start;
  overflow-x: auto;
  padding: 0 var(--space-4) var(--space-2);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.series-hero-hosts-grid::-webkit-scrollbar { display: none; }
.series-host-card { scroll-snap-align: center; flex-shrink: 0; }
/* Centre the row when the cards actually fit (few hosts) */
.series-hero-hosts-grid { justify-content: safe center; }

.series-host-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  width: 150px;
  padding: var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius-xl);
  /* Semi-transparent frosted white: premium, slightly see-through over the photo */
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background 0.2s ease;
}

.series-host-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
}

.series-host-card-logo, .series-host-card-logo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid var(--color-gray-light);
  background: var(--color-gray-bg);
  box-shadow: var(--shadow-sm);
}

.series-host-card-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.2;
}

.series-host-card-area {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray);
  text-align: center;
  line-height: 1.2;
}

/* EVENT CARD AS HERO TITLE: reuses the real .map-card-event, enlarged.
   Sits so its vertical centre lands on the hero/page seam (half over the photo,
   half over the page). translateY(-50%) lifts it by exactly half its own height;
   the negative margin-bottom removes the equivalent flow space so the page below
   does not gap. Both use the same fixed slab min-height so they stay in sync. */
.series-hero-eventcard-wrap {
  --eventcard-h: 144px;
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  transform: translateY(-50%);
  margin-bottom: calc(-1 * var(--eventcard-h) / 2);
}

.series-hero-eventcard-slab {
  margin-top: 0;
  min-height: var(--eventcard-h);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
}

.series-hero-eventcard-slab .map-card-event {
  width: 100%;
}

/* Enlarge the real map card so it reads as a hero title (base lives in map.css) */
.series-hero-eventcard-slab .map-card-event {
  gap: var(--space-3);
  align-items: center;
}

.series-hero-eventcard-slab .map-card-img,
.series-hero-eventcard-slab .map-card-img-placeholder {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
}

.series-hero-eventcard-slab .map-card-title {
  font-size: var(--text-base);
  /* Hero card title wraps to two lines instead of truncating */
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.series-hero-eventcard-slab .map-card-venue-name {
  font-size: var(--text-sm);
}

.series-hero-eventcard-slab .map-card-time,
.series-hero-eventcard-slab .map-card-cta {
  font-size: var(--text-sm);
}

@media (min-width: 1024px) {
  .series-hero { --eventcard-h: 160px; }
  .series-hero-hosts { margin-top: var(--space-10); }
  .series-host-card { width: 180px; }
  .series-host-card-logo, .series-host-card-logo-placeholder { width: 112px; height: 112px; }

  .series-hero-eventcard-wrap { max-width: 540px; --eventcard-h: 160px; }
  .series-hero-eventcard-slab .map-card-img,
  .series-hero-eventcard-slab .map-card-img-placeholder { width: 100px; height: 100px; }
  .series-hero-eventcard-slab .map-card-title { font-size: var(--text-xl); }
}
.series-participants-section {
  padding: var(--space-3) var(--space-4) 0;
}

.series-participants-label {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray);
  margin-bottom: var(--space-3);
}

.series-participants-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.series-participant-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  width: 84px;
}

.series-participant-logo, .series-participant-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--color-gray-light);
  background: var(--color-gray-bg);
}

.series-participant-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.2;
}

.series-participant-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ── EVENT LINK ── */
.series-event-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: var(--space-6) var(--space-4) 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

/* ── PHOTO GRID ── */
.series-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: var(--space-3) var(--space-4) var(--space-6);
}

.series-photo-item {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.series-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-photo-item.featured::after {
  content: "★";
  position: absolute;
  top: 6px;
  right: 6px;
  color: #f5c518;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ── RELATED SERIES ── */
.series-related-section {
  padding: var(--space-8) var(--space-4) var(--space-16);
  border-top: 1px solid var(--color-gray-light);
  margin-top: var(--space-8);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-counter {
  position: absolute;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 20px;
  cursor: pointer;
}

.lightbox-arrow {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

.lightbox-nav-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 900px;
  padding: 0 var(--space-4);
}

.lightbox-caption-area {
  max-width: 640px;
  padding: var(--space-4);
  text-align: center;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.lightbox-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-3);
}

.lightbox-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.lightbox-download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lightbox-ig-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.lightbox-usage-link {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-xs);
  text-decoration: underline;
  text-underline-offset: 2px;
  align-self: center;
}
.lightbox-usage-link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.series-usage-note {
  text-align: center;
  color: var(--color-gray, #777);
  font-size: var(--text-sm);
  margin: var(--space-6) auto 0;
  max-width: 520px;
  line-height: 1.5;
}
.series-usage-note a {
  color: var(--color-primary);
  font-weight: 600;
  text-underline-offset: 2px;
}

/* In-app browser banner (Instagram/Facebook/etc) */
.inapp-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-dark, #0d0d0d);
  color: #fff;
  font-size: var(--text-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}
.inapp-banner-text { line-height: 1.35; }
.inapp-banner-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.inapp-banner-open {
  background: var(--color-primary, #009d53);
  color: #fff;
  border: none;
  border-radius: var(--radius-full, 999px);
  padding: 6px 14px;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.inapp-banner-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* Save-hint / browser-hint toast (shown to in-app users) */
.save-hint-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(12px);
  background: var(--color-primary, #009d53);
  color: #fff;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  width: calc(100% - 40px);
  max-width: 360px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-sizing: border-box;
}
.save-hint-toast.save-hint-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================================================
   DESKTOP — index page (2-column grid)
   ================================================ */
@media (min-width: 1024px) {
  .onsite-hero {
    min-height: 400px;
    padding: var(--space-14) var(--space-8) var(--space-12);
  }

  .onsite-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    padding: var(--space-4) var(--space-8) var(--space-16);
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* ================================================
   DESKTOP — detail page
   ================================================ */
@media (min-width: 1024px) {
  .series-hero { min-height: 460px; }
  .series-hero-content { padding: var(--space-12) var(--space-8); max-width: 1200px; margin: 0 auto; width: 100%; }

  .series-participants-section,
  .series-event-link,
  .series-photo-grid,
  .series-related-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  .series-photo-grid { grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
}