/* ===================================================
   OUR-WORK.CSS — Gallery & Portfolio Page
   =================================================== */

/* ── Filter Bar ── */
.gallery-filter {
  background: var(--white);
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-btn {
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 2px solid var(--gray-200);
  color: var(--gray-600);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan-dark);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 14px rgba(5,187,193,.35);
}

/* ── Gallery Section ── */
.gallery-section { padding: 60px 0 100px; background: var(--gray-50); }

/* Masonry-style grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy);
  cursor: pointer;
  group: true;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.gallery-item:nth-child(3n+1):nth-last-child(-n+3):first-child,
.gallery-item.tall { grid-row: span 2; }
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.gallery-item.hidden { display: none; }

.gallery-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item.tall .gallery-img { height: 580px; }
.gallery-item:hover .gallery-img { transform: scale(1.06); }

/* Placeholder for missing images */
.gallery-placeholder {
  width: 100%;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  font-size: 3.5rem;
  gap: 12px;
}
.gallery-item.tall .gallery-placeholder { height: 580px; }
.gallery-placeholder span:last-child {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,47,87,.92) 0%, rgba(8,47,87,.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.gallery-overlay-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.gallery-overlay-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 56px; height: 56px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}
.gallery-item:hover .gallery-overlay-icon {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* ── Video Section ── */
.video-section {
  padding: 80px 0 100px;
  background: var(--white);
}
.video-header { text-align: center; margin-bottom: 56px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.video-card {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrapper video,
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.video-thumb {
  position: relative;
  cursor: pointer;
}
.video-thumb-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.video-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--navy);
  padding-left: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  transition: var(--transition);
}
.video-thumb:hover .video-play-btn {
  background: var(--cyan);
  color: white;
  transform: translate(-50%, -50%) scale(1.1);
}
.video-info {
  padding: 20px 22px;
  background: var(--navy-dark);
}
.video-info h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.video-info p {
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
}
.video-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 80px rgba(0,0,0,.8);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-caption {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  background: rgba(0,0,0,.5);
  padding: 10px 24px;
  border-radius: var(--radius-full);
}
.lightbox-caption h4 { font-family: var(--font-display); font-size: 1rem; }
.lightbox-caption p  { font-size: 0.8rem; color: rgba(255,255,255,.6); }

/* ── Stats Banner ── */
.work-stats {
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  padding: 60px 0;
}
.work-stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0;
  text-align: center;
}
.wstat {
  padding: 20px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.wstat:last-child { border-right: none; }
.wstat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 900;
  color: white;
}
.wstat-label { font-size: 0.82rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.tall { grid-row: span 1; }
  .gallery-item.tall .gallery-img { height: 280px; }
  .gallery-item.tall .gallery-placeholder { height: 280px; }
  .video-grid { grid-template-columns: 1fr; }
  .work-stats-grid { grid-template-columns: repeat(2,1fr); }
  .wstat { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
}
