/*
 * Restyling leggero della sola homepage desktop di OttantaCostruzioni.
 * Il file è caricato dopo i CSS del tema e non modifica tablet e smartphone.
 */

@media (min-width: 992px) {
    /* HERO: meno altezza vuota e gerarchia più leggibile */
    .home-desktop-restyle #home.first-section {
        padding: 13em 0 10em;
    }

    .home-desktop-restyle #home .big-tagline {
        max-width: 650px;
    }

    .home-desktop-restyle #home .big-tagline h1 {
        color: #ffffff;
        font-size: 48px;
        font-weight: 700;
        line-height: 1.12 !important;
        letter-spacing: -0.5px;
        margin: 0 0 22px;
        padding: 0;
        text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
    }

    .home-desktop-restyle #home .big-tagline p.lead {
        max-width: 630px;
        font-size: 20px;
        line-height: 1.55;
        padding-bottom: 12px;
    }

    .home-desktop-restyle #home .soa-info-row,
    .home-desktop-restyle #home .google-reviews-badge.leads {
        display: inline-flex;
        align-items: center;
        width: auto;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;
        background: rgba(16, 31, 42, 0.22);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .home-desktop-restyle #home .soa-info-row {
        gap: 8px;
        margin: 4px 0 12px;
        padding: 7px 14px !important;
        font-size: 15px !important;
        font-weight: 600;
    }

    .home-desktop-restyle #home .soa-info-row i {
        color: #ffffff;
        font-size: 16px;
    }

    .home-desktop-restyle #home .google-reviews-badge.leads {
        margin: 0 0 2px;
        padding: 7px 15px !important;
        font-size: 15px;
        font-style: normal;
    }

    .home-desktop-restyle #home .btn-container {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 24px;
    }

    .home-desktop-restyle #home .ban-btn {
        min-width: 170px;
        margin: 0 !important;
        padding: 13px 28px !important;
        border-radius: 9px;
        font-size: 16px !important;
        font-weight: 700 !important;
        letter-spacing: 0.1px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.14);
        transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
    }

    .home-desktop-restyle #home .hero-btn-primary {
        border-color: #3fc7e6 !important;
        background-color: #3fc7e6 !important;
        color: #ffffff !important;
    }

    .home-desktop-restyle #home .hero-btn-secondary {
        border: 2px solid #ffffff !important;
        background-color: rgba(255, 255, 255, 0.22) !important;
        color: #ffffff !important;
        text-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.17);
    }

    .home-desktop-restyle #home .ban-btn:hover,
    .home-desktop-restyle #home .ban-btn:focus {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    }

    .home-desktop-restyle #home .hero-btn-primary:hover,
    .home-desktop-restyle #home .hero-btn-primary:focus {
        border-color: #ffffff !important;
        background-color: #ffffff !important;
        color: #168eaa !important;
    }

    .home-desktop-restyle #home .hero-btn-secondary:hover,
    .home-desktop-restyle #home .hero-btn-secondary:focus {
        border-color: #ffffff !important;
        background-color: #ffffff !important;
        color: #1f1f1f !important;
    }

    /* Spazi e titoli: più compatti e coerenti */
    .home-desktop-restyle #about.nopadtop {
        margin-bottom: 70px;
    }

    .home-desktop-restyle #services,
    .home-desktop-restyle #testimonials {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .home-desktop-restyle #services .section-title,
    .home-desktop-restyle #testimonials .section-title,
    .home-desktop-restyle #faq .section-title {
        margin-top: 0;
        margin-bottom: 42px;
    }

    .home-desktop-restyle #services .section-title h3,
    .home-desktop-restyle #testimonials .section-title h3,
    .home-desktop-restyle #faq .section-title h3 {
        margin-bottom: 14px;
        font-size: 38px;
        font-weight: 650;
        line-height: 1.25 !important;
    }

    /* SERVIZI: card uniformi, moderne e più leggere */
    .home-desktop-restyle #services .row.text-center {
        display: flex;
        flex-wrap: wrap;
    }

    .home-desktop-restyle #services .row.text-center > [class*="col-"] {
        display: flex;
        float: none;
    }

    .home-desktop-restyle #services hr.invis {
        margin: 15px 0;
    }

    .home-desktop-restyle #services .service-widget {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        padding: 0 0 26px;
        overflow: hidden;
        border: 0;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 12px 34px rgba(29, 45, 58, 0.09);
        text-align: left;
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .home-desktop-restyle #services .service-widget:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 42px rgba(29, 45, 58, 0.14);
    }

    .home-desktop-restyle #services .service-widget .post-media {
        overflow: hidden;
    }

    .home-desktop-restyle #services .service-widget .post-media img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 0;
        object-fit: initial;
        transition: none;
    }

    .home-desktop-restyle #services .service-widget:hover .post-media img {
        transform: none;
    }

    .home-desktop-restyle #services .service-widget h3 {
        min-height: 82px;
        margin: 0;
        padding: 24px 24px 10px;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.35 !important;
    }

    .home-desktop-restyle #services .service-widget p {
        flex: 1 1 auto;
        margin: 0;
        padding: 0 24px;
        color: #5d5d5d;
        font-size: 15.5px;
        line-height: 1.7;
    }

    /* TESTIMONIANZE: tre card con altezza uniforme */
    .home-desktop-restyle #testimonials {
        margin-bottom: 0;
    }

    .home-desktop-restyle #testimonials .testimonial-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .home-desktop-restyle #testimonials .testimonial-grid > .col-md-4 {
        display: flex;
        float: none;
        margin-bottom: 0;
    }

    .home-desktop-restyle #testimonials .testimonial-card {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        padding: 32px 28px 28px;
        overflow: hidden;
        border: 1px solid #e9edf0;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 12px 32px rgba(29, 45, 58, 0.07);
        text-align: left;
    }

    .home-desktop-restyle #testimonials .testimonial-card::before {
        content: "\201C";
        position: absolute;
        top: 8px;
        right: 20px;
        color: rgba(63, 199, 230, 0.16);
        font-family: Georgia, serif;
        font-size: 86px;
        font-weight: 700;
        line-height: 1;
    }

    .home-desktop-restyle #testimonials .testimonial-card h4 {
        z-index: 1;
        margin: 0 0 10px;
        padding: 0;
        color: #1f1f1f;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.35 !important;
    }

    .home-desktop-restyle #testimonials .testimonial-card .stars {
        width: 108px;
        max-width: 100%;
        margin: 0 0 18px;
    }

    .home-desktop-restyle #testimonials .testimonial-card .testimonials {
        z-index: 1;
        margin: 0;
        color: #5d5d5d;
        font-size: 15.5px;
        line-height: 1.75;
        text-align: left;
    }
}


/* Tablet orizzontale e piccoli notebook: proporzioni leggermente più compatte. */
@media (min-width: 992px) and (max-width: 1199px) {
    .home-desktop-restyle #home.first-section {
        padding: 12em 0 9em;
    }

    .home-desktop-restyle #home .big-tagline h1 {
        font-size: 42px;
    }

    .home-desktop-restyle #home .big-tagline p.lead {
        font-size: 18px;
    }

    .home-desktop-restyle #home .ban-btn {
        min-width: 155px;
        padding-right: 22px !important;
        padding-left: 22px !important;
    }

    .home-desktop-restyle #services .service-widget h3 {
        min-height: 92px;
        padding-right: 20px;
        padding-left: 20px;
        font-size: 18px;
    }

    .home-desktop-restyle #services .service-widget p {
        padding-right: 20px;
        padding-left: 20px;
        font-size: 15px;
    }
}

/* Rispetta gli utenti che preferiscono animazioni ridotte. */
@media (prefers-reduced-motion: reduce) {
    .home-desktop-restyle #home .ban-btn,
    .home-desktop-restyle #services .service-widget,
    .home-desktop-restyle #services .service-widget .post-media img {
        transition: none !important;
    }
}

/* TESTIMONIANZE RESPONSIVE: stesso stile professionale anche su tablet e smartphone */
@media (max-width: 991px) {
    .home-desktop-restyle #testimonials {
        margin-bottom: 0;
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .home-desktop-restyle #testimonials .section-title {
        margin-top: 0;
        margin-bottom: 32px;
    }

    .home-desktop-restyle #testimonials .google-reviews-badge {
        display: inline-block;
        padding: 9px 16px;
        border: 1px solid #e5eaed;
        border-radius: 999px;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(29, 45, 58, 0.06);
        color: #3f464b;
        font-size: 14px;
        line-height: 1.45;
    }

    .home-desktop-restyle #testimonials .testimonial-grid > .col-md-4 {
        width: 100%;
        margin-bottom: 20px;
    }

    .home-desktop-restyle #testimonials .testimonial-grid > .col-md-4:last-child {
        margin-bottom: 0;
    }

    .home-desktop-restyle #testimonials .testimonial-card {
        position: relative;
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        padding: 28px 24px 25px;
        overflow: hidden;
        border: 1px solid #e9edf0;
        border-radius: 13px;
        background: #ffffff;
        box-shadow: 0 10px 28px rgba(29, 45, 58, 0.07);
        text-align: left;
    }

    .home-desktop-restyle #testimonials .testimonial-card::before {
        content: "\201C";
        position: absolute;
        top: 7px;
        right: 17px;
        color: rgba(63, 199, 230, 0.14);
        font-family: Georgia, serif;
        font-size: 74px;
        font-weight: 700;
        line-height: 1;
    }

    .home-desktop-restyle #testimonials .testimonial-card h4 {
        position: relative;
        z-index: 1;
        margin: 0 0 9px;
        padding: 0;
        color: #1f1f1f;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.35 !important;
    }

    .home-desktop-restyle #testimonials .testimonial-card .stars {
        position: relative;
        z-index: 1;
        display: block;
        width: 105px;
        max-width: 100%;
        margin: 0 0 16px;
    }

    .home-desktop-restyle #testimonials .testimonial-card .testimonials {
        position: relative;
        z-index: 1;
        margin: 0;
        color: #5d5d5d;
        font-size: 15.5px;
        line-height: 1.72;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .home-desktop-restyle #testimonials {
        padding-top: 44px;
        padding-bottom: 44px;
    }

    .home-desktop-restyle #testimonials .testimonial-card {
        padding: 24px 18px 22px;
        border-radius: 12px;
    }

    .home-desktop-restyle #testimonials .testimonial-card::before {
        right: 12px;
        font-size: 66px;
    }

    .home-desktop-restyle #testimonials .testimonial-card h4 {
        font-size: 17px;
    }

    .home-desktop-restyle #testimonials .testimonial-card .testimonials {
        font-size: 15px;
        line-height: 1.68;
    }
}

/* HERO MOBILE: gerarchia chiara tra pulsante secondario e contatto */
@media (max-width: 767px) {
    .home-desktop-restyle #home .btn-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-top: 0;
    }

    .home-desktop-restyle #home .ban-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 320px;
        min-height: 48px;
        margin: 0 !important;
        padding: 12px 20px !important;
        border-radius: 9px;
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 1.2;
        letter-spacing: 0.1px;
    }

    .home-desktop-restyle #home .hero-btn-secondary {
        border: 2px solid #ffffff !important;
        background: rgba(255, 255, 255, 0.92) !important;
        color: #176f85 !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.13);
    }

    .home-desktop-restyle #home .hero-btn-primary {
        border: 2px solid #3fc7e6 !important;
        background: #3fc7e6 !important;
        color: #ffffff !important;
        box-shadow: 0 10px 24px rgba(28, 151, 180, 0.28);
    }

    .home-desktop-restyle #home .hero-btn-secondary:active,
    .home-desktop-restyle #home .hero-btn-secondary:focus {
        background: #ffffff !important;
        color: #125c6f !important;
    }

    .home-desktop-restyle #home .hero-btn-primary:active,
    .home-desktop-restyle #home .hero-btn-primary:focus {
        border-color: #ffffff !important;
        background: #ffffff !important;
        color: #168eaa !important;
    }
}

/* Spazio leggibile tra il voto e il numero di recensioni nella hero */
.home-desktop-restyle #home .google-reviews-badge.leads strong {
    margin-right: 5px;
}
