/* ============================================================
   GALLERY.CSS — gallery.html only  (Modern Redesign)
   ============================================================ */

body {
  background: var(--bg);
}

/* ---- PAGE HERO ---- */
.page-hero {
  background: url("../assets/gallery_background.jpg") center/cover no-repeat;
  min-height: 90vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 9rem 60px 5rem;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    transparent 65%
  );
  z-index: 0;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}
.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 5px;
  color: var(--accent-light);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-light);
  display: inline-block;
}
.page-hero-content h1 {
  font-family: "Raleway", sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  color: #fff;
  line-height: 1;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -2px;
}
.page-hero-content h1 span {
  color: var(--accent-light);
}
.page-hero-content p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 540px;
}
.hero-stat-strip {
  display: flex;
  gap: 0;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hs-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.hs-item:first-child {
  padding-left: 0;
}
.hs-item:last-child {
  border-right: none;
}
.hs-num {
  font-family: "Raleway", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.hs-label {
  font-size: 0.58rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ---- GALLERY SECTION ---- */
.gallery-section {
  background: var(--bg);
  padding: 64px 50px 90px;
}
.gallery-section-inner {
  max-width: 1380px;
  margin: 0 auto;
}

/* ---- TAB BAR ---- */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 44px;
  flex-wrap: wrap;
  gap: 16px;
}
.main-tab-group {
  display: flex;
  gap: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px;
}
.main-tab {
  padding: 10px 32px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  transition: all 0.3s;
  font-family: "Inter", sans-serif;
}
.main-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(196, 98, 45, 0.35);
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-2);
  color: var(--text-dim);
  transition: all 0.25s;
  font-family: "Inter", sans-serif;
}
.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(196, 98, 45, 0.3);
}

/* ---- MASONRY GRID ---- */
.gallery-masonry {
  columns: 4;
  column-gap: 14px;
  column-fill: balance;
}
.g-item {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  background: var(--bg-3);
  display: block;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}
.g-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(196, 98, 45, 0.18);
}
.g-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.g-item:hover img {
  transform: scale(1.06);
}

/* overlay */
.g-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(18, 8, 4, 0.88) 0%,
    rgba(18, 8, 4, 0.2) 45%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}
.g-item:hover .g-item-overlay {
  opacity: 1;
}

.g-cat-tag {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 7px;
  width: fit-content;
}
.g-item-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
  line-height: 1.3;
  transform: translateY(8px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.g-item:hover .g-item-label {
  transform: translateY(0);
}

/* zoom icon */
.g-zoom-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--accent);
  z-index: 2;
}
.g-item:hover .g-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* hide old static label */
.g-item-static-label {
  display: none;
}

/* ---- VIDEO SECTION ---- */
.video-section {
  display: none;
}

/* ---- VIDEO GRID ---- */
.video-grid-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---- VIDEO CARD ---- */
.video-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}
.video-card.featured {
  grid-column: span 3;
}

/* thumbnail wrapper */
.video-thumb-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #0a0a0a;
}
.video-thumb-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
  filter: brightness(0.75);
}
.video-card:hover .video-thumb-wrap img {
  transform: scale(1.04);
  filter: brightness(0.55);
}

/* dark gradient scrim */
.video-thumb-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* play button */
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s,
    box-shadow 0.3s;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.video-play-btn svg {
  stroke: var(--accent);
  margin-left: 4px;
}
.video-card:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--accent);
  box-shadow: 0 12px 40px rgba(196, 98, 45, 0.5);
}
.video-card:hover .video-play-btn svg {
  stroke: #fff;
}

/* duration badge */
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

/* card label */
.video-card-label {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.video-card-title {
  font-family: "Raleway", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}
.video-card-sub {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

/* iframe embed (shown after click) */
.video-iframe-wrap {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
}
.video-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-card.playing .video-thumb-wrap {
  opacity: 0;
  pointer-events: none;
}
.video-card.playing .video-iframe-wrap {
  display: block;
}
.video-card.playing .video-card-label {
  display: none;
}
.video-card.playing {
  cursor: default;
}
.video-card.playing:hover {
  transform: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* close button (shown when playing) */
.video-close-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.video-card.playing .video-close-btn {
  display: flex;
}
.video-close-btn:hover {
  background: var(--accent);
}

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 6, 2, 0.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(20px);
}
.lightbox.active {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: lbIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lbIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  display: block;
}
.lightbox-caption {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-align: center;
}
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 32px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s,
    transform 0.3s;
}
.lightbox-close:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.lightbox-prev {
  left: 24px;
}
.lightbox-next {
  right: 24px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1200px) {
  .gallery-masonry {
    columns: 3;
  }
  .video-grid-wrap {
    grid-template-columns: repeat(2, 1fr);
  }
  .video-card.featured {
    grid-column: span 2;
  }
}
@media (max-width: 900px) {
  .gallery-masonry {
    columns: 2;
  }
}
@media (max-width: 768px) {
  .page-hero { padding: 5rem 16px 2.5rem; min-height: 52vh; }
  .page-hero-content h1 { font-size: clamp(2.2rem, 10vw, 3.5rem); letter-spacing: -1px; }
  .page-hero-content p { font-size: 0.88rem; }
  .hero-stat-strip { gap: 0; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; }
  .hs-item { padding: 0 14px; }
  .hs-item:first-child { padding-left: 0; }
  .hs-num { font-size: 1.3rem; }
  .hs-label { font-size: 0.52rem; }
  .gallery-section { padding: 24px 12px 48px; }
  .tab-bar { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 20px; }
  .main-tab-group { width: 100%; }
  .main-tab { flex: 1; text-align: center; padding: 10px 8px; font-size: 0.68rem; }
  .filter-pills { gap: 6px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-pill { padding: 7px 14px; font-size: 0.6rem; white-space: nowrap; flex-shrink: 0; }
  .gallery-masonry { columns: 2; column-gap: 8px; }
  .g-item { margin-bottom: 8px; border-radius: 10px; }
  .g-zoom-icon { opacity: 1; transform: scale(1); width: 30px; height: 30px; }
  .g-item-overlay { opacity: 1; background: linear-gradient(to top, rgba(18,8,4,0.7) 0%, transparent 55%); }
  .g-item-label { transform: translateY(0); font-size: 0.72rem; }
  .g-cat-tag { font-size: 0.46rem; padding: 2px 7px; }
  .video-grid-wrap { grid-template-columns: 1fr; gap: 14px; }
  .video-card.featured { grid-column: span 1; }
  .video-play-btn { width: 52px; height: 52px; }
  .video-card-title { font-size: 0.85rem; }
  .video-card-label { padding: 12px 14px 14px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-inner { max-width: 96vw; }
  .lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-prev, .lightbox-next { width: 42px; height: 42px; font-size: 1rem; }
}
@media (max-width: 480px) {
  .gallery-masonry { columns: 1; }
  .page-hero-content h1 { font-size: clamp(1.9rem, 11vw, 2.8rem); }
}
