/* =========================================================
   RP SKY POOL
   PROJECTS / PORTFOLIO
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.rp-projects-page {
    background: #ffffff;
}


.projects-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
}


.projects-hero-bg {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            90deg,
            rgba(7, 24, 48, 0.92) 0%,
            rgba(7, 24, 48, 0.72) 48%,
            rgba(7, 24, 48, 0.30) 100%
        ),
        url("../img/Residential Pools.jpg");

    background-size: cover;
    background-position: center;
}


.projects-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 100px 0;
    color: #ffffff;
}


.projects-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;

    font-size: 14px;
    font-weight: 500;
}


.projects-breadcrumb a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}


.projects-breadcrumb strong {
    color: #ffffff;
}


.projects-eyebrow {
    display: inline-block;
    margin-bottom: 18px;

    color: #c89b3c;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}


.projects-hero h1 {
    margin: 0;

    font-size: clamp(48px, 6vw, 82px);
    line-height: 0.98;
    letter-spacing: -2.5px;
    font-weight: 700;
}


.projects-hero h1 span {
    display: block;
    color: #ffffff;
}


.projects-hero-content > p {
    max-width: 650px;
    margin: 30px 0 0;

    color: rgba(255, 255, 255, 0.82);

    font-size: 18px;
    line-height: 1.75;
}


/* =========================================================
   GALLERY SECTION
   ========================================================= */

.projects-gallery-section {
    padding: 110px 0 120px;
}


.projects-section-heading {
    max-width: 760px;
    margin-bottom: 50px;
}


.projects-section-heading h2 {
    margin: 0 0 20px;

    color: #082d52;

    font-size: clamp(38px, 4vw, 58px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}


.projects-section-heading h2 span {
    color: #1766ad;
}


.projects-section-heading p {
    max-width: 680px;
    margin: 0;

    color: #64748b;

    font-size: 17px;
    line-height: 1.8;
}


/* =========================================================
   FILTERS
   ========================================================= */

.projects-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 45px;
}


.project-filter {
    border: 1px solid #d7e0e8;
    background: #ffffff;

    padding: 13px 22px;

    color: #153b60;

    border-radius: 50px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}


.project-filter:hover {
    border-color: #1766ad;
    color: #1766ad;
    transform: translateY(-2px);
}


.project-filter.active {
    border-color: #1766ad;
    background: #1766ad;
    color: #ffffff;
}


/* =========================================================
   PROJECT GRID
   ========================================================= */

.projects-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-auto-rows: 260px;

    gap: 18px;
}


.project-item {
    position: relative;
    min-width: 0;

    overflow: hidden;

    border-radius: 4px;

    background: #e8eef4;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


.project-item.project-large {
    grid-column: span 2;
    grid-row: span 2;
}


.project-item.project-tall {
    grid-row: span 2;
}


.project-item.project-wide {
    grid-column: span 2;
}


.project-item.is-hidden {
    display: none;
}


.project-image-button {
    position: relative;

    width: 100%;
    height: 100%;

    display: block;

    padding: 0;
    border: 0;

    background: none;

    overflow: hidden;

    cursor: pointer;

    text-align: left;
}


.project-image-button img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s cubic-bezier(.2,.7,.2,1);
}


.project-item:hover .project-image-button img {
    transform: scale(1.06);
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.project-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 28px;

    background:
        linear-gradient(
            180deg,
            rgba(5, 22, 41, 0) 35%,
            rgba(5, 22, 41, 0.88) 100%
        );

    opacity: 0;

    transition: opacity 0.35s ease;
}


.project-item:hover .project-overlay {
    opacity: 1;
}


.project-overlay-content {
    transform: translateY(15px);

    transition:
        transform 0.35s ease;
}


.project-item:hover .project-overlay-content {
    transform: translateY(0);
}


.project-overlay-content > span {
    display: block;

    margin-bottom: 8px;

    color: #d5aa50;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}


.project-overlay-content h3 {
    margin: 0 0 14px;

    color: #ffffff;

    font-size: 24px;
    line-height: 1.15;
}


.project-overlay-content strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 600;
}


.project-overlay-content strong b {
    color: #d5aa50;

    font-size: 18px;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.projects-empty {
    display: none;

    padding: 70px 20px;

    text-align: center;
}


.projects-empty.show {
    display: block;
}


.projects-empty h3 {
    margin: 0 0 10px;

    color: #082d52;

    font-size: 28px;
}


.projects-empty p {
    margin: 0;

    color: #718096;
}


/* =========================================================
   CTA
   ========================================================= */

.projects-cta {
    position: relative;

    min-height: 430px;

    display: flex;
    align-items: center;

    overflow: hidden;
}


.projects-cta-bg {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            90deg,
            rgba(7, 24, 48, 0.94),
            rgba(7, 24, 48, 0.72)
        ),
        url("../img/cspool.jpg");

    background-size: cover;
    background-position: center;
}


.projects-cta-content {
    position: relative;
    z-index: 2;

    max-width: 720px;

    padding: 100px 0;

    color: #ffffff;
}


.projects-cta-content h2 {
    margin: 0 0 22px;

    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.02;
    letter-spacing: -1.5px;
}


.projects-cta-content h2 span {
    color: #d3a64c;
}


.projects-cta-content p {
    max-width: 630px;

    margin: 0 0 32px;

    color: rgba(255, 255, 255, 0.78);

    font-size: 17px;
    line-height: 1.75;
}


.projects-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 16px 25px;

    background: #ffffff;

    color: #092d51;

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    border-radius: 2px;

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


.projects-cta-button span {
    font-size: 18px;
}


.projects-cta-button:hover {
    transform: translateY(-3px);
    background: #d5aa50;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.project-lightbox {
    position: fixed;
    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    visibility: hidden;
    opacity: 0;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}


.project-lightbox.is-open {
    visibility: visible;
    opacity: 1;
}


.project-lightbox-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(3, 13, 25, 0.92);
}


.project-lightbox-dialog {
    position: relative;
    z-index: 2;

    width: min(1100px, 100%);
    max-height: 92vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-radius: 4px;

    overflow: hidden;

    transform: scale(0.96);

    transition:
        transform 0.3s ease;
}


.project-lightbox.is-open .project-lightbox-dialog {
    transform: scale(1);
}


.project-lightbox-dialog > img {
    display: block;

    width: 100%;
    height: min(70vh, 700px);

    object-fit: contain;

    background: #071830;
}


.project-lightbox-close {
    position: absolute;
    z-index: 5;

    top: 15px;
    right: 15px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(7, 24, 48, 0.78);

    color: #ffffff;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.project-lightbox-close:hover {
    background: #1766ad;
    transform: rotate(90deg);
}


.project-lightbox-caption {
    padding: 20px 25px;
}


.project-lightbox-caption span {
    display: block;

    margin-bottom: 6px;

    color: #b0873d;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}


.project-lightbox-caption h3 {
    margin: 0 0 5px;

    color: #082d52;

    font-size: 24px;
}


.project-lightbox-caption p {
    margin: 0;

    color: #718096;

    font-size: 14px;
}


body.project-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {

    .projects-hero {
        min-height: 500px;
    }

    .projects-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-auto-rows: 240px;
    }

    .project-item.project-large {
        grid-column: span 2;
    }

    .project-item.project-wide {
        grid-column: span 2;
    }

}


@media (max-width: 767px) {

    .projects-hero {
        min-height: 440px;
    }

    .projects-hero-content {
        padding: 80px 0;
    }

    .projects-hero h1 {
        font-size: 46px;
        letter-spacing: -1.5px;
    }

    .projects-hero-content > p {
        font-size: 16px;
    }

    .projects-gallery-section {
        padding: 75px 0 80px;
    }

    .projects-section-heading {
        margin-bottom: 35px;
    }

    .projects-section-heading h2 {
        font-size: 40px;
    }

    .projects-filters {
        gap: 8px;

        overflow-x: auto;
        flex-wrap: nowrap;

        padding-bottom: 8px;

        scrollbar-width: none;
    }

    .projects-filters::-webkit-scrollbar {
        display: none;
    }

    .project-filter {
        flex: 0 0 auto;

        padding: 11px 17px;

        font-size: 13px;
    }

    .projects-grid {
        grid-template-columns: 1fr;

        grid-auto-rows: 280px;

        gap: 12px;
    }

    .project-item.project-large,
    .project-item.project-wide {
        grid-column: span 1;
    }

    .project-item.project-tall {
        grid-row: span 1;
    }

    .project-overlay {
        opacity: 1;

        padding: 20px;
    }

    .project-overlay-content {
        transform: translateY(0);
    }

    .project-overlay-content h3 {
        font-size: 20px;
    }

    .projects-cta-content {
        padding: 80px 0;
    }

    .projects-cta-content h2 {
        font-size: 42px;
    }

    .project-lightbox {
        padding: 15px;
    }

    .project-lightbox-dialog > img {
        height: 55vh;
    }

}


@media (max-width: 480px) {

    .projects-hero h1 {
        font-size: 39px;
    }

    .projects-hero-content > p {
        font-size: 15px;
    }

    .projects-section-heading h2 {
        font-size: 35px;
    }

    .projects-grid {
        grid-auto-rows: 250px;
    }

}