 /* =========================================
           ОСНОВНИ НАСТРОЙКИ
        ========================================= */

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

        html {
            scroll-behavior: smooth;
        }

        
        /* =========================================
           ОСНОВНА СЕКЦИЯ
        ========================================= */

        #modern-gallery-section {
            width: min(1500px, 94%);
            margin: 0 auto;
            padding: 70px 0;
        }

        .modern-gallery-heading {
            max-width: 750px;
            margin: 0 auto 45px;
            text-align: center;
        }

        .modern-gallery-heading .gallery-subtitle {
            display: inline-block;
            margin-bottom: 12px;
            color: #62d9ff;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: 4px;
            text-transform: uppercase;
        }

        .modern-gallery-heading h1 {
            margin: 0 0 15px;
            color: #ffffff;
            font-size: clamp(35px, 5vw, 64px);
            font-weight: 700;
            line-height: 1.1;
        }

        .modern-gallery-heading p {
            margin: 0;
            color: #000000;
            font-size: 17px;
            line-height: 1.7;
        }

        /* =========================================
           MASONRY ГАЛЕРИЯ
        ========================================= */

        #modern-gallery {
            columns: 4;
            column-gap: 16px;
        }

        #modern-gallery .modern-gallery-item {
            position: relative;
            width: 100%;
            display: inline-block;
            margin: 0 0 16px;
            padding: 0;
            overflow: hidden;
            border: 0;
            border-radius: 18px;
            background: #1b2330;
            break-inside: avoid;
            cursor: pointer;
            box-shadow:
                0 12px 35px rgba(0, 0, 0, 0.28);
            transition:
                transform 0.35s ease,
                box-shadow 0.35s ease;
        }

        #modern-gallery .modern-gallery-item:hover {
            transform: translateY(-4px);
            box-shadow:
                0 18px 45px rgba(0, 0, 0, 0.42);
        }

        #modern-gallery .modern-gallery-item img {
            width: 100%;
            height: auto;
            display: block;
            margin: 0;
            padding: 0;
            object-fit: contain;
            transition:
                transform 0.65s cubic-bezier(.2, .7, .2, 1),
                filter 0.4s ease;
        }

        #modern-gallery .modern-gallery-item::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            background: linear-gradient(
                to top,
                rgba(0, 0, 0, 0.8),
                transparent 58%
            );
            opacity: 0;
            transition: opacity 0.35s ease;
        }

        #modern-gallery .modern-gallery-item:hover img {
            transform: scale(1.045);
            filter: brightness(0.82);
        }

        #modern-gallery .modern-gallery-item:hover::before {
            opacity: 1;
        }

        /* Номер на снимката */

        #modern-gallery .image-number {
            position: absolute;
            left: 18px;
            bottom: 16px;
            z-index: 2;
            color: #ffffff;
            font-size: 15px;
            font-weight: 700;
            line-height: 1.2;
            letter-spacing: 0.5px;
            opacity: 0;
            transform: translateY(10px);
            transition:
                opacity 0.35s ease,
                transform 0.35s ease;
        }

        /* Икона върху снимката */

        #modern-gallery .zoom-icon {
            position: absolute;
            top: 16px;
            right: 16px;
            z-index: 2;

            width: 44px;
            height: 44px;

            display: flex;
            align-items: center;
            justify-content: center;

            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.38);
            color: #ffffff;

            opacity: 0;
            transform: scale(0.75);

            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);

            transition:
                opacity 0.35s ease,
                transform 0.35s ease;
        }

        #modern-gallery .zoom-icon svg {
            width: 21px;
            height: 21px;
            display: block;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        #modern-gallery .modern-gallery-item:hover .image-number {
            opacity: 1;
            transform: translateY(0);
        }

        #modern-gallery .modern-gallery-item:hover .zoom-icon {
            opacity: 1;
            transform: scale(1);
        }

        #modern-gallery .modern-gallery-item.image-error {
            display: none;
        }

        /* =========================================
           LIGHTBOX
        ========================================= */

        #modern-lightbox {
            position: fixed !important;
            inset: 0 !important;
            z-index: 999999 !important;

            width: 100vw !important;
            height: 100vh !important;

            display: flex !important;
            align-items: center !important;
            justify-content: center !important;

            margin: 0 !important;
            padding: 30px !important;

            background: rgba(3, 5, 9, 0.96) !important;

            opacity: 0;
            visibility: hidden;
            pointer-events: none;

            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);

            transition:
                opacity 0.3s ease,
                visibility 0.3s ease;
        }

        #modern-lightbox.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        #modern-lightbox .lightbox-content {
            position: relative;
            z-index: 1;

            max-width: 90vw;
            max-height: 86vh;

            display: flex;
            align-items: center;
            justify-content: center;
        }

        #modern-lightbox .lightbox-image {
            width: auto !important;
            height: auto !important;
            max-width: 90vw !important;
            max-height: 84vh !important;

            display: block !important;
            margin: 0 !important;
            padding: 0 !important;

            border: 0 !important;
            border-radius: 15px !important;
            object-fit: contain !important;

            box-shadow:
                0 25px 80px rgba(0, 0, 0, 0.75) !important;

            opacity: 0;
            transform: scale(0.94);

            transition:
                opacity 0.3s ease,
                transform 0.35s ease;
        }

        #modern-lightbox.active .lightbox-image {
            transform: scale(1);
        }

        /* Индикатор за зареждане */

        #modern-lightbox .gallery-loader {
            position: absolute;
            z-index: -1;

            width: 48px;
            height: 48px;

            border: 4px solid rgba(255, 255, 255, 0.18);
            border-top-color: #62d9ff;
            border-radius: 50%;

            animation: gallery-spin 0.8s linear infinite;
        }

        @keyframes gallery-spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* Брояч */

        #modern-lightbox .lightbox-counter {
            position: absolute !important;
            left: 50% !important;
            bottom: 20px !important;
            z-index: 100003 !important;

            min-width: auto !important;
            width: auto !important;
            height: auto !important;

            margin: 0 !important;
            padding: 9px 18px !important;

            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            border-radius: 30px !important;

            background: rgba(20, 22, 27, 0.8) !important;
            color: #ffffff !important;

            font-family: Arial, Helvetica, sans-serif !important;
            font-size: 14px !important;
            font-weight: 400 !important;
            line-height: 1.2 !important;
            text-align: center !important;

            transform: translateX(-50%) !important;

            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        /* =========================================
           LIGHTBOX БУТОНИ
        ========================================= */

        #modern-lightbox .lightbox-button {
            position: absolute !important;
            z-index: 100004 !important;

            width: 52px !important;
            height: 52px !important;

            min-width: 52px !important;
            min-height: 52px !important;

            max-width: 52px !important;
            max-height: 52px !important;

            aspect-ratio: 1 / 1 !important;

            display: flex !important;
            align-items: center !important;
            justify-content: center !important;

            margin: 0 !important;
            padding: 0 !important;

            border: 1px solid rgba(255, 255, 255, 0.24) !important;
            border-radius: 50% !important;

            background: rgba(20, 22, 27, 0.76) !important;
            color: #ffffff !important;

            box-shadow:
                0 8px 25px rgba(0, 0, 0, 0.32) !important;

            font-size: 0 !important;
            line-height: 1 !important;

            cursor: pointer !important;

            appearance: none !important;
            -webkit-appearance: none !important;

            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);

            transition:
                background 0.25s ease,
                color 0.25s ease,
                border-color 0.25s ease,
                transform 0.25s ease !important;
        }

        #modern-lightbox .lightbox-button svg {
            width: 23px !important;
            height: 23px !important;

            min-width: 23px !important;
            min-height: 23px !important;

            display: block !important;
            flex: 0 0 auto !important;

            margin: 0 !important;
            padding: 0 !important;

            fill: none !important;
            stroke: currentColor !important;
            stroke-width: 2.2 !important;
            stroke-linecap: round !important;
            stroke-linejoin: round !important;

            pointer-events: none !important;
        }

        #modern-lightbox .lightbox-button:hover {
            border-color: #ffffff !important;
            background: #ffffff !important;
            color: #10141c !important;
        }

        #modern-lightbox .lightbox-button:focus-visible {
            outline: 3px solid #62d9ff !important;
            outline-offset: 4px !important;
        }

        /* Затваряне */

        #modern-lightbox .lightbox-close {
            top: 24px !important;
            right: 24px !important;
        }

        #modern-lightbox .lightbox-close:hover {
            transform: rotate(90deg) !important;
        }

        /* Предишна и следваща снимка */

        #modern-lightbox .lightbox-prev,
        #modern-lightbox .lightbox-next {
            top: 50% !important;
            bottom: auto !important;
            transform: translateY(-50%) !important;
        }

        #modern-lightbox .lightbox-prev {
            left: 28px !important;
            right: auto !important;
        }

        #modern-lightbox .lightbox-next {
            right: 28px !important;
            left: auto !important;
        }

        #modern-lightbox .lightbox-prev:hover,
        #modern-lightbox .lightbox-next:hover {
            transform:
                translateY(-50%)
                scale(1.08) !important;
        }

        /* =========================================
           ТАБЛЕТ
        ========================================= */

        @media (max-width: 1100px) {
            #modern-gallery {
                columns: 3;
            }
        }

        /* =========================================
           МАЛЪК ТАБЛЕТ И ТЕЛЕФОН
        ========================================= */

        @media (max-width: 750px) {
            #modern-gallery-section {
                width: 92%;
                padding: 45px 0;
            }

            .modern-gallery-heading {
                margin-bottom: 30px;
            }

            #modern-gallery {
                columns: 2;
                column-gap: 10px;
            }

            #modern-gallery .modern-gallery-item {
                margin-bottom: 10px;
                border-radius: 12px;
            }

            #modern-gallery .image-number,
            #modern-gallery .zoom-icon {
                display: none;
            }

            #modern-lightbox {
                padding: 12px !important;
            }

            #modern-lightbox .lightbox-content {
                max-width: 96vw;
                max-height: 78vh;
            }

            #modern-lightbox .lightbox-image {
                max-width: 96vw !important;
                max-height: 76vh !important;
                border-radius: 10px !important;
            }

            #modern-lightbox .lightbox-button {
                width: 44px !important;
                height: 44px !important;

                min-width: 44px !important;
                min-height: 44px !important;

                max-width: 44px !important;
                max-height: 44px !important;
            }

            #modern-lightbox .lightbox-button svg {
                width: 20px !important;
                height: 20px !important;

                min-width: 20px !important;
                min-height: 20px !important;
            }

            #modern-lightbox .lightbox-close {
                top: 14px !important;
                right: 14px !important;
            }

            #modern-lightbox .lightbox-prev,
            #modern-lightbox .lightbox-next {
                top: auto !important;
                bottom: 22px !important;
                transform: none !important;
            }

            #modern-lightbox .lightbox-prev {
                left: 20px !important;
            }

            #modern-lightbox .lightbox-next {
                right: 20px !important;
            }

            #modern-lightbox .lightbox-prev:hover,
            #modern-lightbox .lightbox-next:hover {
                transform: scale(1.08) !important;
            }

            #modern-lightbox .lightbox-counter {
                bottom: 25px !important;
            }
        }

#modern-gallery .image-number {
    display: none !important;
}

        /* =========================================
           МАЛЪК ТЕЛЕФОН
        ========================================= */

        @media (max-width: 430px) {
            #modern-gallery {
                columns: 1;
            }

            .modern-gallery-heading .gallery-subtitle {
                font-size: 12px;
                letter-spacing: 3px;
            }

            .modern-gallery-heading p {
                font-size: 15px;
            }
        }

        /* Намалени анимации */

        @media (prefers-reduced-motion: reduce) {
            #modern-gallery *,
            #modern-lightbox *,
            #modern-gallery *::before,
            #modern-lightbox *::before {
                animation-duration: 0.01ms !important;
                transition-duration: 0.01ms !important;
            }
        }