/* =========================================================
   SCOOTER RENTAL GALLERY
   Masonry treatment intentionally matches the homepage gallery.
========================================================= */

.csr-scooter-gallery-section {
    position: relative;
    overflow: hidden;
}

.csr-scooter-gallery-section::before {
    content: "";
    position: absolute;
    width: 470px;
    height: 470px;
    left: -240px;
    top: 80px;
    border-radius: 50%;
    background: rgba(0,168,255,.055);
    filter: blur(115px);
    pointer-events: none;
}

.csr-scooter-gallery-section[hidden] {
    display: none !important;
}

.csr-scooter-gallery-grid {
    position: relative;
    z-index: 2;
    columns: 3 280px;
    column-gap: 15px;
}

.csr-scooter-gallery-item {
    position: relative;
    width: 100%;
    margin: 0 0 15px;
    padding: 0;
    display: inline-block;
    overflow: hidden;
    break-inside: avoid;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #0b0b0b;
    color: #fff;
    text-align: left;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 20px 55px rgba(0,0,0,.15);
}

.csr-scooter-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .25s ease;
}

.csr-scooter-gallery-item:hover img {
    transform: scale(1.018);
}

.csr-scooter-gallery-item:focus-visible {
    outline: 2px solid rgba(255,255,255,.85);
    outline-offset: 4px;
}

.csr-scooter-gallery-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 42px 17px 15px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.86));
    pointer-events: none;
}

.csr-scooter-gallery-meta strong {
    display: block;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
}

.csr-scooter-gallery-meta span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.72);
    font-size: 10px;
    line-height: 1.5;
}

/* Dedicated lightbox so the gallery stays reliable even when Website Editor changes the base template. */
#csr-scooter-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0,0,0,.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
}

#csr-scooter-gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#csr-scooter-gallery-lightbox img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(96vw, 1450px) !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    border-radius: 10px;
    box-shadow: 0 25px 90px rgba(0,0,0,.52);
    transform: scale(.97);
    transition: transform .26s ease;
}

#csr-scooter-gallery-lightbox.is-open img {
    transform: scale(1);
}

#csr-scooter-gallery-lightbox .csr-scooter-gallery-close {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 30001;
    width: 46px;
    height: 46px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 50%;
    background: rgba(20,20,20,.78);
    color: #fff;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 800px) {
    .csr-scooter-gallery-grid {
        columns: 2 145px;
        column-gap: 10px;
    }

    .csr-scooter-gallery-item {
        margin-bottom: 10px;
        border-radius: 16px;
    }

    .csr-scooter-gallery-meta {
        padding: 34px 12px 11px;
    }

    .csr-scooter-gallery-meta strong {
        font-size: 11px;
    }

    .csr-scooter-gallery-meta span {
        font-size: 8.5px;
    }

    #csr-scooter-gallery-lightbox {
        padding: 12px;
    }

    #csr-scooter-gallery-lightbox img {
        max-width: 98vw !important;
        max-height: 88vh !important;
        border-radius: 6px;
    }
}

@media (max-width: 420px) {
    .csr-scooter-gallery-grid {
        columns: 2;
    }
}
