
/* ==========================================
   FREEQUOTEPRO - PHOTO GALLERY
   PREMIUM GLASS IMAGE FRAMES
========================================== */

/* Animated glass reflection angle */

@property --gallery-glass-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 225deg;
}

/* ==========================================
   1. GLASS FRAME FOUNDATION
========================================== */

.page-gallery .photo-gallery figure {
    --gallery-frame-width: 5px;

    position: relative;
    isolation: isolate;

    /* Preserve original image dimensions */
    /* Preserve original width, height and layout */

    box-shadow:
        0 24px 48px -22px rgba(11, 49, 91, 0.38),
        0 10px 24px -14px rgba(11, 49, 91, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);

    transition:
        box-shadow 400ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================
   2. REFLECTIVE GLASS BORDER
========================================== */

/* Overrides the decorative image-anime
   pseudo-element only inside the gallery */

.page-gallery .photo-gallery figure::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 5;

    width: auto;
    height: auto;

    left: 0;
    top: 0;

    transform: none;

    border-radius: inherit;
    pointer-events: none;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.40),
        inset 0 2px 2px rgba(255, 255, 255, 0.25);
}

/* ==========================================
   3. ADVANCED GLASS BORDER
========================================== */

@supports ((mask-composite: exclude) or
           (-webkit-mask-composite: xor)) {

    .page-gallery .photo-gallery figure::after {
        padding: var(--gallery-frame-width);

        background: conic-gradient(
            from var(--gallery-glass-angle),

            rgba(255, 255, 255, 0.12) 0%,
            rgba(225, 237, 245, 0.95) 12%,
            rgba(255, 255, 255, 0.45) 24%,

            transparent 42%,

            rgba(255, 130, 28, 0.95) 59%,
            rgba(255, 195, 130, 0.75) 65%,

            transparent 80%,
            rgba(255, 255, 255, 0.12) 100%
        );

        -webkit-mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);

        mask:
            linear-gradient(#000 0 0) content-box,
            linear-gradient(#000 0 0);

        -webkit-mask-composite: xor;
        mask-composite: exclude;

        transition:
            --gallery-glass-angle 900ms
            cubic-bezier(0.25, 1, 0.5, 1);
    }
}

/* ==========================================
   4. HOVER - MOVING GLASS REFLECTION
========================================== */

@media (hover: hover) and (pointer: fine) {

    .page-gallery .photo-gallery:hover figure::after,
    .page-gallery .photo-gallery:focus-within figure::after {
        --gallery-glass-angle: 255deg;
    }

    .page-gallery .photo-gallery:hover figure,
    .page-gallery .photo-gallery:focus-within figure {
        box-shadow:
            0 26px 52px -22px rgba(11, 49, 91, 0.42),
            0 12px 26px -14px rgba(11, 49, 91, 0.25),
            0 0 20px rgba(255, 130, 28, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
}

/* ==========================================
   5. RESPONSIVE
========================================== */

@media (max-width: 991px) {

    .page-gallery .photo-gallery figure {
        --gallery-frame-width: 4px;
    }
}

@media (max-width: 575px) {

    .page-gallery .photo-gallery figure {
        --gallery-frame-width: 3px;
    }
}

/* ==========================================
   6. REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .page-gallery .photo-gallery figure,
    .page-gallery .photo-gallery figure::after {
        transition: none;
    }
}
