/* ==========================================================
   SPACES PAGE
========================================================== */

.spaces-page {
    background: var(--background);
}


/* ==========================================================
   PAGE INTRO
========================================================== */

.spaces-header {
    padding: 25px 24px 45px;
}

.spaces-header .container {
    max-width: 1150px;
    margin: 0 auto;
}

.spaces-eyebrow {
    display: block;

    margin-bottom: 10px;

    color: var(--primary);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: 2px;
}

.spaces-header h1 {
    margin: 0 0 14px;

    color: var(--text);

    font-size: clamp(2.7rem, 5vw, 4.1rem);
    line-height: 1.05;
}

.spaces-header p {
    max-width: 680px;

    margin: 0;

    color: var(--text-light);

    font-size: 1rem;
    line-height: 1.8;
}


/* ==========================================================
   SPACE SECTION
========================================================== */

.space-section {
    padding: 50px 24px 80px;
}

.space-section .container {
    max-width: 1150px;
    margin: 0 auto;
}


/* ==========================================================
   LOCATION CONTENT
========================================================== */

.space-heading {
    max-width: 820px;

    margin-bottom: 32px;
}

.space-location {
    display: block;

    margin-bottom: 10px;

    color: var(--primary);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: 2px;
}

.space-heading h2 {
    margin: 0 0 18px;

    color: var(--text);

    font-size: clamp(2rem, 3.5vw, 2.9rem);
    line-height: 1.12;
}

.space-heading p {
    max-width: 800px;

    margin: 0 0 14px;

    color: var(--text-light);

    font-size: .98rem;
    line-height: 1.8;
}

.space-heading p:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   GALLERY
========================================================== */

.space-gallery {
    width: 100%;

    display: grid;

    grid-template-columns: 1.5fr 1fr 1fr;

    grid-template-rows: 260px 260px;

    gap: 10px;
}


/* ==========================================================
   IMAGE BUTTON
========================================================== */

.space-image {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    padding: 0;

    border: 0;
    border-radius: 8px;

    overflow: hidden;

    background: transparent;

    cursor: pointer;
}

.space-image-large {
    grid-row: span 2;
}

.space-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .45s ease;
}

.space-image:hover img {
    transform: scale(1.035);
}


/* ==========================================================
   LIGHTBOX
========================================================== */

.space-lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 60px;

    background: rgba(32, 34, 31, .94);
}

.space-lightbox[hidden] {
    display: none;
}

.lightbox-content {
    width: min(1200px, 92vw);
    height: min(85vh, 850px);

    display: flex;

    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 5px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, .35);
}


/* ==========================================================
   LIGHTBOX CONTROLS
========================================================== */

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    background: rgba(255, 255, 255, .1);

    color: #fff;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, .2);
}

.lightbox-close {
    top: 22px;
    right: 22px;

    width: 44px;
    height: 44px;

    border-radius: 50%;

    font-size: 1.8rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    font-size: 1.2rem;

    transform: translateY(-50%);
}

.lightbox-prev {
    left: 22px;
}

.lightbox-next {
    right: 22px;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 900px) {

    .spaces-header {
        padding: 25px 25px 40px;
    }

    .space-section {
        padding: 45px 25px 65px;
    }

    .space-gallery {
        grid-template-rows:
            260px
            200px;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    .spaces-header {
        padding: 20px 20px 38px;
    }

    .spaces-header h1 {
        font-size: 2.45rem;
    }

    .spaces-header p {
        font-size: .94rem;
        line-height: 1.7;
    }


    /* ------------------------------------------------------
       LOCATION
    ------------------------------------------------------ */

    .space-section {
        padding: 38px 20px 50px;
    }

    .space-heading {
        margin-bottom: 25px;
    }

    .space-location {
        margin-bottom: 9px;

        font-size: .68rem;
    }

    .space-heading h2 {
        margin-bottom: 15px;

        font-size: 1.9rem;
        line-height: 1.15;
    }

    .space-heading p {
        font-size: .93rem;
        line-height: 1.7;
    }


    /* ------------------------------------------------------
       GALLERY
    ------------------------------------------------------ */

    .space-gallery {
        grid-template-columns: 1fr 1fr;

        grid-template-rows:
            210px
            145px
            145px;

        gap: 7px;
    }

    .space-image-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .space-image {
        border-radius: 6px;
    }


    /* ------------------------------------------------------
       LIGHTBOX
    ------------------------------------------------------ */

    .space-lightbox {
        padding: 15px;
    }

    .lightbox-content {
        width: 100%;
        height: 82vh;
    }

    .lightbox-content img {
        max-width: 100%;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;

        width: 40px;
        height: 40px;

        font-size: 1.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;

        font-size: 1rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

}


/* ==========================================================
   VERY SMALL MOBILE
========================================================== */

@media (max-width: 380px) {

    .spaces-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    .space-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .spaces-header h1 {
        font-size: 2.2rem;
    }

    .space-heading h2 {
        font-size: 1.75rem;
    }

    .space-gallery {
        grid-template-rows:
            185px
            125px
            125px;
    }

}