/* ── Gallery Page Styles ────────────────────────────────────────── */
/* Professional, clean design with brand colors */

.gallery-page {
    padding: 40px 0 60px;
    background: #f8f9fa;
    min-height: 70vh;
}

.gallery-page .container {
    max-width: 1200px;
}

/* ── Header ── */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.gallery-header .title-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0D2257;
    margin: 0;
    letter-spacing: -0.5px;
}

.gallery-header .title-section h1 i {
    color: #e8c060;
    margin-right: 10px;
}

.gallery-header .title-section p {
    color: #6c757d;
    margin: 4px 0 0 0;
    font-size: 15px;
}

.gallery-header .filter-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-header .filter-section label {
    font-size: 14px;
    font-weight: 600;
    color: #0D2257;
}

.gallery-header .filter-section select {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    min-width: 180px;
    color: #333;
}

.gallery-header .filter-section select:focus {
    border-color: #0D2257;
}

/* ── Stats Bar ── */
.gallery-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gallery-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.gallery-stats .stat-item i {
    font-size: 18px;
    color: #0D2257;
}

.gallery-stats .stat-item strong {
    color: #0D2257;
    font-size: 16px;
}

/* ── Grid ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ── Card ── */
.gallery-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
}

.gallery-card .media-wrap {
    position: relative;
    background: #e9ecef;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.gallery-card .media-wrap img,
.gallery-card .media-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card .media-wrap .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.gallery-card .media-wrap .view-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-card .media-wrap .event-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(13, 34, 87, 0.85);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* ── Card Content ── */
.gallery-card .card-content {
    padding: 14px 16px;
}

.gallery-card .card-content .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0D2257;
    margin-bottom: 2px;
}

.gallery-card .card-content .card-caption {
    font-size: 13px;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* ── Reactions Bar ── */
.gallery-card .reactions-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 16px 14px;
    border-top: 1px solid #f0f0f0;
}

.gallery-card .reactions-bar .reaction-btn {
    background: none;
    border: none;
    font-size: 18px;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 24px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.gallery-card .reactions-bar .reaction-btn:hover {
    background: #f0f0f0;
}

.gallery-card .reactions-bar .reaction-btn .count {
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    min-width: 16px;
}

.gallery-card .reactions-bar .reaction-btn.active {
    background: #e8f0fe;
}

.gallery-card .reactions-bar .reaction-btn.active .count {
    color: #0D2257;
}

.gallery-card .reactions-bar .reaction-btn-heart.active {
    background: #fce4ec;
}

.gallery-card .reactions-bar .reaction-btn-heart.active .count {
    color: #e1306c;
}

.gallery-card .reactions-bar .more-btn {
    background: none;
    border: none;
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s;
    color: #6c757d;
    margin-left: 2px;
}

.gallery-card .reactions-bar .more-btn:hover {
    background: #f0f0f0;
}

/* ── Emoji Picker ── */
.emoji-picker {
    position: fixed;
    display: none;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 40px;
    padding: 10px 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    gap: 4px;
    align-items: center;
}

.emoji-picker button {
    background: none;
    border: none;
    font-size: 28px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.15s;
    line-height: 1;
}

.emoji-picker button:hover {
    transform: scale(1.3);
    background: #f0f0f0;
}

/* ── Lightbox (Enhanced) ── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.lightbox-overlay.show {
    display: flex;
}

.lightbox-overlay .lb-close {
    position: absolute;
    top: 20px;
    right: 28px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10;
    line-height: 1;
}

.lightbox-overlay .lb-close:hover {
    opacity: 1;
}

.lightbox-overlay .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    padding: 16px 20px;
    border-radius: 50%;
    opacity: 0.6;
    transition: all 0.2s;
    z-index: 10;
    line-height: 1;
}

.lightbox-overlay .lb-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-overlay .lb-nav.prev {
    left: 20px;
}

.lightbox-overlay .lb-nav.next {
    right: 20px;
}

.lightbox-overlay .lb-counter {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 16px;
    border-radius: 20px;
}

.lightbox-content {
    max-width: 1000px;
    width: 100%;
    max-height: 92vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: fadeScale 0.3s ease;
    position: relative;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-content .lb-media-wrap {
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 60vh;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.lightbox-content .lb-media-wrap.zoomed {
    cursor: zoom-out;
}

.lightbox-content .lb-media-wrap img,
.lightbox-content .lb-media-wrap video {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.lightbox-content .lb-media-wrap img.zoomed {
    transform: scale(2);
    cursor: zoom-out;
}

.lightbox-content .lb-media-wrap .zoom-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.lightbox-content .lb-media-wrap .zoom-controls button {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.lightbox-content .lb-media-wrap .zoom-controls button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-content .lb-info {
    padding: 16px 24px;
    background: white;
}

.lightbox-content .lb-info .lb-title {
    font-size: 20px;
    font-weight: 700;
    color: #0D2257;
    margin: 0;
}

.lightbox-content .lb-info .lb-caption {
    font-size: 15px;
    color: #555;
    margin-top: 4px;
}

.lightbox-content .lb-info .lb-event {
    display: inline-block;
    font-size: 12px;
    color: #0D2257;
    background: #eef2fa;
    padding: 2px 14px;
    border-radius: 20px;
    margin-top: 6px;
    font-weight: 500;
}

.lightbox-content .lb-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 24px 16px;
    border-top: 1px solid #f0f0f0;
    align-items: center;
    background: white;
}

.lightbox-content .lb-reactions .reaction-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    padding: 4px 14px;
    border-radius: 24px;
    font-size: 16px;
}

.lightbox-content .lb-reactions .reaction-chip .count {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.lightbox-content .lb-reactions .lb-views {
    margin-left: auto;
    font-size: 14px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lightbox-content .lb-reactions .lb-reaction-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px 12px;
    cursor: pointer;
    border-radius: 24px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.lightbox-content .lb-reactions .lb-reaction-btn:hover {
    background: #f0f0f0;
}

.lightbox-content .lb-reactions .lb-reaction-btn .count {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

.lightbox-content .lb-reactions .lb-reaction-btn.active {
    background: #e8f0fe;
}

.lightbox-content .lb-reactions .lb-reaction-btn.active .count {
    color: #0D2257;
}

.lightbox-content .lb-reactions .lb-reaction-btn-heart.active {
    background: #fce4ec;
}

.lightbox-content .lb-reactions .lb-reaction-btn-heart.active .count {
    color: #e1306c;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
}

.empty-state i {
    font-size: 64px;
    color: #dce3f0;
    margin-bottom: 16px;
}

.empty-state h3 {
    color: #0D2257;
    font-size: 24px;
    font-weight: 600;
}

.empty-state p {
    color: #6c757d;
    font-size: 16px;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 24px 0 40px;
    }

    .gallery-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .gallery-header .title-section h1 {
        font-size: 26px;
    }

    .gallery-header .filter-section {
        flex-wrap: wrap;
    }

    .gallery-header .filter-section select {
        width: 100%;
        min-width: unset;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 14px;
    }

    .gallery-stats {
        gap: 16px;
        padding: 12px 16px;
    }

    .gallery-stats .stat-item {
        font-size: 13px;
    }

    .lightbox-content .lb-media-wrap {
        max-height: 45vh;
    }

    .lightbox-content .lb-media-wrap img,
    .lightbox-content .lb-media-wrap video {
        max-height: 45vh;
    }

    .lightbox-content .lb-info {
        padding: 12px 16px;
    }

    .lightbox-content .lb-info .lb-title {
        font-size: 17px;
    }

    .lightbox-content .lb-reactions {
        padding: 8px 16px 12px;
    }

    .lightbox-overlay .lb-nav {
        font-size: 28px;
        padding: 10px 14px;
    }

    .lightbox-overlay .lb-nav.prev {
        left: 8px;
    }

    .lightbox-overlay .lb-nav.next {
        right: 8px;
    }

    .lightbox-overlay .lb-close {
        top: 12px;
        right: 16px;
        font-size: 30px;
    }

    .lightbox-overlay .lb-counter {
        top: 16px;
        font-size: 12px;
        padding: 2px 12px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .gallery-card .card-content {
        padding: 10px 12px;
    }

    .gallery-card .card-content .card-title {
        font-size: 13px;
    }

    .gallery-card .card-content .card-caption {
        font-size: 12px;
    }

    .gallery-card .reactions-bar {
        padding: 4px 10px 10px;
        gap: 2px;
    }

    .gallery-card .reactions-bar .reaction-btn {
        font-size: 15px;
        padding: 2px 6px;
    }

    .gallery-card .reactions-bar .reaction-btn .count {
        font-size: 11px;
    }

    .gallery-card .reactions-bar .more-btn {
        font-size: 15px;
        padding: 2px 4px;
    }

    .lightbox-content .lb-reactions .lb-reaction-btn {
        font-size: 16px;
        padding: 2px 8px;
    }

    .lightbox-content .lb-reactions .reaction-chip {
        font-size: 13px;
        padding: 2px 10px;
    }
}
/* ── Pagination ── */
.gallery-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.gallery-pagination .pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.gallery-pagination .page-item {
    margin: 0;
}

.gallery-pagination .page-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: white;
    color: #0D2257;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gallery-pagination .page-link:hover {
    background: #eef2fa;
    border-color: #0D2257;
}

.gallery-pagination .page-item.active .page-link {
    background: #0D2257;
    color: white;
    border-color: #0D2257;
}

.gallery-pagination .page-item.disabled .page-link {
    color: #adb5bd;
    cursor: not-allowed;
    background: transparent;
}

@media (max-width: 576px) {
    .gallery-pagination .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}