/* ===================== */
/* COSA OFFRO            */
/* ===================== */

.services-overlay,
.booking-overlay {
    display: none;
}

.services-popup {
    position: relative;
    width: min(880px, 94vw);
    max-height: 90vh;
    padding: 32px 40px 30px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.services-popup .modal-sub {
    max-width: 74ch;
}

.services-popup .modal-head {
    margin-bottom: 20px;
}

/* servizi in card di vetro, come quelle di My job: niente icone né liste */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.35s var(--ease-out, ease), box-shadow 0.35s ease, background 0.25s ease;
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.62);
        box-shadow: inset 0 1px 0 #fff, 0 12px 28px rgba(60, 20, 20, 0.08);
    }
}

.service-for {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b6461;
}

.service-card h3 {
    margin: 0;
    font-family: var(--font-main);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-primary);
}

.service-card p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: #3d3b40;
}

.service-card .service-for {
    font-size: 12px;
    color: #6b6461;
}

.service-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto !important;
    padding-top: 6px;
}

.service-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(159, 9, 9, 0.07);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.service-links a:hover {
    background: rgba(159, 9, 9, 0.14);
}

.service-links svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.services-how {
    margin-top: 12px;
    padding: 14px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.services-how p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: #3d3b40;
}

.services-how strong {
    color: var(--color-text);
}

.services-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 28px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.services-note {
    flex: 1 1 320px;
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    font-style: italic;
    color: #4a4543;
}

/* "firma" con il font del nome in home */
.services-sign {
    white-space: nowrap;
    font-family: var(--font-main);
    font-size: 19px;
    font-style: normal;
    color: var(--color-primary);
}

.services-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===================== */
/* PRENOTA UNA CALL      */
/* ===================== */

.booking-popup {
    position: relative;
    width: min(880px, 94vw);
    max-height: 92vh;
    padding: 32px 36px 26px;
    overflow-y: auto;
}

.booking-frame {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.06);
}

.booking-frame iframe {
    display: block;
    width: 100%;
    height: min(640px, 62vh);
    border: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.booking-frame.is-loaded iframe {
    opacity: 1;
}

.booking-loading {
    position: absolute;
    inset: 0;
    margin: 0;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: #5f5a57;
}

.booking-frame.is-loaded .booking-loading {
    display: none;
}

.booking-alt {
    margin: 16px 0 0;
    font-size: 14px;
    color: #5f5a57;
}

.booking-alt a {
    color: var(--color-primary);
    font-weight: 600;
}

/* schermi bassi: più compatto, così non serve scorrere */
@media (min-width: 769px) and (max-height: 780px) {
    .services-popup { padding-top: 26px; padding-bottom: 24px; }
    .services-popup .modal-title { font-size: 30px; }
    .services-popup .modal-head { margin-bottom: 14px; gap: 6px; }
    .services-grid { gap: 10px; }
    .service-card { padding: 12px 16px 14px; gap: 4px; }
    .service-card h3 { font-size: 19px; }
    .service-card p,
    .services-how p,
    .services-note { font-size: 14px; line-height: 1.45; }
    .services-how { margin-top: 10px; padding: 10px 16px; }
    .services-footer { margin-top: 12px; padding-top: 12px; }
    .services-actions .btn { min-height: 42px; }
}

@media (max-width: 768px) {
    /* su mobile le card scorrono di lato: la successiva si intravede */
    .services-grid {
        display: flex;
        gap: 10px;
        margin: 0 -20px;
        padding: 0 20px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 20px;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    .services-grid::-webkit-scrollbar {
        display: none;
    }

    .service-card {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }

    .services-popup .modal-sub {
        font-size: 13.5px;
        line-height: 1.5;
    }

    .services-popup .modal-head {
        margin-bottom: 14px;
        gap: 6px;
    }

    .service-card {
        padding: 12px 16px 14px;
        gap: 4px;
    }

    .services-how {
        margin-top: 10px;
        padding: 10px 14px;
    }

    .services-footer {
        margin-top: 12px;
        padding-top: 12px;
    }

    .service-card h3 {
        font-size: 19px;
    }

    .service-card p,
    .services-how p,
    .services-note {
        font-size: 13.5px;
        line-height: 1.5;
    }

    .services-footer {
        gap: 14px;
    }

    .services-actions {
        width: 100%;
        flex-wrap: nowrap;
    }

    .services-actions .btn {
        flex: 1 1 0;
        justify-content: center;
        padding: 0 12px;
        font-size: 14px;
    }

    .booking-frame iframe {
        height: calc(92dvh - 250px);
        min-height: 420px;
    }
}
