/* ================================================================
   RPC — GALLERY PAGE ONLY
   ================================================================ */

/* GALLERY PAGE */
.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: 1.5px solid var(--border-light); border-radius: var(--radius-xl); font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: var(--text-body); cursor: pointer; transition: all 0.25s; }
.gallery-filter-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.gallery-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 18px; }
.gallery-item { border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0; overflow: hidden; position: relative; cursor: pointer; grid-row: span 1; }
.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-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,10,19,0) 40%, rgba(28,10,19,0.82) 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: rgba(255,255,255,0.18); backdrop-filter: blur(6px); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-left: auto; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover .gallery-overlay { opacity: 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; }

/* ================================================================
   ADDON — KIDS THEME (gallery page)
   ================================================================ */

/* Filter pills — chunky, bouncy, gold when active */
.gallery-filter-btn {
  border-width: 3px;
  border-radius: var(--radius-xl);
  font-weight: 800;
  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 { 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); }

/* Photo tiles — colour-cycling thick borders, blobby corners, star sticker on hover */
.gallery-item {
  border-radius: 26px 26px 26px 6px;
  border: 3px solid;
  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:hover { transform: translateY(-6px) rotate(-1deg) scale(1.03); box-shadow: var(--shadow-lg); z-index: 2; }
.gallery-overlay { background: linear-gradient(180deg, rgba(22,22,22,0) 40%, rgba(194,0,58,0.75) 100%); }
.gallery-overlay .gallery-view-icon { background: var(--gold); color: var(--primary-dark); border: 2px solid #fff; }
.gallery-item:hover .gallery-view-icon { transform: rotate(20deg) scale(1.1); }

/* ================================================================
   RESPONSIVE — gallery decorative borders (had no breakpoints)
   ================================================================ */
@media (max-width: 480px) {
  .gallery-filter-btn { padding: 8px 16px; font-size: 12px; border-width: 2px; }
  .gallery-item { border-width: 2px; border-radius: 18px 18px 18px 4px; }
}


/* ================================================================
   ABSOLUTE FINAL FIX — .gallery-grid MUST collapse columns on
   mobile/tablet. This file's own unconditional 4-column definition
   (no media query) was overriding common.css's responsive rules.
   Must stay LAST in file.
   ================================================================ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr) !important; grid-auto-rows: 180px !important; }
  .gallery-item:nth-child(7n) { grid-column: span 1 !important; }
}
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; grid-auto-rows: 160px !important; gap: 14px !important; }
  .gallery-item:nth-child(5n) { grid-row: span 1 !important; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; grid-auto-rows: 130px !important; gap: 10px !important; }
}