/* =========================================================
   ECUBE PROJECTS PAGE
   ========================================================= */

.ecube-projects-page {
    background: #ffffff;
    width: 100%;
}

.ecube-projects-section {
    padding: 90px 0 100px;
}

.ecube-projects-section .container-fluid {
    padding-left: 45px;
    padding-right: 45px;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.ecube-projects-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 42px;
}

.ecube-projects-eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ecube-projects-heading h1 {
    margin: 0;
    font-size: 48px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -1px;
}

.ecube-projects-count {
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-bottom: 7px;
}


/* =========================================================
   CATEGORY FILTER
   ========================================================= */

.ecube-project-filter-wrapper {
    width: 100%;
    margin-bottom: 42px;
    border-bottom: 1px solid #dedede;
}

.ecube-project-filter {
    display: flex;
    align-items: center;
    gap: 30px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ecube-project-filter::-webkit-scrollbar {
    display: none;
}

.ecube-filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 45px;
    padding: 0 0 14px;

    border: 0;
    background: transparent;

    color: #777777;

    font-family: inherit;
    font-size: 13px;
    line-height: 1;

    cursor: pointer;
    white-space: nowrap;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.ecube-filter-btn:hover {
    color: #111111;
}

.ecube-filter-btn.active {
    color: #111111;
}

.ecube-filter-btn.active:after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;

    height: 2px;

    background: #111111;
}


/* =========================================================
   PROJECT GRID
   ========================================================= */

.ecube-project-grid {
    display: grid;

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

    column-gap: 24px;
    row-gap: 55px;

    width: 100%;
}


/* =========================================================
   PROJECT CARD
   ========================================================= */

.ecube-project-card {
    min-width: 0;

    opacity: 1;

    transform: translateY(0);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.ecube-project-card.is-filtered {
    opacity: 0;
    transform: translateY(8px);
}

.ecube-project-card.is-hidden {
    display: none;
}

.ecube-project-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ecube-project-link:hover {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   PROJECT IMAGE
   ========================================================= */

.ecube-project-image {
    position: relative;

    width: 100%;

    /*
     * Architecture portfolio ratio.
     * Can be changed later if actual project image ratio
     * needs to be preserved.
     */
    aspect-ratio: 4 / 3;

    overflow: hidden;

    background: #f2f2f2;
}

.ecube-project-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.ecube-project-link:hover .ecube-project-image img {
    transform: scale(1.035);
}


/* =========================================================
   DESKTOP HOVER
   ========================================================= */

.ecube-project-hover {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: flex-end;

    padding: 25px;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.48),
            rgba(0, 0, 0, 0) 55%
        );

    opacity: 0;

    transition: opacity 0.3s ease;
}

.ecube-project-link:hover .ecube-project-hover {
    opacity: 1;
}

.ecube-project-view {
    color: #ffffff;

    font-size: 12px;
    line-height: 1;

    letter-spacing: 1px;
    text-transform: uppercase;
}

.ecube-project-arrow {
    display: inline-block;

    margin-left: 7px;

    transition: transform 0.25s ease;
}

.ecube-project-link:hover .ecube-project-arrow {
    transform: translateX(5px);
}


/* =========================================================
   PROJECT INFORMATION
   ========================================================= */

.ecube-project-info {
    padding-top: 17px;
}

.ecube-project-title {
    margin: 0;

    color: #111111;

    font-size: 20px;
    line-height: 1.3;

    font-weight: 500;
}

.ecube-project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 7px;

    margin-top: 7px;

    color: #777777;

    font-size: 12px;
    line-height: 1.4;
}

.ecube-project-meta-separator {
    color: #aaaaaa;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.ecube-project-empty {
    padding: 80px 20px;
    text-align: center;
}

.ecube-project-empty p {
    margin: 0;
    color: #777777;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .ecube-projects-section {
        padding: 70px 0 80px;
    }

    .ecube-projects-section .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }

    .ecube-projects-heading h1 {
        font-size: 40px;
    }

    .ecube-project-filter {
        gap: 24px;
    }

    .ecube-project-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        column-gap: 20px;
        row-gap: 42px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .ecube-projects-section {
        padding: 50px 0 60px;
    }

    .ecube-projects-section .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }


    /* Heading */

    .ecube-projects-heading {
        display: block;
        margin-bottom: 28px;
    }

    .ecube-projects-eyebrow {
        margin-bottom: 8px;
        font-size: 10px;
        letter-spacing: 1.7px;
    }

    .ecube-projects-heading h1 {
        font-size: 34px;
        letter-spacing: -0.5px;
    }

    .ecube-projects-count {
        margin-top: 12px;
        padding-bottom: 0;

        font-size: 11px;
    }


    /* Filter */

    .ecube-project-filter-wrapper {
        margin-bottom: 30px;
    }

    .ecube-project-filter {
        gap: 22px;
    }

    .ecube-filter-btn {
        min-height: 40px;
        padding-bottom: 12px;

        font-size: 12px;
    }


    /* One project per row */

    .ecube-project-grid {
        display: grid;

        grid-template-columns: 1fr;

        row-gap: 36px;
    }


    /* =====================================================
       IMPORTANT MOBILE REQUIREMENT

       Image first
       Project name below image
       NO text overlay
       ===================================================== */

    .ecube-project-image {
        aspect-ratio: 16 / 11;
    }

    .ecube-project-hover {
        display: none;
    }

    .ecube-project-link:hover .ecube-project-image img {
        transform: none;
    }

    .ecube-project-info {
        padding-top: 13px;
    }

    .ecube-project-title {
        font-size: 19px;
        line-height: 1.3;
        font-weight: 500;
    }

    .ecube-project-meta {
        margin-top: 5px;

        font-size: 11px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .ecube-projects-section .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .ecube-projects-heading h1 {
        font-size: 30px;
    }

    .ecube-project-grid {
        row-gap: 32px;
    }

    .ecube-project-title {
        font-size: 18px;
    }

}