/* Ottimizzazione della scheda struttura su tablet e smartphone */
.detail-hero {
    box-sizing: border-box;
    height: clamp(400px,54vh,520px);
    min-height: 400px;
    padding: 0!important
}

.detail-hero>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.detail-hero-shade {
    pointer-events: none
}

@media(max-width: 800px) {
    .detail-hero {
        height:clamp(360px,62vh,500px);
        min-height: 0
    }

    .detail-hero>img {
        width: 100%;
        object-fit: cover
    }

    .detail-title {
        bottom: 28px
    }

    .detail-title h1 {
        max-width: 100%;
        font-size: clamp(36px,10vw,56px);
        line-height: 1.02;
        overflow-wrap: anywhere
    }

    .detail-title p {
        font-size: 16px
    }

    .detail-layout {
        gap: 32px;
        padding-top: 50px;
        padding-bottom: 65px
    }

    .detail-content h2 {
        font-size: clamp(32px,8vw,44px)
    }

    .contact-card {
        position: static;
        padding: 24px;
        border-radius: 18px
    }
}

@media(max-width: 650px) {
    .detail-page {
        overflow:hidden
    }

    .detail-hero {
        height: 400px
    }

    .detail-hero-shade {
        background: linear-gradient(180deg,#2d211421 10%,#2d2114e8 100%)
    }

    .detail-title {
        bottom: 24px
    }

    .detail-title h1 {
        margin: 10px 0 7px;
        font-size: clamp(34px,11vw,46px)
    }

    .detail-tag {
        padding: 7px 11px;
        font-size: 10px
    }

    .structure-gallery {
        padding-top: 42px;
        padding-bottom: 5px
    }

    .structure-gallery h2 {
        margin-bottom: 18px;
        font-size: clamp(30px,9vw,39px);
        overflow-wrap: anywhere
    }

    .gallery-stage {
        height: auto;
        min-height: 0;
        aspect-ratio: 4/3;
        border-radius: 16px
    }

    .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 20px;
        box-shadow: 0 4px 14px #0005
    }

    .gallery-prev {
        left: 10px
    }

    .gallery-next {
        right: 10px
    }

    .gallery-count {
        right: 10px;
        bottom: 10px;
        padding: 6px 10px;
        font-size: 12px
    }

    .gallery-thumbs {
        gap: 7px;
        padding: 9px 1px 2px;
        scroll-snap-type: x proximity
    }

    .gallery-thumb {
        flex-basis: 76px;
        height: 55px;
        border-width: 2px;
        border-radius: 8px;
        scroll-snap-align: start
    }

    .detail-layout {
        padding-top: 45px;
        padding-bottom: 55px
    }

    .detail-content h2 {
        margin-bottom: 20px;
        font-size: clamp(31px,9vw,40px);
        overflow-wrap: anywhere
    }

    .detail-description {
        font-size: 16px;
        line-height: 1.7
    }

    .detail-content h3 {
        margin-top: 31px
    }

    .detail-services {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .detail-services span {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 10px 11px;
        border-radius: 12px;
        font-size: 13px
    }

    .detail-services b {
        color: #9c7535
    }

    .contact-card h3 {
        font-size: 25px
    }

    .contact-card p {
        font-size: 14px
    }

    .contact-actions {
        display: grid;
        gap: 9px
    }

    .contact-card a {
        margin-top: 0;
        min-height: 46px;
        display: grid;
        place-items: center
    }

    .contact-card small {
        padding-top: 17px;
        margin-top: 18px;
        border-top: 1px solid #eee5d8
    }

    .lightbox {
        padding: 62px 10px 80px
    }

    .lightbox-close {
        right: 12px;
        top: 12px;
        width: 42px;
        height: 42px
    }

    .lightbox-nav {
        bottom: 16px;
        width: 45px;
        height: 45px
    }

    .lightbox-prev {
        left: calc(50% - 54px)
    }

    .lightbox-next {
        right: calc(50% - 54px)
    }
}

@media(max-width: 390px) {
    .detail-hero {
        height:365px
    }

    .detail-title h1 {
        font-size: 33px
    }

    .detail-services {
        grid-template-columns: 1fr
    }
}

.contact-card {
    text-align: center
}

.contact-card h3,.contact-card p {
    text-align: center
}

.contact-card>p {
    margin-left: auto;
    margin-right: auto
}

.contact-address {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin: 19px 0 20px;
    padding: 17px 15px;
    border: 1px solid #e8dcc7;
    border-radius: 16px;
    background: linear-gradient(145deg,#fbf7ef,#f3ead9);
    color: #655a48;
    line-height: 1.5
}

.contact-address-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 2px;
    border-radius: 50%;
    background: #b58d47;
    color: #fff
}

.contact-address-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8
}

.contact-address strong {
    color: #4b3b27;
    font-size: 14px
}

.contact-address>span:not(.contact-address-icon) {
    font-size: 14px
}

.contact-address .maps-link {
    display: inline-flex;
    min-height: 0;
    margin: 5px 0 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    color: #7b5928;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 5px 15px #5b472815
}

.contact-actions {
    display: grid;
    gap: 10px
}

.contact-actions a {
    margin-top: 0
}

.structure-identifiers {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 19px;
    border-top: 1px solid #eee5d8;
    color: #746956;
    text-align: center
}

.structure-identifiers>strong {
    margin-bottom: 2px;
    color: #4b3b27;
    font-size: 15px
}

.structure-identifiers span {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    overflow-wrap: anywhere
}

.structure-identifiers b {
    /* min-width:48px; */
    color: #9a7538;
    /* font-size:12px; */
    /* text-align:right; */
}

.structure-identifiers em {
    /* min-width:0; */
    color: #4b3b27;
    font-size: 16px;
    font-style: normal;
    font-weight: 800;
    /* text-align:left; */
    /* letter-spacing:.015em; */
}

@media(max-width: 390px) {
    .structure-identifiers span {
        display:grid;
        gap: 2px
    }

    .structure-identifiers b,.structure-identifiers em {
        text-align: center
    }

    .contact-address {
        padding: 15px 12px
    }
}
