/* ==========================================================
   Source: gallery.php | style block 1
   ========================================================== */

* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #ffffff;
            color: #1e2f3e;
            scroll-behavior: smooth;
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 24px;
        }

        /* ========= HERO with visible bg image ========= */
        .hero-gallery {
            position: relative;
            background: linear-gradient(105deg, rgba(0, 23, 48, 0.932) 0%, #0b1f4d, rgba(2, 165, 246, 0.274) 100%),
                url('https://images.unsplash.com/photo-1543269865-cbf427effbad?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8c3R1ZGVudHN8ZW58MHx8MHx8fDA%3D');
            background-size: cover;
            background-position: center 30%;
            border-radius: 0;
            padding: 4rem 1.5rem 3rem;
            text-align: center;
            color: white;
            box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.15);
            margin-bottom: 2rem;
            min-height: 240px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .hero-gallery h1 {
            font-size: 3.2rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
        }

        .hero-gallery .hero-sub {
            font-size: 1.15rem;
            margin-top: 0.75rem;
            font-weight: 400;
            opacity: 0.95;
            letter-spacing: 0.5px;
            text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
        }

        /* ========= CATEGORY FILTER ========= */
        .filter-bar {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.8rem;
            margin: 0.5rem 0 2.5rem;
            padding: 0.5rem 0;
        }

        .filter-btn {
            padding: 0.6rem 1.6rem;
            border-radius: 40px;
            font-weight: 600;
            font-size: 0.9rem;
            border: 2px solid #e2e8f0;
            background: white;
            color: #1e4663;
            cursor: pointer;
            transition: all 0.25s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .filter-btn i {
            font-size: 1rem;
            color: hsl(44, 100%, 48%);
        }

        .filter-btn:hover {
            border-color: hsl(44, 100%, 48%);
            background: #fef8f0;
            transform: translateY(-2px);
        }

        .filter-btn.active {
            background: hsl(44, 100%, 48%);
            border-color: hsl(44, 100%, 48%);
            color: white;
            box-shadow: 0 6px 16px rgba(244, 162, 97, 0.3);
        }

        .filter-btn.active i {
            color: white;
        }

        .filter-btn .count-badge {
            background: rgba(0, 0, 0, 0.08);
            border-radius: 20px;
            padding: 0.05rem 0.7rem;
            font-size: 0.7rem;
            font-weight: 700;
            color: #5e7c97;
        }

        .filter-btn.active .count-badge {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        /* ========= SECTION HEADINGS ========= */
        .section-heading {
            font-size: 2rem;
            font-weight: 700;
            color: #0a2f3f;
            text-align: center;
            position: relative;
            display: block;
            margin-bottom: 2rem;
        }
        .section-heading:after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: hsl(44, 100%, 48%);
            border-radius: 4px;
        }

        /* ========= GALLERY GRID - 3 columns ========= */
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.8rem;
            margin: 2rem 0 3rem;
        }

        .gallery-card {
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
            transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.4s ease;
            background: #fafafa;
            border: 1px solid #eee;
            opacity: 1;
            transform: scale(1);
        }

        .gallery-card.hidden {
            display: none;
            opacity: 0;
            transform: scale(0.9);
        }

        .gallery-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
        }

        .gallery-card img,
        .gallery-card video {
            width: 100%;
            height: 220px;
            object-fit: cover;
            display: block;
            background: #eef2f8;
        }

        .gallery-card .card-label {
            padding: 0.9rem 1.2rem;
            font-weight: 600;
            font-size: 0.95rem;
            color: #1e4663;
            background: white;
            border-top: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .gallery-card .card-label i {
            color: hsl(44, 100%, 48%);
            font-size: 1rem;
        }

        .gallery-card .card-category {
            margin-left: auto;
            font-size: 0.65rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 0.15rem 0.8rem;
            border-radius: 20px;
            background: #f0f4f8;
            color: #5e7c97;
        }

        /* Category color dots */
        .gallery-card .card-category.school {
            background: #dbeafe;
            color: #1e4a7a;
        }
        .gallery-card .card-category.classroom {
            background: #d1fae5;
            color: #0d6b4a;
        }
        .gallery-card .card-category.education {
            background: #fef3c7;
            color: #9d6b0a;
        }
        .gallery-card .card-category.sports {
            background: #fce4ec;
            color: #b32e4a;
        }
        .gallery-card .card-category.events {
            background: #e8d5f5;
            color: #6d3a8a;
        }

        /* ========= LIGHTBOX OVERLAY ========= */
        .lightbox-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.88);
            z-index: 9999;
            display: none;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(6px);
            padding: 20px;
            animation: fadeIn 0.25s ease;
        }

        .lightbox-overlay.active {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .lightbox-content {
            position: relative;
            max-width: 88vw;
            max-height: 88vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border-radius: 8px;
        }

        .lightbox-content img,
        .lightbox-content video {
            max-width: 100%;
            max-height: 80vh;
            border-radius: 8px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            object-fit: contain;
            background: #111;
        }

        .lightbox-content video {
            width: 85vw;
            height: auto;
            max-height: 80vh;
        }

        .lightbox-close {
            position: absolute;
            top: -48px;
            right: 0;
            font-size: 2.2rem;
            color: white;
            cursor: pointer;
            transition: 0.2s;
            background: none;
            border: none;
            opacity: 0.8;
            z-index: 10;
        }

        .lightbox-close:hover {
            opacity: 1;
            transform: scale(1.1);
        }

        .lightbox-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            font-size: 2.8rem;
            color: white;
            cursor: pointer;
            transition: 0.2s;
            background: rgba(0, 0, 0, 0.3);
            border: none;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.7;
            backdrop-filter: blur(4px);
            z-index: 10;
        }

        .lightbox-nav:hover {
            opacity: 1;
            background: rgba(244, 162, 97, 0.6);
        }

        .lightbox-nav.prev {
            left: -72px;
        }
        .lightbox-nav.next {
            right: -72px;
        }

        .lightbox-counter {
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        /* ========= NO RESULTS ========= */
        .no-results {
            text-align: center;
            padding: 3rem 1rem;
            color: #7a94af;
            font-size: 1.1rem;
            display: none;
            grid-column: 1 / -1;
        }

        .no-results i {
            font-size: 2.5rem;
            display: block;
            margin-bottom: 1rem;
            color: #d0d8e0;
        }

        .no-results.show {
            display: block;
        }

        /* ========= RESPONSIVE ========= */
        @media (max-width: 820px) {
            .hero-gallery h1 {
                font-size: 2.2rem;
            }
            .hero-gallery {
                min-height: 200px;
                padding: 3rem 1.5rem;
            }
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.2rem;
            }
            .lightbox-nav.prev {
                left: -12px;
            }
            .lightbox-nav.next {
                right: -12px;
            }
            .lightbox-nav {
                width: 44px;
                height: 44px;
                font-size: 1.8rem;
            }
            .lightbox-content {
                max-width: 95vw;
            }
            .lightbox-content video {
                width: 95vw;
            }
            .filter-bar {
                gap: 0.5rem;
            }
            .filter-btn {
                padding: 0.4rem 1rem;
                font-size: 0.8rem;
            }
            .filter-btn i {
                font-size: 0.8rem;
            }
        }

        @media (max-width: 500px) {
            .gallery-grid {
                grid-template-columns: 1fr 1fr;
                gap: 1rem;
            }
            .gallery-card img,
            .gallery-card video {
                height: 150px;
            }
            .gallery-card .card-label {
                font-size: 0.8rem;
                padding: 0.6rem 0.8rem;
            }
            .lightbox-nav {
                width: 36px;
                height: 36px;
                font-size: 1.4rem;
            }
            .lightbox-close {
                top: -38px;
                font-size: 1.8rem;
            }
            .filter-btn {
                padding: 0.3rem 0.8rem;
                font-size: 0.7rem;
                gap: 4px;
            }
            .filter-btn .count-badge {
                font-size: 0.6rem;
                padding: 0 0.5rem;
            }
            .section-heading {
                font-size: 1.5rem;
            }
        }

        @media (max-width: 400px) {
            .gallery-grid {
                grid-template-columns: 1fr;
                gap: 1.2rem;
            }
            .filter-bar {
                gap: 0.4rem;
            }
            .filter-btn {
                padding: 0.25rem 0.7rem;
                font-size: 0.65rem;
            }
            .filter-btn i {
                display: none;
            }
        }
