.apg-gallery-wrapper {
            display: flex; gap: 30px; padding: 40px;
            background: #0F52BA; border-radius: 20px;
            position: relative; overflow: hidden;
        }
        .apg-gallery-wrapper::before {
            content: ''; position: absolute; inset: 0;
            background-image:
                radial-gradient(2px 2px at 15px 30px, #fff, rgba(0,0,0,0)),
                radial-gradient(1px 1px at 45px 70px, #ffd700, rgba(0,0,0,0)),
                radial-gradient(1.5px 1.5px at 80px 120px, #fff, rgba(0,0,0,0)),
                radial-gradient(2px 2px at 120px 200px, #ffd700, rgba(0,0,0,0)),
                radial-gradient(1px 1px at 200px 150px, #fff, rgba(0,0,0,0)),
                radial-gradient(2px 2px at 300px 50px, #ffd700, rgba(0,0,0,0));
            background-size: 250px 250px; opacity: 0.2; pointer-events: none;
        }
        .apg-gallery-heading {
            grid-column: 1 / -1;
            color: #ffd700;
            font-size: 28px;
            font-weight: 600;
            margin: 0 0 20px 0;
            text-align: center;
            letter-spacing: 1px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.4);
            position: relative;
            z-index: 2;
        }
        .apg-categories-sidebar {
            flex: 0 0 260px; background: rgba(0,0,0,0.4);
            backdrop-filter: blur(10px); border-radius: 15px;
            padding: 25px; border: 1px solid rgba(255,215,0,0.3);
            z-index: 1; height: fit-content; position: sticky; top: 20px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        }
        .apg-categories-sidebar h3 {
            color: #ffd700; margin: 0 0 20px 0; font-size: 20px;
            text-align: center; font-weight: 600; letter-spacing: 1px;
        }
        .apg-category-list { list-style: none; margin: 0; padding: 0; }
        .apg-category-item { margin-bottom: 10px; }
        .apg-category-btn {
            width: 100%; text-align: left; padding: 12px 15px;
            background: rgba(0,0,0,0.5); border: 1px solid rgba(255,215,0,0.3);
            border-radius: 10px; color: #fff; cursor: pointer;
            transition: all 0.3s ease; font-size: 14px;
            display: flex; align-items: center; gap: 10px;
        }
        .apg-category-btn:hover {
            background: rgba(255,215,0,0.2); border-color: #ffd700;
            transform: translateX(5px);
        }
        .apg-category-btn.active {
            background: linear-gradient(135deg, #ffd700, #d4af37);
            color: #000; font-weight: bold; border-color: #ffd700;
            box-shadow: 0 0 15px rgba(255,215,0,0.4);
        }
        .apg-category-count {
            margin-left: auto; background: rgba(255,255,255,0.2);
            padding: 2px 8px; border-radius: 20px; font-size: 12px;
        }
        .apg-category-btn.active .apg-category-count { background: rgba(0,0,0,0.2); }
        .apg-category-thumb {
            width: 24px; height: 24px; border-radius: 4px;
            object-fit: cover; margin-right: 4px; flex-shrink: 0;
        }
        .apg-photos-container { flex: 1; position: relative; z-index: 1; }
        .apg-photos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
        }
        .apg-photo-card {
            border-radius: 15px; overflow: hidden;
            transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
            position: relative; border: 1px solid rgba(255,215,0,0.2);
            background: linear-gradient(135deg, #0F52BA 0%, #0a3d8a 100%);
        }
        .apg-photo-card:nth-child(6n+2) { background: linear-gradient(135deg, #1a5fc9 0%, #0F52BA 100%); }
        .apg-photo-card:nth-child(6n+3) { background: linear-gradient(135deg, #0a3d8a 0%, #0F52BA 100%); }
        .apg-photo-card:nth-child(6n+4) { background: linear-gradient(135deg, #0F52BA 0%, #0d469e 100%); }
        .apg-photo-card:nth-child(6n+5) { background: linear-gradient(135deg, #1a4d8f 0%, #0F52BA 100%); }
        .apg-photo-card:nth-child(6n+6) { background: linear-gradient(135deg, #0F52BA 0%, #08346e 100%); }

        .apg-photo-card:hover {
            transform: translateY(-8px);
            border-color: rgba(255,215,0,0.6);
            box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 25px rgba(255,215,0,0.25);
        }
        .apg-photo-card::after {
            content: ""; position: absolute; inset: 0;
            border-radius: 15px; padding: 2px;
            background: linear-gradient(135deg, rgba(251,192,45,0.6), rgba(255,215,0,0.1));
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor; mask-composite: exclude;
            pointer-events: none; opacity: 0; transition: opacity 0.3s;
        }
        .apg-photo-card:hover::after { opacity: 1; }

        .apg-photo-card--category { border: 1px solid rgba(255,215,0,0.55); }
        .apg-photo-card--category::before {
            content: ""; position: absolute; top: 0; left: 0; right: 0;
            height: 3px; background: linear-gradient(90deg, #ffd700, #d4af37, #ffd700);
            z-index: 3; border-radius: 15px 15px 0 0;
        }
        .apg-category-badge {
            position: absolute; top: 12px; left: 12px;
            background: linear-gradient(135deg, #ffd700, #d4af37);
            color: #000; font-size: 11px; font-weight: bold;
            padding: 4px 10px; border-radius: 20px; z-index: 2;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3); letter-spacing: 0.5px;
        }
        .apg-category-badge.apg-badge-event {
            background: linear-gradient(135deg, #4a90e2, #0F52BA); color: #fff;
        }
        .apg-photo-image {
            position: relative; overflow: hidden; height: 220px; cursor: pointer;
        }
        .apg-photo-image img {
            width: 100%; height: 100%; object-fit: cover;
            transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        }
        .apg-photo-card:hover .apg-photo-image img { transform: scale(1.1); }

        .apg-zoom-overlay {
            position: absolute; inset: 0; background: rgba(0,0,0,0.6);
            display: flex; align-items: center; justify-content: center;
            opacity: 0; transition: opacity 0.3s ease;
        }
        .apg-photo-image:hover .apg-zoom-overlay { opacity: 1; }
        .apg-zoom-icon {
            background: linear-gradient(135deg, #ffd700, #d4af37);
            width: 50px; height: 50px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 24px; color: #000; transform: scale(0.8);
            transition: transform 0.3s ease;
        }
        .apg-photo-image:hover .apg-zoom-icon { transform: scale(1); }
        .apg-photo-info { padding: 18px; }
        .apg-photo-title {
            font-size: 16px; font-weight: 600; color: #ffd700;
            margin-bottom: 8px; display: block;
        }
        .apg-photo-meta {
            font-size: 12px; color: #e0e0e0; margin-top: 8px;
            display: flex; gap: 15px; flex-wrap: wrap;
        }
        .apg-photo-meta span { display: flex; align-items: center; gap: 5px; }

        .apg-modal {
            display: none; position: fixed; inset: 0;
            background: rgba(0,0,0,0.95); z-index: 9999;
            align-items: center; justify-content: center;
        }
        .apg-modal.active { display: flex; }
        .apg-modal-content { max-width: 90%; max-height: 90%; position: relative; }
        .apg-modal-slide { position: relative; display: none; text-align: center; }
        .apg-modal-slide.active-slide { display: block; }
        .apg-modal-slide img {
            max-width: 100%; max-height: 80vh; object-fit: contain;
            border-radius: 10px; box-shadow: 0 0 50px rgba(0,0,0,0.5);
            animation: zoomIn 0.5s ease;
        }
        @keyframes zoomIn {
            from { transform: scale(0.8); opacity: 0; }
            to   { transform: scale(1);   opacity: 1; }
        }
        .apg-slideshow-nav {
            position: absolute; top: 50%; transform: translateY(-50%);
            background: rgba(255,215,0,0.8); color: #000;
            width: 50px; height: 50px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; font-size: 24px; font-weight: bold;
            transition: all 0.3s ease; z-index: 10000; user-select: none;
        }
        .apg-slideshow-nav:hover {
            background: #ffd700; transform: translateY(-50%) scale(1.1);
            box-shadow: 0 0 20px rgba(255,215,0,0.5);
        }
        .apg-prev { left: 20px; }
        .apg-next { right: 20px; }
        .apg-slideshow-controls {
            position: absolute; bottom: 90px; left: 0; right: 0;
            text-align: center; display: flex; justify-content: center;
            gap: 15px; z-index: 10000;
        }
        .apg-slideshow-btn {
            background: rgba(0,0,0,0.7); border: 1px solid #ffd700;
            color: #ffd700; padding: 10px 20px; border-radius: 30px;
            cursor: pointer; font-size: 14px; transition: all 0.3s ease;
            display: inline-flex; align-items: center; gap: 8px;
        }
        .apg-slideshow-btn:hover {
            background: #ffd700; color: #000; transform: translateY(-2px);
        }
        .apg-slideshow-indicators {
            position: absolute; bottom: 50px; left: 0; right: 0;
            display: flex; justify-content: center; gap: 10px;
            z-index: 10000; flex-wrap: wrap; padding: 0 20px;
        }
        .apg-indicator {
            width: 10px; height: 10px; border-radius: 50%;
            background: rgba(255,255,255,0.5); cursor: pointer;
            transition: all 0.3s ease;
        }
        .apg-indicator.active {
            background: #ffd700; width: 25px; border-radius: 10px;
        }
        .apg-indicator:hover { background: #ffd700; transform: scale(1.2); }
        .apg-modal-close {
            position: absolute; top: 20px; right: 30px;
            color: #ffd700; font-size: 35px; cursor: pointer;
            transition: transform 0.3s; z-index: 10000; line-height: 1;
        }
        .apg-modal-close:hover { transform: scale(1.1); }
        .apg-modal-caption {
            position: absolute; bottom: 10px; left: 50%;
            transform: translateX(-50%); text-align: center;
            color: #ffd700; font-size: 14px;
            background: rgba(0,0,0,0.6); padding: 10px 20px;
            border-radius: 8px; max-width: 80%; pointer-events: none;
        }
        .apg-no-results {
            text-align: center; padding: 60px 20px;
            color: #fff; grid-column: 1 / -1;
        }
        .apg-no-results p { font-size: 18px; color: #ffd700; }

        /* ===== Infinite-scroll / AJAX states ===== */
        .apg-loading-sentinel {
            grid-column: 1 / -1;
            text-align: center;
            padding: 30px;
            color: #ffd700;
            font-size: 14px;
            letter-spacing: 1px;
            min-height: 24px;
        }
        .apg-loading-sentinel .apg-spinner {
            display: inline-block;
            width: 20px; height: 20px;
            border: 2px solid rgba(255,215,0,0.3);
            border-top-color: #ffd700;
            border-radius: 50%;
            animation: apg-spin 0.8s linear infinite;
            vertical-align: middle;
            margin-right: 8px;
        }
        @keyframes apg-spin { to { transform: rotate(360deg); } }
        .apg-loading-sentinel.apg-end {
            color: rgba(255,255,255,0.5);
            font-style: italic;
        }
        .apg-loading-sentinel.apg-error {
            color: #ff8a8a;
        }
        .apg-photo-card.apg-fade-in {
            animation: apgFadeIn 0.4s ease both;
        }
        @keyframes apgFadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        @media (max-width: 768px) {
            .apg-gallery-wrapper { flex-direction: column; padding: 20px; }
            .apg-categories-sidebar { flex: none; width: 100%; position: static; }
            .apg-photos-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
            .apg-slideshow-nav { width: 35px; height: 35px; font-size: 18px; }
            .apg-slideshow-btn { padding: 6px 12px; font-size: 12px; }
            .apg-modal-close { font-size: 28px; top: 10px; right: 15px; }
            .apg-modal-caption { font-size: 12px; bottom: 60px; }
        }