/* =========================================================
   SEZIONE NUOVE COSTRUZIONI
   ========================================================= */

.new-builds-section {
    background: var(--color-background, #f5f5f3);
}

.new-builds-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 42px;
}


/* Scheda del singolo lavoro */

.new-build-card {
    min-width: 0;
}

.new-build-card-button {
    width: 100%;
    padding: 0;
    overflow: hidden;

    border: 1px solid rgba(10, 30, 45, 0.12);
    border-radius: 18px;
    background: #ffffff;

    text-align: left;
    cursor: pointer;

    box-shadow: 0 12px 32px rgba(5, 18, 29, 0.08);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.new-build-card-button:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 45px rgba(5, 18, 29, 0.16);
}


/* Immagine di copertina */

.new-build-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:  #ffffff;
}

.new-build-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.6s ease;
}

.new-build-card-button:hover .new-build-card-media img {
    transform: scale(1.05);
}


/* Numero delle fotografie */

.new-build-card-count {
    position: absolute;
    top: 15px;
    right: 15px;

    padding: 7px 11px;

    color: #ffffff;
    border-radius: 30px;
    background: rgba(5, 18, 29, 0.78);

    font-size: 0.7rem;
    font-weight: 800;
}


/* Testi della scheda */

.new-build-card-body {
    padding: 24px;
}

.new-build-card-category {
    margin-bottom: 8px;

    color: var(--color-accent, #b9824b);

    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.new-build-card-body h3 {
    margin: 0 0 10px;

    color: var(--color-primary, #07131e);

    font-size: 1.3rem;
    line-height: 1.2;
}

.new-build-card-location {
    margin: 0;
    color: #66717a;
    font-size: 0.9rem;
}

.new-build-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 20px;

    color: var(--color-primary, #07131e);

    font-size: 0.82rem;
    font-weight: 800;
}


/* =========================================================
   FINESTRA DELLA GALLERIA
   ========================================================= */

.project-gallery-dialog {
    width: min(94vw, 1100px);
    max-height: 92vh;
    padding: 0;
    overflow: auto;

    border: 0;
    border-radius: 20px;
    background: #ffffff;

    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.project-gallery-dialog::backdrop {
    background: rgba(5, 18, 29, 0.85);
    backdrop-filter: blur(6px);
}

.project-gallery-shell {
    position: relative;
    padding: 38px;
}


/* Pulsante di chiusura */

.project-gallery-close {
    position: absolute;
    z-index: 10;
    top: 18px;
    right: 18px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    padding: 0;

    color: #07131e;
    border: 1px solid rgba(5, 18, 29, 0.15);
    border-radius: 50%;
    background: #ffffff;

    font-size: 1.8rem;
    cursor: pointer;
}


/* Titolo della galleria */

.project-gallery-header {
    padding-right: 60px;
    margin-bottom: 24px;
}

.project-gallery-category {
    margin: 0 0 8px;

    color: var(--color-accent, #b9824b);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-gallery-header h2 {
    margin: 0;

    color: var(--color-primary, #07131e);

    font-size: clamp(1.7rem, 3vw, 2.6rem);
    line-height: 1.15;
}

#project-gallery-location {
    margin-top: 9px;
    color: #66717a;
}


/* Immagine principale */

.project-gallery-stage {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    gap: 14px;
}

.project-gallery-figure {
    margin: 0;
    overflow: hidden;

    border-radius: 14px;
    background: #07131e;
}

.project-gallery-figure img {
    display: block;
    width: 100%;
    height: min(62vh, 620px);

    object-fit: contain;
    background: #07131e;
}

.project-gallery-figure figcaption {
    min-height: 46px;
    padding: 13px 17px;

    color: rgba(255, 255, 255, 0.78);
    background: #07131e;

    font-size: 0.82rem;
}


/* Frecce */

.project-gallery-arrow {
    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;
    padding: 0;

    color: #07131e;
    border: 1px solid rgba(5, 18, 29, 0.15);
    border-radius: 50%;
    background: #ffffff;

    font-size: 2rem;
    cursor: pointer;
}

.project-gallery-arrow:hover {
    color: #ffffff;
    border-color: var(--color-accent, #b9824b);
    background: var(--color-accent, #b9824b);
}


/* Miniature */

.project-gallery-thumbnails {
    display: flex;
    gap: 10px;

    margin-top: 17px;
    padding-bottom: 5px;

    overflow-x: auto;
}

.project-gallery-thumbnail {
    flex: 0 0 100px;
    height: 68px;
    padding: 0;
    overflow: hidden;

    border: 3px solid transparent;
    border-radius: 9px;
    background: #07131e;

    cursor: pointer;
}

.project-gallery-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-gallery-thumbnail.active {
    border-color: var(--color-accent, #b9824b);
}


/* Informazioni finali */

.project-gallery-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    margin-top: 18px;

    color: #66717a;
    font-size: 0.75rem;
}

.project-gallery-note {
    text-align: right;
}


/* =========================================================
   TABLET E SMARTPHONE
   ========================================================= */

@media (max-width: 950px) {

    .new-builds-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .project-gallery-shell {
        padding: 28px 16px;
    }

    .project-gallery-stage {
        position: relative;
        display: block;
    }

    .project-gallery-arrow {
        position: absolute;
        z-index: 5;
        top: 50%;

        transform: translateY(-50%);
    }

    #project-gallery-previous {
        left: 10px;
    }

    #project-gallery-next {
        right: 10px;
    }

    .project-gallery-figure img {
        height: 52vh;
    }

}

@media (max-width: 560px) {

    .new-builds-grid {
        grid-template-columns: 1fr;
    }

    .new-build-card-body {
        padding: 21px;
    }

    .project-gallery-figure img {
        height: 44vh;
    }

    .project-gallery-thumbnail {
        flex-basis: 82px;
        height: 58px;
    }

    .project-gallery-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .project-gallery-note {
        text-align: left;
    }

}

/* =========================================================
   NUOVE COSTRUZIONI DENTRO "ALCUNI PROGETTI REALIZZATI"
   ========================================================= */

.new-builds-project-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    min-height: 750px;
    padding: 32px;

    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            #173d60 0%,
            #071c2e 100%
        );
}

.new-builds-panel-heading {
    position: relative;
    z-index: 2;

    margin-bottom: 24px;
}

.new-builds-panel-heading p {
    margin-bottom: 7px;

    color: var(--color-accent-light, #f2af68);

    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.new-builds-panel-heading h3 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(1.65rem, 2.5vw, 2.35rem);
    line-height: 1.15;
}

.new-builds-panel-heading span {
    display: block;

    margin-top: 10px;

    color: rgba(255, 255, 255, 0.7);

    font-size: 0.88rem;
    line-height: 1.5;
}


/* Le quattro costruzioni vengono disposte 2 × 2 */

.new-builds-grid-integrated {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;

    width: 100%;
    margin-top: 0;
}


/* Schede più compatte all'interno del riquadro */

.new-builds-grid-integrated .new-build-card-button {
    height: 100%;

    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 13px;

    background: #ffffff;

    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

.new-builds-grid-integrated .new-build-card-media {
    aspect-ratio: 16 / 9;
}

.new-builds-grid-integrated .new-build-card-body {
    padding: 17px;
}

.new-builds-grid-integrated .new-build-card-category {
    margin-bottom: 6px;
    font-size: 0.58rem;
}

.new-builds-grid-integrated .new-build-card-body h3 {
    margin-bottom: 7px;
    font-size: 1rem;
}

.new-builds-grid-integrated .new-build-card-location {
    font-size: 0.75rem;
    line-height: 1.4;
}

.new-builds-grid-integrated .new-build-card-action {
    margin-top: 13px;
    font-size: 0.72rem;
}

.new-builds-grid-integrated .new-build-card-count {
    top: 9px;
    right: 9px;

    padding: 5px 8px;

    font-size: 0.58rem;
}


/* Tablet e smartphone */

@media (max-width: 850px) {

    .new-builds-project-panel {
        min-height: auto;
    }

}

@media (max-width: 560px) {

    .new-builds-project-panel {
        padding: 22px 16px;
    }

    .new-builds-grid-integrated {
        grid-template-columns: 1fr;
    }

}

/* Casella efficientamento cliccabile */

.efficientamento-card {
    cursor: pointer;
}

.efficientamento-card:focus-visible {
    outline: 3px solid var(--color-accent, #b9824b);
    outline-offset: 4px;
}

.efficientamento-card-link {
    display: inline-block;
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 0.75rem;
    font-weight: 700;
}
.efficientamento-gallery-figure figcaption {
    display: none;
}

/* =========================================================
   ABITAZIONI PRIVATE
   ========================================================= */

.private-homes-open-card {
    cursor: pointer;
}

.private-homes-card-link {
    display: inline-block;
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 0.75rem;
    font-weight: 700;
}

.private-homes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;

    margin-top: 25px;
}

.private-homes-back {
    margin-bottom: 22px;
    padding: 9px 15px;

    border: 1px solid rgba(5, 18, 29, 0.15);
    border-radius: 30px;

    background: #ffffff;
    color: #07131e;

    font-weight: 700;
    cursor: pointer;
}

#private-home-gallery-caption:empty {
    display: none;
}

@media (max-width: 700px) {

    .private-homes-grid {
        grid-template-columns: 1fr;
    }

}