/* ============================================================
   Smart Coaching Centre — Gallery Page Styles
   ============================================================ */

/* ── FILTER TABS ───────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}
.gf-btn {
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem; font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-white);
  transition: var(--ease);
  cursor: pointer;
}
.gf-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.gf-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26,75,140,0.3);
}

/* ── GALLERY GRID ──────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Gallery Item */
.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}
/* Make some items span 2 columns for variety */
.gallery-item:nth-child(4n+1) { grid-column: span 1; }
.gallery-item:nth-child(7n+3) { grid-column: span 2; }

.gi-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-xs);
  transition: var(--ease);
}
.gallery-item:nth-child(7n+3) .gi-wrap { aspect-ratio: 16/7; }

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

/* Overlay */
.gi-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,29,58,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
}
.gallery-item:hover .gi-overlay { opacity: 1; }

.gi-zoom {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255,255,255,0.4);
  color: #fff; font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .gi-zoom { transform: translate(-50%, -50%) scale(1); }
.gi-zoom:hover { background: rgba(255,255,255,0.35); }

.gi-cat {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  transition: var(--ease-fast);
  position: absolute; bottom: 12px; left: 12px;
}
.gi-cat:hover { background: rgba(0,0,0,0.6); }

.gi-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  padding: 0 4px;
  line-height: 1.4;
}

/* Empty State */
.gallery-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.gallery-empty i  { font-size: 4rem; margin-bottom: 20px; opacity: 0.25; }
.gallery-empty h3 { color: var(--text-dark); margin-bottom: 8px; }

/* ── LIGHTBOX ──────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(8, 15, 30, 0.95);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lb-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.gi-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 1.1rem;
  pointer-events: none; z-index: 1;
}
.lightbox #lbImg,
.lightbox #lbVideo {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease;
}
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  color: #fff; font-size: 1.1rem;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--ease);
  backdrop-filter: blur(8px);
}
.lb-close { top: 20px; right: 20px; font-size: 1.3rem; }
.lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.1);
}
.lb-prev:hover { transform: translateY(-50%) scale(1.1); }
.lb-next:hover { transform: translateY(-50%) scale(1.1); }
.lb-counter {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  letter-spacing: 1px;
}
.lb-caption {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  text-align: center;
  max-width: 600px;
  line-height: 1.5;
  min-height: 22px;
}

/* ── RESPONSIVE (Images) ────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(7n+3) { grid-column: span 1; }
  .gallery-item:nth-child(7n+3) .gi-wrap { aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 14px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 12px; right: 12px; }
}

/* ── GALLERY SECTION HEADERS ───────────────────────────────── */
.gallery-section-header {
  text-align: center;
  margin-bottom: 36px;
}
.gallery-section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.gallery-section-title i {
  color: var(--primary);
  font-size: 1.6rem;
}
.gallery-section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── SEE MORE BUTTON ────────────────────────────────────────── */
.see-more-wrap {
  text-align: center;
  margin-top: 36px;
}
.btn-see-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ease);
  letter-spacing: 0.3px;
}
.btn-see-more:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,75,140,0.25);
}
.btn-see-more i {
  transition: transform 0.3s ease;
}
.btn-see-more.expanded i {
  transform: rotate(180deg);
}

/* Hidden items (before See More is clicked) */
.g-hidden {
  display: none !important;
}

/* ── VIDEOS SECTION ─────────────────────────────────────────── */
.section-videos {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}

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

/* ── VIDEO CARD ─────────────────────────────────────────────── */
.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.vc-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  box-shadow: var(--shadow-xs);
  transition: var(--ease);
}
.video-card:hover .vc-wrap {
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}
.vc-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.video-card:hover .vc-thumb { opacity: 0.7; }

/* Play overlay */
.vc-overlay {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.15);
  transition: background 0.3s ease;
}
.video-card:hover .vc-overlay { background: rgba(0,0,0,0.3); }

.vc-play-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  color: var(--primary);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  padding-left: 3px; /* optical center for play icon */
}
.video-card:hover .vc-play-btn {
  transform: scale(1.12);
  background: #fff;
}

.vc-cat {
  position: absolute;
  bottom: 10px; left: 10px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--gold);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.vc-title {
  font-size: 0.88rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.4;
  padding: 0 2px;
  text-align: center;
}

/* ── VIDEO MODAL ────────────────────────────────────────────── */
.video-modal {
  position: fixed; inset: 0;
  background: rgba(8,15,30,0.95);
  backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.video-modal.open {
  opacity: 1;
  pointer-events: all;
}
.vm-close {
  position: fixed;
  top: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--ease);
  backdrop-filter: blur(8px);
  z-index: 10001;
}
.vm-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); }

.vm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 88vw;
}
#vmPlayer {
  max-width: 88vw;
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  background: #000;
}
.vm-caption {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  text-align: center;
  max-width: 560px;
  line-height: 1.5;
  min-height: 20px;
}

/* ── VIDEOS RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; gap: 14px; }
  .gallery-section-title { font-size: 1.5rem; }
  #vmPlayer { max-width: 95vw; max-height: 55vh; }
}
