/* ======================================================
   19 — CARDS DE SERVIÇOS / MOBILE E TABLET
   Camada exclusiva da home. Não altera o desktop.
====================================================== */

@media (max-width: 1240px) {
    .services-grid {
        gap: clamp(20px, 2.3vw, 28px) !important;
    }

    .service-card:not(.service-card--grafica-online) {
        width: 100%;
        min-height: 470px !important;
        padding: clamp(30px, 3.2vw, 42px) !important;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        isolation: isolate;
        background:
            radial-gradient(circle at 100% 100%, rgba(244, 128, 52, 0.12), transparent 38%),
            linear-gradient(145deg, #ffffff 0%, #ffffff 72%, #fffaf6 100%);
        border: 1px solid rgba(28, 24, 21, 0.08);
        border-radius: clamp(28px, 3vw, 34px) !important;
        box-shadow:
            0 24px 60px rgba(32, 25, 20, 0.08),
            0 4px 14px rgba(32, 25, 20, 0.035);
    }

    .service-card:not(.service-card--grafica-online)::before {
        content: "";
        width: 112px;
        height: 6px;
        position: absolute;
        top: 0;
        left: clamp(30px, 3.2vw, 42px);
        z-index: 2;
        background: linear-gradient(90deg, #f48034, #ffb271);
        border-radius: 0 0 999px 999px;
    }

    .service-card:not(.service-card--grafica-online)::after {
        content: "";
        width: 132px;
        height: 132px;
        position: absolute;
        right: -66px;
        bottom: -70px;
        z-index: -1;
        border: 1px solid rgba(244, 128, 52, 0.16);
        border-radius: 50%;
    }

    .service-card:not(.service-card--grafica-online) .service-icon {
        width: clamp(74px, 7vw, 88px) !important;
        height: clamp(74px, 7vw, 88px) !important;
        margin: 0 0 26px !important;
        flex: 0 0 auto;
        position: relative;
        background: linear-gradient(145deg, #fff8f2, #ffeadc) !important;
        border: 1px solid rgba(244, 128, 52, 0.14);
        border-radius: 24px !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.95),
            0 12px 26px rgba(244, 128, 52, 0.12);
    }

    .service-card:not(.service-card--grafica-online) .service-icon img {
        width: clamp(44px, 4.3vw, 54px) !important;
        height: clamp(44px, 4.3vw, 54px) !important;
        object-fit: contain;
    }

    .service-card:not(.service-card--grafica-online) h3 {
        margin: 0 0 16px !important;
        color: #1c1815;
        font-size: clamp(24px, 2.35vw, 30px) !important;
        font-weight: 900;
        line-height: 1.14 !important;
        letter-spacing: -0.45px;
    }

    .service-card:not(.service-card--grafica-online) p {
        margin: 0 !important;
        flex: 1 1 auto;
        color: #706963;
        font-size: clamp(16px, 1.5vw, 18px) !important;
        font-weight: 500;
        line-height: 1.64 !important;
        text-align: left !important;
    }

    .service-card:not(.service-card--grafica-online) .pba-card-more {
        width: fit-content;
        min-height: 52px;
        margin: 30px 0 0 !important;
        padding: 6px 7px 6px 19px;
        gap: 14px;
        flex: 0 0 auto;
        color: #e96f24;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(244, 128, 52, 0.22);
        border-radius: 16px;
        font-size: 15px;
        font-weight: 900;
        line-height: 1;
        box-shadow: 0 10px 24px rgba(244, 128, 52, 0.1);
    }

    .service-card:not(.service-card--grafica-online) .pba-card-more span {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        color: #ffffff;
        background: linear-gradient(135deg, #f48034, #ee6f20);
        font-size: 18px;
        box-shadow: 0 8px 18px rgba(244, 128, 52, 0.24);
    }

    /* O quinto card deixa de parecer um item esquecido na coluna esquerda. */
    .service-card:not(.service-card--grafica-online):nth-of-type(5) {
        grid-column: 1 / -1;
        width: calc((100% - clamp(20px, 2.3vw, 28px)) / 2);
        justify-self: center;
    }
}

/* Celular: uma coluna, leitura confortável e abertura visual compacta. */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
    }

    .service-card:not(.service-card--grafica-online),
    .service-card:not(.service-card--grafica-online):nth-of-type(5) {
        width: 100%;
        min-height: 0 !important;
        padding: clamp(25px, 5vw, 34px) !important;
        display: grid;
        grid-template-columns: clamp(70px, 12vw, 82px) minmax(0, 1fr);
        column-gap: clamp(17px, 3.5vw, 24px);
        align-items: start;
    }

    .service-card:not(.service-card--grafica-online)::before {
        left: clamp(25px, 5vw, 34px);
    }

    .service-card:not(.service-card--grafica-online) .service-icon {
        grid-column: 1;
        grid-row: 1;
        width: clamp(70px, 12vw, 82px) !important;
        height: clamp(70px, 12vw, 82px) !important;
        margin: 0 !important;
    }

    .service-card:not(.service-card--grafica-online) .service-icon img {
        width: clamp(42px, 7.5vw, 50px) !important;
        height: clamp(42px, 7.5vw, 50px) !important;
    }

    .service-card:not(.service-card--grafica-online) h3 {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        margin: 0 !important;
        font-size: clamp(23px, 4.6vw, 29px) !important;
    }

    .service-card:not(.service-card--grafica-online) p {
        grid-column: 1 / -1;
        margin-top: 22px !important;
        font-size: clamp(15.5px, 2.4vw, 17px) !important;
        line-height: 1.66 !important;
    }

    .service-card:not(.service-card--grafica-online) .pba-card-more {
        grid-column: 1 / -1;
        margin-top: 25px !important;
    }
}

@media (max-width: 520px) {
    .services-grid {
        gap: 16px !important;
    }

    .service-card:not(.service-card--grafica-online),
    .service-card:not(.service-card--grafica-online):nth-of-type(5) {
        padding: 24px 22px !important;
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 16px;
        border-radius: 26px !important;
    }

    .service-card:not(.service-card--grafica-online)::before {
        width: 88px;
        height: 5px;
        left: 22px;
    }

    .service-card:not(.service-card--grafica-online) .service-icon {
        width: 64px !important;
        height: 64px !important;
        border-radius: 20px !important;
    }

    .service-card:not(.service-card--grafica-online) .service-icon img {
        width: 39px !important;
        height: 39px !important;
    }

    .service-card:not(.service-card--grafica-online) h3 {
        font-size: clamp(21px, 6vw, 25px) !important;
        line-height: 1.16 !important;
    }

    .service-card:not(.service-card--grafica-online) p {
        margin-top: 19px !important;
        font-size: 15px !important;
    }

    .service-card:not(.service-card--grafica-online) .pba-card-more {
        width: 100%;
        min-height: 54px;
        margin-top: 22px !important;
        justify-content: space-between;
        border-radius: 15px;
        font-size: 15px;
    }
}
