/* ==========================================================================
   ROOF 360 SOLUTIONS - Projects / Gallery Page Styles (projects.css)
   ========================================================================== */

/* Featured Projects Mosaic (Light) */
.r360-gallery-section {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    padding: 5.5rem 0 6rem;
    overflow: hidden;
}

.r360-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 1.35rem;
    position: relative;
    z-index: 2;
}

.r360-mosaic-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(15, 18, 25, 0.1);
    border: 1px solid #dfe4ed;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.r360-mosaic-item:hover {
    transform: translateY(-4px);
    border-color: rgba(217, 11, 22, 0.55);
    box-shadow: 0 22px 46px rgba(15, 18, 25, 0.18);
}

.r360-mosaic-tall {
    grid-row: span 2;
}

.r360-mosaic-wide {
    grid-column: span 2;
}

.r360-mosaic-slot {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: transform 0.45s ease;
}

.r360-mosaic-item:hover .r360-mosaic-slot {
    transform: scale(1.05);
}

/* Lightbox Modal */
.r360-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 13, 0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.r360-lightbox.is-open {
    display: flex;
}

.r360-lightbox-stage {
    position: relative;
    max-width: 920px;
    width: 100%;
    background: #141720;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
}

.r360-lightbox-media {
    min-height: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(145deg, #1b1e27 0%, #101218 65%, #231115 100%);
    color: #d6dae3;
}

.r360-lightbox-media img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    display: block;
}

.r360-lightbox-close,
.r360-lightbox-prev,
.r360-lightbox-next {
    position: absolute;
    background: rgba(11, 12, 16, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 10;
}

.r360-lightbox-close:hover,
.r360-lightbox-prev:hover,
.r360-lightbox-next:hover {
    background: #d90b16;
    border-color: #d90b16;
}

.r360-lightbox-close {
    top: 18px;
    right: 18px;
}

.r360-lightbox-prev {
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}

.r360-lightbox-next {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

/* Responsive Mosaic */
@media (max-width: 991.98px) {
    .r360-mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
}

@media (max-width: 575.98px) {
    .r360-mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 230px;
    }

    .r360-mosaic-tall,
    .r360-mosaic-wide {
        grid-row: span 1;
        grid-column: span 1;
    }
}
