/* =========================================================
   FESTIVAL SECTION — Local Video + Photo Gallery
   styles.festival.css — linked from all HTML pages
   ========================================================= */

/* ---- Year tab switcher ---- */
.festival-tabs {
  display: flex;
  gap: 2px;
  background: var(--color-fog);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-full);
  padding: 2px;
  width: fit-content;
  margin-bottom: var(--sp-48);
}

.festival-tab {
  font-size: var(--text-body);
  font-weight: var(--fw-medium);
  color: var(--color-steel);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.festival-tab.active {
  background: var(--color-midnight);
  color: var(--color-white);
}

.festival-panel {
  display: none;
  animation: fadePanel 0.25s ease;
}

.festival-panel.active {
  display: block;
}

/* ---- Local video grid ---- */
.local-video-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

.local-video-grid.grid-1 {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.local-video-grid.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.local-video-card {
  background: var(--color-white);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.local-video-card:hover {
  box-shadow: rgba(38,37,30,0.14) 0px 18px 36px 0px;
  transform: translateY(-3px);
}

.local-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #09090b;
  position: relative;
  overflow: hidden;
}

.local-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Shown when src file not yet added */
.local-video-placeholder {
  position: absolute;
  inset: 0;
  background: #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.local-video-placeholder svg {
  stroke: rgba(255,255,255,0.28);
  fill: none;
  stroke-width: 1.5;
  width: 48px;
  height: 48px;
}

.local-video-placeholder p {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
}

.local-video-placeholder span {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  font-family: monospace;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 3px 8px;
}

/* Hide placeholder once video loads */
.local-video-wrap.has-src .local-video-placeholder {
  display: none;
}

.local-video-info {
  padding: 16px 20px;
}

.local-video-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: #09090b;
  line-height: 1.4;
  margin-bottom: 3px;
}

.local-video-info p {
  font-size: 12px;
  color: #737373;
}

/* ---- Section sub-label ---- */
.festival-sub-label {
  font-size: 11px;
  font-weight: 500;
  color: #737373;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.festival-sub-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e4e4e7;
}

/* ---- Photo gallery grid ---- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.photo-gallery.gallery-wide {
  grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f5f5f5;
  border: 1px solid #e4e4e7;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: rgba(38,37,30,0.14) 0px 18px 36px 0px;
  z-index: 2;
}

/* First photo spans 2 columns — featured */
.gallery-item.featured {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f5f5f5;
}

.gallery-placeholder svg {
  width: 28px;
  height: 28px;
  stroke: #8c8c8c;
  fill: none;
  stroke-width: 1.5;
}

.gallery-placeholder span {
  font-size: 10px;
  color: #7d7c78;
  font-family: monospace;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 3px;
  padding: 2px 6px;
  text-align: center;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9,9,11,0.93);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  font-size: 22px;
  line-height: 1;
  transition: background 0.15s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.22);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .photo-gallery.gallery-wide {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .local-video-grid.grid-2 {
    grid-template-columns: 1fr;
  }
  .photo-gallery,
  .photo-gallery.gallery-wide {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-item.featured {
    grid-column: span 2;
  }
  .festival-tabs {
    width: 100%;
  }
  .festival-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .gallery-item.featured {
    aspect-ratio: 4/3;
  }
}
