/* ================================================================
   RPC — VIDEO GALLERY PAGE ONLY
   (base gallery classes rebuilt here since this page doesn't load
   gallery.css — it shares gallery-grid/gallery-item/gallery-filters
   markup but needed its own copy of the base rules)
   ================================================================ */

/* Filter pills — chunky, bouncy, gold when active */
.gallery-filters { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 44px; }
.gallery-filter-btn { padding: 11px 24px; background: var(--bg-white); border: 3px solid var(--border-light); border-radius: var(--radius-xl); font-family: var(--font-ui); font-size: 13px; font-weight: 800; color: var(--text-body); cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gallery-filter-btn:nth-child(3n+2) { border-color: var(--accent-light); }
.gallery-filter-btn:nth-child(3n+3) { border-color: var(--gold); }
.gallery-filter-btn:hover { border-color: var(--primary-light); color: var(--primary); transform: translateY(-3px) scale(1.05); }
.gallery-filter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--primary-dark); box-shadow: var(--shadow-md); }

/* Grid + tiles — colour-cycling thick borders, blobby corners */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 18px; }
.gallery-item {
  border-radius: 26px 26px 26px 6px;
  border: 3px solid;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  grid-row: span 1;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-item:nth-child(3n+1) { border-color: var(--primary-light); }
.gallery-item:nth-child(3n+2) { border-color: var(--accent-light); }
.gallery-item:nth-child(3n+3) { border-color: var(--gold); }
.gallery-item:nth-child(5n) { grid-row: span 2; }
.gallery-item:nth-child(7n) { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.gallery-item:hover { transform: translateY(-6px) rotate(-1deg) scale(1.03); box-shadow: var(--shadow-lg); z-index: 2; }
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,22,22,0) 40%, rgba(194,0,58,0.75) 100%); display: flex; align-items: flex-end; justify-content: flex-start; padding: 16px; opacity: 0; transition: opacity 0.3s; color: #fff; }
.gallery-overlay .gallery-view-icon { width: 38px; height: 38px; background: var(--gold); color: var(--primary-dark); border: 2px solid #fff; backdrop-filter: blur(6px); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-left: auto; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-view-icon { transform: rotate(20deg) scale(1.1); }

.gallery-empty { text-align: center; padding: 80px 0; color: var(--text-muted); }
.gallery-empty i { font-size: 48px; color: var(--border-mid); display: block; margin-bottom: 16px; }

/* VIDEO-SPECIFIC — bigger gold play button, playful title bar, rounded gold modal frame */
.video-item { cursor: pointer; }

.video-play-btn {
  width: 60px !important;
  height: 60px !important;
  background: var(--gold) !important;
  color: var(--primary-dark);
  font-size: 24px;
  margin: 0 auto !important;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.video-item:hover .video-play-btn { transform: scale(1.15) rotate(8deg); background: var(--primary) !important; color: #fff; }
.video-play-overlay { align-items: center !important; justify-content: center !important; }

.video-title-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(22,22,22,0.9));
  color: #fff;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  z-index: 1;
}

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(22,22,22,0.92);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.video-modal.active { display: flex; }
.video-modal-inner {
  width: 100%;
  max-width: 900px;
  position: relative;
}
.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 30px;
  border: 4px solid var(--gold);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.video-modal-frame iframe,
.video-modal-frame video {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: var(--gold);
  color: var(--primary-dark);
  border: 3px solid #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.video-modal-close:hover { transform: rotate(90deg) scale(1.1); }

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
  .gallery-item:nth-child(7n) { grid-column: span 1; }
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 14px; }
  .gallery-item:nth-child(5n) { grid-row: span 1; }
  .gallery-item:nth-child(7n) { grid-column: span 1; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 10px; }
  .video-modal-close { top: -40px; }
  .video-play-btn { width: 46px !important; height: 46px !important; font-size: 18px; }
}