/* =========================================================
   TEN ONE RESORT
   Gallery Section
   gallery.css
   ========================================================= */

/* =========================================================
   01. SECTION
   ========================================================= */

.gallery-section {
    position: relative;

    padding:
        clamp(5rem, 8vw, 8rem)
        0;

    overflow: hidden;

    background:
        var(--color-background);

    isolation: isolate;
}


/* =========================================================
   02. ATMOSPHERIC BACKGROUND
   ========================================================= */

.gallery-section::before {
    content: "";

    position: absolute;

    top: -260px;
    right: -220px;

    width: 560px;
    height: 560px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(95, 169, 184, 0.08) 0%,
            rgba(95, 169, 184, 0) 72%
        );

    pointer-events: none;

    z-index: -1;
}


.gallery-section::after {
    content: "";

    position: absolute;

    bottom: -250px;
    left: -200px;

    width: 520px;
    height: 520px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(63, 118, 85, 0.07) 0%,
            rgba(63, 118, 85, 0) 72%
        );

    pointer-events: none;

    z-index: -1;
}


/* =========================================================
   03. CONTAINER
   ========================================================= */

.gallery-container {
    position: relative;

    width:
        min(
            calc(
                100% -
                (var(--container-padding) * 2)
            ),
            1180px
        );

    margin-inline:
        auto;
}


/* =========================================================
   04. HEADER
   ========================================================= */

.gallery-header {
    display:
        grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 0.95fr);

    align-items:
        end;

    gap:
        clamp(
            3rem,
            7vw,
            7rem
        );

    margin-bottom:
        clamp(
            2.5rem,
            5vw,
            4rem
        );
}


/* =========================================================
   05. EYEBROW
   ========================================================= */

.gallery-eyebrow {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        10px;

    margin-bottom:
        17px;

    color:
        var(--color-primary-light);

    font-family:
        var(--font-body-strong);

    font-size:
        0.78rem;

    font-weight:
        700;

    line-height:
        1.2;

    letter-spacing:
        0.18em;

    text-transform:
        uppercase;
}


.gallery-eyebrow::before {
    content:
        "";

    width:
        38px;

    height:
        1px;

    background:
        var(--color-primary-light);
}


/* =========================================================
   06. TITLE
   ========================================================= */

.gallery-title {
    max-width:
        700px;

    margin:
        0;

    color:
        var(--color-text-dark);

    font-family:
        var(--font-heading);

    font-size:
        clamp(
            3rem,
            5vw,
            4.65rem
        );

    font-weight:
        var(--font-weight-semibold);

    line-height:
        0.94;

    letter-spacing:
        -0.035em;
}


.gallery-title span {
    display:
        block;

    color:
        var(--color-primary);
}


/* =========================================================
   07. INTRO
   ========================================================= */

.gallery-intro {
    max-width:
        510px;

    margin:
        0 0
        3px
        auto;
}


.gallery-intro p {
    margin:
        0 0
        17px;

    color:
        var(--color-text-light);

    font-family:
        var(--font-body-strong);

    font-size:
        1rem;

    font-weight:
        500;

    line-height:
        1.8;
}


/* =========================================================
   08. LOCATION
   ========================================================= */

.gallery-location {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        7px;

    color:
        var(--color-primary);

    font-family:
        var(--font-body-strong);

    font-size:
        0.93rem;

    font-weight:
        700;
}


.gallery-location i {
    font-size:
        0.78rem;
}


/* =========================================================
   09. GALLERY GRID
   ========================================================= */

.gallery-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    grid-auto-rows:
        220px;

    gap:
        14px;
}


/* =========================================================
   10. GALLERY ITEM
   ========================================================= */

.gallery-item {
    position:
        relative;

    min-width:
        0;

    min-height:
        0;

    margin:
        0;

    overflow:
        hidden;

    border-radius:
        18px;

    background:
        var(--color-primary-dark);

    box-shadow:
        0 10px 28px
        rgba(
            22,
            74,
            58,
            0.08
        );
}

.gallery-item-featured {
    grid-column:
        span 2;

    grid-row:
        span 2;
}


.gallery-item-tall {
    grid-column:
        span 1;

    grid-row:
        span 2;
}


.gallery-item-small {
    grid-column:
        span 1;

    grid-row:
        span 1;
}


.gallery-item-wide {
    grid-column:
        span 1;

    grid-row:
        span 1;
}


.gallery-item-medium {
    grid-column:
        span 2;

    grid-row:
        span 1;
}


.gallery-item-wide-bottom {
    grid-column:
        span 2;

    grid-row:
        span 1;
}


/* =========================================================
   12. IMAGE
   ========================================================= */

.gallery-link {
    position:
        relative;

    display:
        block;

    width:
        100%;

    height:
        100%;

    color:
        inherit;

    text-decoration:
        none;
}


.gallery-link img {
    display:
        block;

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    object-position:
        center;

    transition:
        transform
        700ms
        cubic-bezier(
            0.2,
            0.65,
            0.3,
            1
        );
}


/* =========================================================
   13. IMAGE HOVER
   ========================================================= */

.gallery-item:hover
.gallery-link img {
    transform:
        scale(1.055);
}


/* =========================================================
   14. IMAGE OVERLAY
   ========================================================= */

.gallery-overlay {
    position:
        absolute;

    inset:
        0;

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        15px;

    padding:
        20px;

    background:
        linear-gradient(
            180deg,
            rgba(
                5,
                25,
                18,
                0
            ) 30%,
            rgba(
                5,
                25,
                18,
                0.12
            ) 50%,
            rgba(
                5,
                25,
                18,
                0.82
            ) 100%
        );

    opacity:
        0;

    transition:
        opacity
        var(--transition-base);
}


.gallery-item:hover
.gallery-overlay,
.gallery-link:focus-visible
.gallery-overlay {
    opacity:
        1;
}


/* =========================================================
   15. OVERLAY CONTENT
   ========================================================= */

.gallery-overlay-content {
    display:
        flex;

    flex-direction:
        column;

    gap:
        5px;

    min-width:
        0;
}


.gallery-category {
    color:
        #C5DDD0;

    font-family:
        var(--font-body-strong);

    font-size:
        0.62rem;

    font-weight:
        700;

    letter-spacing:
        0.14em;

    text-transform:
        uppercase;
}


.gallery-overlay-content strong {
    color:
        var(--color-white);

    font-family:
        var(--font-heading);

    font-size:
        1.35rem;

    font-weight:
        var(--font-weight-semibold);

    line-height:
        1;
}


/* =========================================================
   16. VIEW ICON
   ========================================================= */

.gallery-view-icon {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        39px;

    height:
        39px;

    flex-shrink:
        0;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.35
        );

    border-radius:
        50%;

    color:
        var(--color-white);

    background:
        rgba(
            255,
            255,
            255,
            0.12
        );

    backdrop-filter:
        blur(8px);

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


/* =========================================================
   17. FOCUS
   ========================================================= */

.gallery-link:focus-visible {
    outline:
        3px solid
        rgba(
            63,
            118,
            85,
            0.50
        );

    outline-offset:
        3px;
}


/* =========================================================
   18. FOOTER
   ========================================================= */

.gallery-footer {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        25px;

    margin-top:
        28px;
}


.gallery-footer-copy {
    display:
        flex;

    align-items:
        center;

    gap:
        11px;
}


.gallery-footer-line {
    width:
        35px;

    height:
        1px;

    background:
        var(--color-primary-light);
}


.gallery-footer-copy p {
    margin:
        0;

    color:
        var(--color-text-muted);

    font-family:
        var(--font-body-strong);

    font-size:
        0.74rem;

    font-weight:
        500;
}


/* =========================================================
   19. GALLERY BUTTON
   ========================================================= */

.gallery-button {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        10px;

    min-height:
        46px;

    padding:
        0 7px
        0 17px;

    border:
        1px solid
        rgba(
            63,
            118,
            85,
            0.20
        );

    border-radius:
        var(--radius-full);

    color:
        var(--color-primary);

    background:
        rgba(
            255,
            255,
            255,
            0.60
        );

    font-family:
        var(--font-body-strong);

    font-size:
        0.73rem;

    font-weight:
        700;

    backdrop-filter:
        blur(8px);

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

    transition:
        transform
        var(--transition-base),

        background-color
        var(--transition-base),

        border-color
        var(--transition-base);
}


.gallery-button:hover {
    color:
        var(--color-primary-dark);

    background:
        var(--color-white);

    border-color:
        rgba(
            63,
            118,
            85,
            0.32
        );

    transform:
        translateY(-2px);
}


.gallery-button-arrow {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        30px;

    height:
        30px;

    border-radius:
        50%;

    color:
        var(--color-white);

    background:
        var(--color-primary);

    transition:
        transform
        var(--transition-base);
}


.gallery-button:hover
.gallery-button-arrow {
    transform:
        translateX(3px);
}


/* =========================================================
   20. TABLET
   769px - 1100px
   ========================================================= */

@media (min-width: 769px) and (max-width: 1100px) {

    .gallery-header {
        gap:
            3rem;
    }


    .gallery-title {
        font-size:
            clamp(
                2.8rem,
                5.5vw,
                4rem
            );
    }


    .gallery-intro p {
        font-size:
            0.94rem;
    }


    .gallery-grid {
        grid-auto-rows:
            190px;

        gap:
            11px;
    }


    .gallery-overlay {
        padding:
            15px;
    }


    .gallery-overlay-content strong {
        font-size:
            1.15rem;
    }

}


/* =========================================================
   21. MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .gallery-section {
        padding:
            4.75rem
            0;
    }


    .gallery-container {
        width:
            calc(
                100% -
                (var(--container-padding) * 2)
            );
    }


    /* -----------------------------------------------------
       Header
       ----------------------------------------------------- */

    .gallery-header {
        display:
            flex;

        flex-direction:
            column;

        align-items:
            flex-start;

        gap:
            1.25rem;

        margin-bottom:
            2.25rem;
    }


    .gallery-eyebrow {
        margin-bottom:
            10px;

        font-size:
            0.68rem;

        letter-spacing:
            0.14em;
    }


    .gallery-eyebrow::before {
        width:
            27px;
    }


    .gallery-title {
        max-width:
            100%;

        font-size:
            clamp(
                2.35rem,
                10vw,
                3.4rem
            );

        line-height:
            0.94;
    }


    .gallery-intro {
        max-width:
            100%;

        margin:
            0;
    }


    .gallery-intro p {
        font-size:
            0.94rem;

        line-height:
            1.7;
    }


    /* -----------------------------------------------------
       Mobile gallery
       ----------------------------------------------------- */

    .gallery-grid {
        display:
            grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        grid-template-rows:
            auto;

        grid-auto-rows:
            180px;

        gap:
            9px;
    }


    /*
     * Featured remains large.
     */

    .gallery-item-featured {
        grid-column:
            span 2;

        grid-row:
            span 2;
    }


    .gallery-item-tall {
        grid-column:
            span 1;

        grid-row:
            span 2;
    }


    .gallery-item-small {
        grid-column:
            span 1;

        grid-row:
            span 1;
    }


    .gallery-item-wide {
        grid-column:
            span 1;

        grid-row:
            span 1;
    }


    .gallery-item-medium {
        grid-column:
            span 2;

        grid-row:
            span 1;
    }


    .gallery-item-wide-bottom {
        grid-column:
            span 2;

        grid-row:
            span 1;
    }


    .gallery-item {
        border-radius:
            14px;
    }


    /*
     * Keep overlays visible enough on touch devices.
     */

    .gallery-overlay {
        padding:
            13px;

        opacity:
            1;

        background:
            linear-gradient(
                180deg,
                rgba(
                    5,
                    25,
                    18,
                    0
                ) 35%,
                rgba(
                    5,
                    25,
                    18,
                    0.62
                ) 100%
            );
    }


    .gallery-category {
        font-size:
            0.52rem;
    }


    .gallery-overlay-content strong {
        font-size:
            1rem;
    }


    .gallery-view-icon {
        width:
            32px;

        height:
            32px;

        font-size:
            0.7rem;
    }


    /* -----------------------------------------------------
       Footer
       ----------------------------------------------------- */

    .gallery-footer {
        flex-direction:
            column;

        align-items:
            flex-start;

        gap:
            16px;

        margin-top:
            20px;
    }


    .gallery-button {
        width:
            100%;

        justify-content:
            space-between;
    }

}


/* =========================================================
   22. SMALL MOBILE
   <= 480px
   ========================================================= */

@media (max-width: 480px) {

    .gallery-section {
        padding:
            4rem
            0;
    }


    .gallery-title {
        font-size:
            clamp(
                2.15rem,
                11vw,
                2.85rem
            );
    }


    .gallery-intro p {
        font-size:
            0.9rem;
    }


    .gallery-grid {
        grid-auto-rows:
            145px;

        gap:
            7px;
    }


    .gallery-item {
        border-radius:
            12px;
    }


    .gallery-overlay {
        padding:
            10px;
    }


    .gallery-overlay-content strong {
        font-size:
            0.88rem;
    }


    .gallery-view-icon {
        width:
            29px;

        height:
            29px;

        font-size:
            0.62rem;
    }


    .gallery-footer-copy p {
        font-size:
            0.68rem;
    }


    .gallery-button {
        min-height:
            44px;

        font-size:
            0.68rem;
    }


    .gallery-button-arrow {
        width:
            28px;

        height:
            28px;
    }

}


/* =========================================================
   23. VERY SMALL PHONES
   <= 375px
   ========================================================= */

@media (max-width: 375px) {

    .gallery-grid {
        grid-auto-rows:
            130px;

        gap:
            6px;
    }


    .gallery-overlay {
        padding:
            8px;
    }


    .gallery-category {
        font-size:
            0.46rem;
    }


    .gallery-overlay-content strong {
        font-size:
            0.78rem;
    }


    .gallery-view-icon {
        width:
            26px;

        height:
            26px;
    }

}


/* =========================================================
   24. REDUCED MOTION
   ========================================================= */

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

    .gallery-link img,
    .gallery-button,
    .gallery-button-arrow {

        transition:
            none;
    }


    .gallery-item:hover
    .gallery-link img {

        transform:
            none;
    }


    .gallery-button:hover,
    .gallery-item:hover
    .gallery-button-arrow {

        transform:
            none;
    }

}