/* ===== JKA Photo Gallery — albums, photos, videos ===== */
/* Note: this file previously held unused/orphaned "hero carousel" styles for a
   homepage feature that was never wired into any page (jka-hero-carousel etc.,
   confirmed unreferenced anywhere) — replaced with the real gallery.php page
   styles below, since the filename already matches this page per convention. */

.jka-gal-intro { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.jka-gal-intro p { color: var(--evt-text-soft, #6B7280); font-size: 1rem; line-height: 1.7; margin-top: 8px; }

/* Year filter tabs */
.jka-gal-year-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.jka-gal-year-tab {
    padding: 8px 22px; border-radius: 50px; font-size: .84rem; font-weight: 700;
    letter-spacing: .3px; border: 2px solid var(--evt-border); background: #fff;
    color: var(--evt-text-soft, #6B7280); cursor: pointer; text-decoration: none; transition: all .2s;
}
.jka-gal-year-tab:hover, .jka-gal-year-tab.active { background: var(--jka-gold-shine); border-color: var(--jka-gold); color: var(--jka-black); text-decoration: none; }

/* Album grid */
.jka-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-bottom: 20px; }
.jka-album-card {
    border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.08);
    cursor: pointer; transition: transform .25s, box-shadow .25s; background: #fff;
    border: 1px solid var(--evt-border);
}
.jka-album-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.jka-album-cover { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .4s; background: var(--jka-offwhite); }
.jka-album-card:hover .jka-album-cover { transform: scale(1.04); }
.jka-album-info { padding: 16px 18px; }
.jka-album-year-badge { display: inline-block; background: var(--jka-gold-shine); color: var(--jka-black); border-radius: 50px; padding: 2px 12px; font-size: .72rem; font-weight: 800; margin-bottom: 8px; }
.jka-album-name { font-size: 1rem; font-weight: 800; color: var(--jka-black); margin-bottom: 4px; }
.jka-album-meta { font-size: .8rem; color: #918a7a; }

/* Photo grid (inside an expanded album, or flat) */
.jka-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.jka-photo-item { border-radius: 8px; overflow: hidden; cursor: pointer; position: relative; }
.jka-photo-item img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .35s; background: var(--jka-offwhite); }
.jka-photo-item:hover img { transform: scale(1.06); }
.jka-photo-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.45);
    display: flex; align-items: flex-end; opacity: 0; transition: opacity .25s; padding: 12px;
}
.jka-photo-item:hover .jka-photo-overlay { opacity: 1; }
.jka-photo-caption { color: #fff; font-size: .8rem; font-weight: 600; line-height: 1.3; flex: 1; }

.jka-photo-dl-btn {
    position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(6px); border: 1.5px solid rgba(255,255,255,.5);
    display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; z-index: 10;
    opacity: 0; transition: opacity .25s, background .2s, transform .2s; text-decoration: none;
}
.jka-photo-item:hover .jka-photo-dl-btn { opacity: 1; }
.jka-photo-dl-btn:hover { background: var(--jka-red-shine); border-color: var(--jka-red); transform: scale(1.12); color: #fff; }
.jka-photo-dl-btn.loading { pointer-events: none; }
.jka-photo-dl-btn .dl-spin { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: jka-dl-spin .7s linear infinite; }
.jka-photo-dl-btn.loading i { display: none; }
.jka-photo-dl-btn.loading .dl-spin { display: block; }
@keyframes jka-dl-spin { to { transform: rotate(360deg); } }

/* Back button + album header */
.jka-gal-back-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: 50px;
    border: 2px solid var(--jka-black); color: var(--jka-black); font-weight: 700; font-size: .84rem;
    cursor: pointer; text-decoration: none; background: transparent; transition: all .2s; margin-bottom: 30px;
}
.jka-gal-back-btn:hover { background: var(--jka-black-shine); color: #fff; text-decoration: none; }
.jka-album-view-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.jka-album-view-header h3 { margin: 0; color: var(--jka-black); font-weight: 800; }
.jka-album-view-header p { margin: 0; color: #918a7a; font-size: .88rem; }

/* Video grid */
.jka-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.jka-video-card { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.08); cursor: pointer; transition: transform .25s, box-shadow .25s; background: #fff; border: 1px solid var(--evt-border); }
.jka-video-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.jka-video-thumb-wrap { position: relative; overflow: hidden; }
.jka-video-thumb-wrap img { width: 100%; height: 170px; object-fit: cover; display: block; }
.jka-video-play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 52px; height: 52px;
    border-radius: 50%; background: var(--jka-red-shine); display: flex; align-items: center; justify-content: center;
    transition: background .2s, transform .2s;
}
.jka-video-card:hover .jka-video-play-btn { transform: translate(-50%,-50%) scale(1.1); }
.jka-video-play-btn i { color: #fff; font-size: 1.1rem; margin-left: 3px; }
.jka-video-info { padding: 14px 16px; }
.jka-video-title { font-size: .92rem; font-weight: 700; color: var(--jka-black); margin-bottom: 4px; line-height: 1.3; }
.jka-video-desc { font-size: .79rem; color: #918a7a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Video modal */
.jka-video-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.jka-video-modal-overlay.open { display: flex; }
.jka-video-modal-inner { position: relative; width: 100%; max-width: 900px; }
.jka-video-modal-close { position: absolute; top: -42px; right: 0; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }
.jka-video-modal-inner iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; }

/* Photo lightbox (custom, no external plugin) */
.jka-lightbox { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 16px; }
.jka-lightbox.open { display: flex; }
.jka-lightbox img { max-width: 100%; max-height: 88vh; border-radius: 8px; object-fit: contain; }
.jka-lightbox-cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: .85rem; }
.jka-lightbox-close { position: fixed; top: 18px; right: 22px; color: #fff; font-size: 30px; cursor: pointer; background: none; border: none; line-height: 1; }
.jka-lightbox-nav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 22px; padding: 12px 16px; cursor: pointer; border-radius: 10px; }
.jka-lightbox-nav:hover { background: rgba(255,255,255,.28); }
.jka-lightbox-nav.prev { left: 12px; }
.jka-lightbox-nav.next { right: 12px; }

@media (max-width: 560px) {
    .jka-album-grid, .jka-photo-grid, .jka-video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .jka-album-cover, .jka-photo-item img { height: 140px; }
}
