/* =========================
   OUR PROJECTS SECTION
========================= */

.projects-section {
    background: #f4f5ed;
    padding: 75px 0;
}


/* =========================
   PROJECT HEADER
========================= */

.projects-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 40px;
    margin-bottom: 40px;
}


.projects-header > div:first-child {
    max-width: 550px;
}


.projects-header .section-label {
    margin-bottom: 16px;
}


.projects-header h2 {
    margin-bottom: 14px;

    font-family: Georgia, serif;

    font-size: 38px;
    font-weight: 400;

    line-height: 1.12;

    color: #111111;
}


.projects-header h2 em {
    color: #397c55;
    font-style: italic;
}


.projects-description {
    max-width: 430px;

    margin: 0;

    color: #444444;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================
   CAROUSEL CONTROLS
========================= */

.projects-controls {
    display: flex;
    align-items: center;

    gap: 10px;
}


.project-prev,
.project-next {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #aeb9af;
    border-radius: 50%;

    background: #ffffff;

    color: #145c3b;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}


.project-prev:hover,
.project-next:hover {
    background: #145c3b;

    border-color: #145c3b;

    color: #ffffff;

    transform: translateY(-2px);
}


.project-prev:focus,
.project-next:focus {
    outline: none;
}


.project-prev:disabled,
.project-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


/* =========================
   CAROUSEL
========================= */

.projects-carousel {
    position: relative;

    width: 100%;

    overflow: hidden;
}


.projects-track {
    display: flex;

    gap: 16px;

    transition: transform 0.6s ease;

    will-change: transform;
}


/* =========================
   PROJECT CARD
========================= */

.project-card {
    flex: 0 0 calc((100% - 32px) / 3);

    min-width: 0;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border: 1px solid #e1e6e1;

    border-radius: 6px;

    overflow: hidden;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.project-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08);
}


/* =========================
   PROJECT IMAGE
========================= */

.project-image {
    width: 100%;
    height: 260px;

    overflow: hidden;
}


.project-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition: transform 0.5s ease;
}


.project-card:hover .project-image img {
    transform: scale(1.05);
}


/* =========================
   PROJECT CONTENT
========================= */

.project-content {
    min-height: 175px;

    padding: 18px 20px 20px;

    display: flex;
    flex-direction: column;

    justify-content: space-between;
}


.project-location {
    margin: 0 0 8px;

    color: #397c55;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: 0.5px;
}


.project-content h3 {
    margin: 0 0 8px;

    color: #173d2c;

    font-size: 18px;
    font-weight: 600;
}


.project-content > div > p:last-child {
    margin: 0;

    color: #444444;

    font-size: 11px;

    line-height: 1.55;
}


/* =========================
   PROJECT VIEW BUTTON
========================= */

.project-link {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    margin-top: 16px;
    padding: 9px 16px;

    border: 1px solid #145c3b;
    border-radius: 3px;

    background: transparent;

    color: #145c3b;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}


.project-link i {
    font-size: 10px;

    transition:
        transform 0.3s ease;
}


.project-link:hover {
    background: #145c3b;

    border-color: #145c3b;

    color: #ffffff;

    transform: translateY(-1px);
}


.project-link:hover i {
    transform: translateX(4px);
}


.project-link:active {
    transform: translateY(0);
}


.project-link:focus {
    outline: none;
}


.project-link:focus-visible {
    outline: 2px solid #397c55;
    outline-offset: 3px;
}


/* =========================
   PROJECT FOOTER
========================= */

.projects-footer {
    margin-top: 30px;

    display: flex;

    justify-content: flex-end;
}


.projects-footer .view-all-btn {
    min-height: 42px;

    padding: 0 16px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    border: 1px solid #9ba89f;

    border-radius: 4px;

    background: transparent;

    color: #111111;

    font-family: inherit;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}


.projects-footer .view-all-btn:hover {
    background: #063d2a;

    border-color: #063d2a;

    color: #ffffff;
}


.projects-footer .view-all-btn:focus {
    outline: none;
}


.projects-footer .view-all-btn:focus-visible {
    outline: 2px solid #397c55;
    outline-offset: 3px;
}


/* =========================
   PROJECT DETAILS MODAL
========================= */

.project-modal,
.all-projects-modal {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100vh;

    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


.project-modal.active,
.all-projects-modal.active {
    opacity: 1;
    visibility: visible;
}


/* =========================
   MODAL OVERLAY
========================= */

.project-modal-overlay,
.all-projects-modal-overlay {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(4px);
}


/* =========================
   PROJECT DETAILS BOX
========================= */

.project-modal-box {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 1000px;

    height: 82vh;
    max-height: 820px;

    display: grid;

    grid-template-columns: 45% 55%;

    overflow: hidden;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25);
}


/* =========================
   PROJECT MODAL CLOSE
========================= */

.project-modal-close {
    position: absolute;

    top: 18px;
    right: 18px;

    z-index: 5;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #f1f3f1;

    color: #111111;

    font-size: 16px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


.project-modal-close:hover {
    background: #063d2a;

    color: #ffffff;
}


.project-modal-close:focus {
    outline: none;
}


.project-modal-close:focus-visible {
    outline: 2px solid #397c55;

    outline-offset: 3px;
}


/* =========================
   PROJECT MODAL IMAGE
========================= */

.project-modal-image {
    position: relative;

    width: 100%;
    height: 100%;

    min-height: 0;

    overflow: hidden;

    background: #ffffff;
}


.project-modal-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center center;

    transform: scale(1.01);
}


/* =========================
   PROJECT MODAL CONTENT
========================= */

.project-modal-content {
    min-width: 0;

    padding: 50px 40px;

    overflow-y: auto;
}


.project-modal-label {
    margin: 0 0 10px;

    color: #397c55;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}


.project-modal-content h2 {
    margin: 0 0 15px;

    color: #111111;

    font-family: Georgia, serif;

    font-size: 34px;
    font-weight: 400;

    line-height: 1.2;
}


.project-modal-description,
.project-modal-details {
    color: #555555;

    font-size: 14px;

    line-height: 1.7;
}


.project-modal-description {
    margin-bottom: 0;
}


.project-modal-details {
    margin-top: 12px;
}


.project-modal-features {
    margin-top: 25px;
}


.project-modal-features h3 {
    margin: 0 0 12px;

    color: #111111;

    font-size: 15px;
    font-weight: 600;
}


.project-modal-features ul {
    margin: 0;

    padding-left: 20px;
}


.project-modal-features li {
    margin-bottom: 8px;

    color: #555555;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================
   REQUEST A QUOTE
========================= */

.project-modal-quote {
    margin-top: 25px;

    padding: 12px 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    border: none;

    border-radius: 4px;

    background: #063d2a;

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}


.project-modal-quote:hover {
    background: #145c3b;

    transform: translateY(-1px);
}


.project-modal-quote i {
    transition: transform 0.3s ease;
}


.project-modal-quote:hover i {
    transform: translateX(4px);
}


.project-modal-quote:focus {
    outline: none;
}


.project-modal-quote:focus-visible {
    outline: 2px solid #397c55;

    outline-offset: 3px;
}


/* =========================
   ALL PROJECTS MODAL
========================= */

.all-projects-modal-box {
    position: relative;

    z-index: 2;

    width: 100%;
    max-width: 1100px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 35px;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.25);

    box-sizing: border-box;
}


/* =========================
   ALL PROJECTS CLOSE
========================= */

.all-projects-modal-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    background: #f1f3f1;

    color: #111111;

    font-size: 16px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        color 0.3s ease;
}


.all-projects-modal-close:hover {
    background: #063d2a;

    color: #ffffff;
}


.all-projects-modal-close:focus {
    outline: none;
}


.all-projects-modal-close:focus-visible {
    outline: 2px solid #397c55;

    outline-offset: 3px;
}


/* =========================
   ALL PROJECTS HEADER
========================= */

.all-projects-modal-header {
    margin-bottom: 28px;

    padding-right: 45px;
}


.all-projects-modal-header p {
    margin: 0 0 10px;

    color: #397c55;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
}


.all-projects-modal-header h2 {
    margin: 0;

    color: #111111;

    font-family: Georgia, serif;

    font-size: 34px;
    font-weight: 400;

    line-height: 1.2;
}


.all-projects-modal-header h2 em {
    color: #397c55;

    font-style: italic;
}


/* =========================
   ALL PROJECTS GRID
========================= */

.all-projects-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================
   ALL PROJECT CARD
========================= */

.all-project-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e8e5;

    border-radius: 7px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.all-project-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.10);
}


/* =========================
   ALL PROJECT IMAGE
========================= */

.all-project-card-image {
    width: 100%;
    height: 180px;

    overflow: hidden;
}


.all-project-card-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    object-position: center;

    transition: transform 0.4s ease;
}


.all-project-card:hover .all-project-card-image img {
    transform: scale(1.05);
}


/* =========================
   ALL PROJECT CONTENT
========================= */

.all-project-card-content {
    padding: 15px;
}


.all-project-location {
    margin: 0 0 7px;

    color: #397c55;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.2px;
}


.all-project-card-content h3 {
    margin: 0 0 7px;

    color: #111111;

    font-size: 15px;
    font-weight: 600;
}


.all-project-card-content > p:not(.all-project-location) {
    min-height: 55px;

    margin: 0 0 12px;

    color: #555555;

    font-size: 12px;

    line-height: 1.5;
}


/* =========================
   ALL PROJECT DETAILS
========================= */

.all-project-details {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 0;

    border: none;

    background: transparent;

    color: #145c3b;

    font-family: inherit;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}


.all-project-details i {
    font-size: 10px;

    transition:
        transform 0.3s ease;
}


.all-project-details:hover i {
    transform: translateX(4px);
}


.all-project-details:focus {
    outline: none;
}


.all-project-details:focus-visible {
    outline: 2px solid #397c55;

    outline-offset: 3px;
}


/* =========================
   TABLET / IPAD
========================= */

@media (max-width: 991.98px) {

    .projects-section {
        padding: 65px 0;
    }


    /* Header */

    .projects-header {
        margin-bottom: 35px;

        gap: 25px;
    }


    .projects-header h2 {
        font-size: 34px;
    }


    .projects-description {
        max-width: 300px;
    }


    /* Two cards */

    .project-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }


    /* Project image */

    .project-image {
        height: 220px;
    }


    /* Project content */

    .project-content {
        min-height: 165px;

        padding: 16px 17px 18px;
    }


    .project-content h3 {
        font-size: 16px;
    }


    .project-content > div > p:last-child {
        font-size: 10px;
    }


    /* Project modal */

    .project-modal {
        padding: 20px;
    }


    .project-modal-box {
        grid-template-columns: 1fr;

        height: auto;

        max-height: 92vh;

        overflow-y: auto;
    }


    .project-modal-image {
        width: 100%;

        min-height: 280px;

        height: 280px;
    }


    .project-modal-image img {
        object-position: center center;
    }


    .project-modal-content {
        padding: 30px;
    }


    /* All projects */

    .all-projects-modal {
        padding: 20px;
    }


    .all-projects-modal-box {
        padding: 28px;

        max-height: 92vh;
    }


    .all-projects-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================
   SMALL TABLETS
========================= */

@media (max-width: 767.98px) {

    .projects-header {
        align-items: flex-start;
    }


    .projects-header > div:first-child {
        max-width: 100%;
    }


    .projects-description {
        max-width: 400px;
    }


    .projects-controls {
        flex-shrink: 0;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 575.98px) {

    .projects-section {
        padding: 55px 0;
    }


    /* Header */

    .projects-header {
        display: block;

        margin-bottom: 30px;
    }


    .projects-header > div:first-child {
        max-width: 100%;
    }


    .projects-header h2 {
        font-size: 30px;

        line-height: 1.15;
    }


    .projects-description {
        max-width: 100%;

        font-size: 13px;

        line-height: 1.6;
    }


    /* Controls */

    .projects-controls {
        margin-top: 22px;
    }


    .project-prev,
    .project-next {
        width: 38px;
        height: 38px;
    }


    /* One card */

    .project-card {
        flex: 0 0 100%;
    }


    /* Image */

    .project-image {
        height: 230px;
    }


    /* Content */

    .project-content {
        min-height: 170px;

        padding: 18px;
    }


    .project-content h3 {
        font-size: 17px;
    }


    .project-content > div > p:last-child {
        font-size: 12px;
    }


    /* View project */

    .project-link {
        font-size: 12px;

        padding: 9px 15px;
    }


    /* Footer */

    .projects-footer {
        margin-top: 25px;

        justify-content: flex-start;
    }


    /* Project modal */

    .project-modal {
        padding: 12px;
    }


    .project-modal-box {
        max-height: 94vh;

        border-radius: 8px;
    }


    .project-modal-image {
        min-height: 220px;

        height: 220px;
    }


    .project-modal-content {
        padding: 25px 20px;
    }


    .project-modal-content h2 {
        font-size: 27px;
    }


    .project-modal-description,
    .project-modal-details {
        font-size: 13px;
    }


    /* All projects */

    .all-projects-modal {
        padding: 12px;
    }


    .all-projects-modal-box {
        max-height: 94vh;

        padding: 22px 18px;

        border-radius: 8px;
    }


    .all-projects-modal-header {
        margin-bottom: 20px;

        padding-right: 40px;
    }


    .all-projects-modal-header h2 {
        font-size: 27px;
    }


    .all-projects-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }


    .all-project-card-image {
        height: 190px;
    }


    .all-project-card-content > p:not(.all-project-location) {
        min-height: auto;
    }

}


/* =========================
   VERY SMALL MOBILE
========================= */

@media (max-width: 375px) {

    .projects-section {
        padding: 45px 0;
    }


    .projects-header h2 {
        font-size: 28px;
    }


    .project-image {
        height: 210px;
    }


    .project-content {
        min-height: 165px;

        padding: 16px;
    }


    .project-modal-content {
        padding: 22px 18px;
    }


    .project-modal-image {
        height: 200px;

        min-height: 200px;
    }

}