/* ═══════════════════════════════════════════════════════════════
   Tarek Sabri — Lightbox & Video Modal CSS
═══════════════════════════════════════════════════════════════ */

/* ── Image Lightbox Overlay ─────────────────────────────────── */
.tarek-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}
.tarek-lightbox-overlay.active { opacity: 1; }

.tarek-lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tarek-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(201, 168, 76, 0.2);
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
  display: block;
  transition: opacity 0.2s;
}

.tarek-lightbox-caption {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted, #9a9080);
  letter-spacing: 0.1em;
  text-align: center;
}

.tarek-lightbox-close {
  position: fixed;
  top: 24px; right: 32px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold, #c9a84c);
  font-size: 1.6rem;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  z-index: 9001;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tarek-lightbox-close:hover { background: var(--gold, #c9a84c); color: #000; }

.tarek-lightbox-prev,
.tarek-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(10,10,10,0.8);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--gold, #c9a84c);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.tarek-lightbox-prev { left: 20px; }
.tarek-lightbox-next { right: 20px; }
.tarek-lightbox-prev:hover,
.tarek-lightbox-next:hover { background: var(--gold, #c9a84c); color: #000; border-color: var(--gold,#c9a84c); }

.tarek-lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted, #9a9080);
}

/* Zoom icon on gallery hover */
.gallery-item { cursor: pointer; }
.gallery-zoom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: rgba(201,168,76,0.2);
  border-radius: 50%;
  float: right;
}
.gallery-zoom svg { fill: var(--gold, #c9a84c); }

/* ── Video Grid & Cards ──────────────────────────────────────── */
.video-grid {
  display: grid;
  gap: 20px;
}
.video-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.video-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.video-card {
  background: var(--dark2, #1a1a1a);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--dark3, #222);
}
.video-card-nothumb {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--dark2,#1a1a1a), var(--dark3,#222));
}
.video-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s;
  filter: brightness(0.75);
}
.video-card:hover .video-card-thumb img {
  transform: scale(1.04);
  filter: brightness(0.6);
}

.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  background: var(--gold, #c9a84c);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(201,168,76,0.4);
}
.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 0 12px rgba(201,168,76,0.15);
}
.video-play-btn svg { width: 22px; height: 22px; fill: #000; margin-left: 3px; }

.video-play-btn--large {
  width: 80px; height: 80px;
}
.video-play-btn--large svg { width: 34px; height: 34px; }

.video-type-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.7);
  color: var(--gold, #c9a84c);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
}
.video-year-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--gold, #c9a84c);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
}

.video-card-info {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--dark3, #222);
}
.video-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white, #f5f0e8);
  margin-bottom: 4px;
  line-height: 1.3;
}
.video-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted, #9a9080);
  line-height: 1.5;
}

/* ── Featured Video ─────────────────────────────────────────── */
.video-featured { margin-bottom: 0; }
.video-featured-embed { position: relative; width: 100%; }
.video-featured-poster {
  position: relative;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.video-featured-poster::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
}
.video-featured-overlay {
  position: absolute;
  bottom: 32px; left: 40px; right: 40px;
  z-index: 2;
}
.video-featured-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--white, #f5f0e8);
  margin-bottom: 8px;
}
.video-featured-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #9a9080);
}

/* ── Video Modal (Lightbox for video) ───────────────────────── */
.tarek-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.tarek-video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.95);
  cursor: pointer;
}
.tarek-video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  z-index: 2;
}
.tarek-video-modal-close {
  position: absolute;
  top: -44px; right: 0;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold, #c9a84c);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.tarek-video-modal-close:hover { background: var(--gold,#c9a84c); color: #000; }
.tarek-video-modal-player { width: 100%; aspect-ratio: 16/9; background: #000; }
.tarek-video-modal-player iframe,
.tarek-video-modal-player video { width: 100%; height: 100%; }

/* ── Gallery grid extra classes ─────────────────────────────── */
.gallery-cinematic .gallery-item--featured { grid-column: span 2; grid-row: span 2; }
.gallery-cinematic .gallery-item--wide     { grid-column: span 2; }

.gallery-cols-2 { grid-template-columns: repeat(2,1fr); }
.gallery-cols-3 { grid-template-columns: repeat(3,1fr); }
.gallery-cols-4 { grid-template-columns: repeat(4,1fr); }
.gallery-cols-5 { grid-template-columns: repeat(5,1fr); }

/* Timeline image */
.timeline-img {
  width: 100%;
  max-width: 480px;
  margin: 12px 0;
  object-fit: cover;
  border: 1px solid rgba(201,168,76,0.15);
}

/* Films grid column overrides */
.films-grid--cols-2 { grid-template-columns: repeat(2,1fr); }
.films-grid--cols-3 { grid-template-columns: repeat(3,1fr); }
.films-grid--cols-4 { grid-template-columns: repeat(4,1fr); }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .video-grid--cols-3,
  .video-grid--cols-4 { grid-template-columns: repeat(2,1fr); }
  .video-grid--cols-2 { grid-template-columns: 1fr; }
  .tarek-lightbox-prev { left: 8px; }
  .tarek-lightbox-next { right: 8px; }
  .video-featured-overlay { left:16px; right:16px; bottom:16px; }
  .video-featured-title { font-size:1.4rem; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr !important; }
  .gallery-cols-3, .gallery-cols-4, .gallery-cols-5 { grid-template-columns: repeat(2,1fr); }
}
