/* ==========================================================================
   XJMU /gallery page (Phase 4) — depends on design-system.css tokens.
   Class names preserved (lightbox + scroll-spy JS depend on them).
   ========================================================================== */

/* ---------- hero ---------- */
.gallery-hero {
    background: linear-gradient(150deg, rgba(11,42,74,.92), rgba(14,53,89,.92)), url('../images/campus10.webp');
    background-size: cover; background-position: center;
    color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.gallery-hero h1 { font-family: var(--ds-font-display); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: .6rem; color:#fff; }
.gallery-hero p { font-size: 1.08rem; color:#c3d2e6; margin-bottom: 0; }
.gallery-stats .badge {
    background: rgba(255,255,255,.12) !important; color: #fff !important;
    border: 1px solid rgba(255,255,255,.2); border-radius: var(--ds-r-pill) !important;
    font-weight: 600;
}

/* ---------- sidebar ---------- */
.gallery-sidebar {
    background: #fff; border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-lg) !important; padding: 1.5rem;
    box-shadow: var(--ds-shadow-sm); margin-bottom: 1.75rem;
    position: sticky; top: 100px;
}
.sidebar-title {
    font-family: var(--ds-font-display); color: var(--ds-ink);
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: 1.1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--ds-line);
}
.sidebar-links { list-style: none; padding: 0; margin: 0; }
.sidebar-links li { margin-bottom: .35rem; }
.sidebar-links a {
    display: flex; align-items: center; gap: .3rem;
    padding: .6rem .9rem; color: var(--ds-body); text-decoration: none;
    border-radius: var(--ds-r-md) !important; font-weight: 600; font-size: .93rem;
    transition: var(--ds-t);
}
.sidebar-links a:hover, .sidebar-links a.active {
    background: var(--ds-navy-050); color: var(--ds-navy); padding-left: 1.1rem;
}
.sidebar-links a i { margin-right: .5rem; width: 20px; text-align: center; color: var(--ds-red); }

/* ---------- content + sections ---------- */
.gallery-content { padding-left: 1.75rem; }
@media (max-width: 992px) {
    .gallery-content { padding-left: 0; }
    .gallery-sidebar { position: static; }
}
.gallery-section { margin-bottom: 3.25rem; scroll-margin-top: 110px; }
.section-header { margin-bottom: 1.5rem; padding-bottom: .8rem; border-bottom: 1px solid var(--ds-line); }
.section-header h2 {
    font-family: var(--ds-font-display); color: var(--ds-ink); font-weight: 700;
    font-size: 1.5rem; display: flex; align-items: center; margin: 0;
}
.section-header h2 i { color: var(--ds-red); margin-right: .5rem; }
.section-description { color: var(--ds-muted); font-size: 1rem; margin: 0; }

/* ---------- grid + items ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.gallery-item {
    position: relative; border-radius: var(--ds-r-lg) !important; overflow: hidden;
    box-shadow: var(--ds-shadow-sm); cursor: pointer; transition: var(--ds-t); background: #fff;
    border: 1px solid var(--ds-line);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--ds-shadow-lg); }
.gallery-item img { width: 100%; height: 210px; object-fit: cover; display: block; }
.gallery-item-content { padding: .9rem 1.1rem; }
.gallery-item-content h4 { color: var(--ds-ink); font-size: 1rem; font-weight: 700; margin: 0; }
.gallery-item-content p { color: var(--ds-muted); font-size: .88rem; margin: .2rem 0 0; }

/* video play button (dormant unless video-items exist) */
.video-item .play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60px; height: 60px; background: var(--ds-red); border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px;
    opacity: 0; transition: opacity .3s ease;
}
.video-item:hover .play-btn { opacity: 1; }

/* ---------- lightbox overrides ---------- */
.lightboxOverlay { background: rgba(0,0,0,.9) !important; }
.lightbox .lb-close {
    background: var(--ds-red) !important; border: 2px solid #fff !important;
    border-radius: 50% !important; width: 40px !important; height: 40px !important;
    color: #fff !important; font-size: 20px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    top: 20px !important; right: 20px !important;
}
.lightbox .lb-close:hover { background: var(--ds-red-600) !important; transform: rotate(90deg) !important; }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
    .gallery-item img { height: 180px; }
}
@media (max-width: 576px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item img { height: 210px; }
}
