:root{
    --agency-blue:#003348;
    --agency-border:#e9e9e9;
}

.agency-service-page{
    max-width:1200px;
    margin:60px auto;
    padding:0 20px;
}

/* ---------- GALLERIA: 1 grande a sinistra + 4 miniature a destra ---------- */

.agency-service-gallery{
    margin:0 0 60px;
}

.agency-gallery-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    grid-template-rows:repeat(2,minmax(0,1fr));
    gap:14px;
    aspect-ratio:3/1;
}

.agency-gallery-grid figure{
    margin:0;
    min-width:0;
    min-height:0;
    overflow:hidden;
}

.agency-gallery-grid img,
.agency-gallery-grid .agency-gallery-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:0;
}

.agency-gallery-main{
    grid-column:1;
    grid-row:1 / span 2;
}

/* Meno di 5 immagini: la griglia si adatta senza buchi */

.agency-gallery-grid--1{
    grid-template-columns:1fr;
    grid-template-rows:1fr;
    aspect-ratio:16/7;
}

.agency-gallery-grid--1 .agency-gallery-main{
    grid-row:1;
}

.agency-gallery-grid--2{
    grid-template-columns:2fr 1fr;
    grid-template-rows:1fr;
    aspect-ratio:9/4;
}

.agency-gallery-grid--2 .agency-gallery-main{
    grid-row:1;
}

.agency-gallery-grid--3{
    grid-template-columns:2fr 1fr;
    aspect-ratio:9/4;
}

.agency-gallery-grid--4{
    grid-template-columns:2fr 1fr 1fr;
    aspect-ratio:3/1;
}

.agency-gallery-grid--4 .agency-gallery-thumb:last-child{
    grid-column:2 / span 2;
}

/* ---------- LAYOUT A DUE COLONNE ---------- */

.agency-service-layout{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);
    gap:70px;
    align-items:start;
}

.agency-service-main{
    text-align:left;
}

/* ---------- TITOLO E DESCRIZIONE ---------- */

.agency-service-title{
    margin:0 0 24px;
    font-size:clamp(38px,4vw,54px);
    line-height:1.1;
    text-align:left;
    color:var(--agency-blue);
}

.agency-service-excerpt{
    max-width:none;
    margin:0 0 30px;
    font-size:inherit;
    line-height:1.7;
    text-align:left;
    color:var(--agency-blue);
}

.agency-service-content{
    max-width:none;
    margin:0 0 40px;
    font-size:inherit;
    line-height:1.7;
    text-align:left;
    color:var(--agency-blue);
}

.agency-service-content h2,
.agency-service-content h3{
    margin-top:40px;
    color:var(--agency-blue);
}

.agency-service-content img{
    max-width:100%;
    height:auto;
    border-radius:0;
}

.agency-service-content ul,
.agency-service-content ol{
    padding-left:25px;
}

.agency-service-content p:last-child{
    margin-bottom:0;
}

/* ---------- BOX PREZZO / DURATA ---------- */

.agency-service-info{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:30px;
    max-width:600px;
    margin:0 0 30px;
}

.agency-service-box{
    min-width:0;
    padding:28px 20px;
    border:1px solid var(--agency-border);
    border-radius:0;
    background:#fff;
    text-align:center;
}

.agency-service-label{
    display:block;
    margin-bottom:10px;
    font-size:14px;
    font-weight:600;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#888;
}

.agency-service-value{
    display:block;
    font-size:26px;
    font-weight:700;
    color:var(--agency-blue);
}

/* ---------- COLONNA DESTRA: FORM CONTATTI ---------- */

.agency-service-sidebar{
    position:sticky;
    top:100px;
}

.agency-contact-title{
    margin:0 0 25px;
    color:var(--agency-blue);
}

.agency-contact-form .wpforms-container,
.agency-contact-form .wpforms-container-full{
    margin:0;
}

.agency-contact-form .wpforms-field-label{
    color:var(--agency-blue);
}

/* ---------- PULSANTE ACQUISTO ---------- */

.agency-package-buy:empty{
    display:none;
}

.agency-package-buy-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    padding:0 28px;
    border-radius:0;
    background:var(--agency-blue);
    color:#fff;
    font-weight:700;
    text-decoration:none;
}

.agency-package-buy-button:hover,
.agency-package-buy-button:focus{
    color:#fff;
    background:#123f58;
    text-decoration:none;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width:1024px){

    .agency-service-layout{
        grid-template-columns:1fr;
        gap:50px;
    }

    .agency-service-sidebar{
        position:static;
    }

}

@media (max-width:768px){

    .agency-service-page{
        margin:40px auto;
    }

    .agency-service-gallery{
        margin-bottom:35px;
    }

    .agency-gallery-grid,
    .agency-gallery-grid--1,
    .agency-gallery-grid--2,
    .agency-gallery-grid--3,
    .agency-gallery-grid--4{
        grid-template-columns:1fr 1fr;
        grid-template-rows:auto;
        gap:10px;
        aspect-ratio:auto;
    }

    .agency-gallery-grid .agency-gallery-main{
        grid-column:1 / span 2;
        grid-row:auto;
        aspect-ratio:3/2;
    }

    .agency-gallery-grid--4 .agency-gallery-thumb:last-child{
        grid-column:auto;
    }

    .agency-gallery-thumb{
        aspect-ratio:3/2;
    }

    .agency-service-title{
        font-size:36px;
    }

    .agency-service-info{
        grid-template-columns:1fr;
        gap:15px;
    }

}
