/* ═══════════════════════════════════════════════════════════
   KAISOFT B2B — kaisoft-b2b.css
   Solo le sezioni della landing B2B che non esistono in kaisoft.css
   (caricato DOPO kaisoft.css). Prefisso kb- per non collidere con kl-.
   Mobile-first: gli stili base valgono da mobile, il desktop parte da 901px
   perché kaisoft.css usa max-width:900px per il suo mobile.
   ═══════════════════════════════════════════════════════════ */

:root {
    --kb-gold: #FBBC04;
    --kb-grad-v: linear-gradient(180deg, #E62E39 0%, #B53D8E 50%, #5C4495 100%);
}

/* ── Nav ── */
.kb-nav-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

/* ── Nav: su mobile il CTA lo fa la barra sticky ── */
@media (max-width: 900px) {
    .kl-nav-cta {
        display: none;
    }
}

/* ── Sezioni: gutter e ritmo verticale (base mobile) ── */
.kb-check-section,
.kb-steps-section,
.kb-svc-section,
.kb-cases-section,
.kb-bio-section,
.kb-where-section,
.kb-after-section,
.kb-close-section {
    padding: 64px 24px;
}

.kb-narrow {
    max-width: 760px;
    margin: 0 auto;
}

.kb-center {
    text-align: center;
}

.kb-cta-wrap {
    text-align: center;
    margin-top: 40px;
}

/* ── 1. Hero ── */
.kb-hero .kl-hero-inner {
    gap: 40px;
    align-items: start;
}

.kb-hero .kl-h1 {
    font-size: 1.7rem;
    line-height: 1.2;
}

.kb-hero .kl-hero-sub {
    max-width: none;
    font-size: 0.98rem;
    margin-bottom: 28px;
}

.kb-hero-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeUp 0.6s ease 0.35s both;
}

/* Foto: se il file manca la pagina mostra un cerchio con le iniziali */
.kb-photo {
    position: relative;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: var(--k-grad2);
    border: 1px solid rgba(255,255,255,0.14);
}

    .kb-photo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

.kb-photo-initials {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
}

    .kb-photo-initials span {
        width: 46%;
        aspect-ratio: 1 / 1;
        border-radius: 50%;
        background: var(--k-grad1);
        color: var(--k-white);
        font-weight: 800;
        font-size: 2rem;
        letter-spacing: 0.04em;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.kb-photo--fallback .kb-photo-initials {
    display: flex;
}

/* Recensione Google ricostruita in HTML */
.kb-review {
    --kb-r-bg: rgba(255,255,255,0.07);
    --kb-r-border: rgba(255,255,255,0.14);
    --kb-r-name: var(--k-white);
    --kb-r-meta: rgba(255,255,255,0.55);
    --kb-r-text: rgba(255,255,255,0.86);
    background: var(--kb-r-bg);
    border: 1px solid var(--kb-r-border);
    border-radius: 14px;
    padding: 20px 22px;
}

.kb-review--light {
    --kb-r-bg: var(--k-gray-lt);
    --kb-r-border: var(--k-gray-mid);
    --kb-r-name: var(--k-blu);
    --kb-r-meta: var(--k-gray-txt);
    --kb-r-text: var(--k-blu);
}

.kb-review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.kb-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--k-grad1);
    color: var(--k-white);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-review-who {
    flex: 1;
    min-width: 0;
}

.kb-review-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--kb-r-name);
}

.kb-review-meta {
    font-size: 0.74rem;
    color: var(--kb-r-meta);
}

.kb-stars {
    color: var(--kb-gold);
    letter-spacing: 0.1em;
    font-size: 1rem;
    line-height: 1;
}

.kb-review-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
}

.kb-gbadge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 4px;
    border-radius: 20px;
    background: var(--k-white);
    color: #3c4043;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid var(--k-gray-mid);
}

.kb-gbadge-g {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4285F4;
    color: var(--k-white);
    font-weight: 800;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-review-text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--kb-r-text);
}

/* ── 2. Checklist ── */
.kb-check-section {
    background: var(--k-gray-lt);
}

    .kb-check-section .kl-section-title {
        margin-bottom: 28px;
    }

.kb-check {
    list-style: none;
    display: grid;
    gap: 10px;
}

/* Checkbox nativa (senza name, fuori dal form): nascosta visivamente ma focusabile */
.kb-check-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--k-white);
    border: 1.5px solid var(--k-gray-mid);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    /* annulla lo stile globale di label in kaisoft.css */
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--k-blu);
    transition: border-color 0.2s;
}

    .kb-check-row:hover,
    .kb-check-row:has(.kb-check-input:checked) {
        border-color: var(--k-fucsia);
    }

.kb-check-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: 0;
}

.kb-check-box {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid #b4b7c6;
    border-radius: 6px;
    background: var(--k-white);
    transition: background 0.15s, border-color 0.15s;
}

    .kb-check-box::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 2px;
        width: 5px;
        height: 10px;
        border: solid var(--k-white);
        border-width: 0 2.5px 2.5px 0;
        transform: rotate(45deg) scale(0);
        transition: transform 0.15s;
    }

.kb-check-input:checked + .kb-check-box {
    background: var(--k-grad1);
    border-color: transparent;
}

    .kb-check-input:checked + .kb-check-box::after {
        transform: rotate(45deg) scale(1);
    }

.kb-check-input:focus-visible + .kb-check-box {
    outline: 3px solid var(--k-viola);
    outline-offset: 2px;
}

.kb-check-note {
    position: relative;
    margin-top: 28px;
    padding: 20px 24px 20px 28px;
    background: var(--k-white);
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--k-blu);
}

    .kb-check-note::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
        border-radius: 10px 0 0 10px;
        background: var(--kb-grad-v);
    }

/* ── A chi mi rivolgo ── */
.kb-who-section {
    background: var(--k-white);
    padding: 64px 24px;
}

.kb-who {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 36px auto 0;
}

.kb-who-card {
    position: relative;
    padding: 26px 24px 24px 28px;
    background: var(--k-gray-lt);
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--k-blu);
}

    .kb-who-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
        border-radius: 12px 0 0 12px;
        background: var(--kb-grad-v);
    }

/* ── 3. Come lavoriamo: timeline verticale ── */
.kb-steps-section {
    background: var(--k-grad-hero);
    color: var(--k-white);
}

    .kb-steps-section .kl-section-title {
        color: var(--k-white);
    }

.kb-steps {
    list-style: none;
    max-width: 720px;
    margin: 36px auto 0;
}

.kb-step {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding-bottom: 32px;
}

    .kb-step:last-child {
        padding-bottom: 0;
    }

    .kb-step::before {
        content: '';
        position: absolute;
        left: 23px;
        top: 52px;
        bottom: 4px;
        width: 2px;
        background: rgba(255,255,255,0.15);
    }

    .kb-step:last-child::before {
        display: none;
    }

.kb-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--k-grad1);
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(181,61,142,0.4);
}

.kb-step-title {
    padding-top: 12px;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kb-step-desc {
    font-size: 0.93rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
}

/* ── 4. Servizi ── */
.kb-svc-section {
    background: var(--k-white);
}

.kb-svc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 36px;
}

.kb-svc-card {
    position: relative;
    overflow: hidden;
    background: var(--k-white);
    border: 1px solid var(--k-gray-mid);
    border-radius: 12px;
    padding: 30px 24px 26px;
}

    .kb-svc-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--k-grad1);
    }

.kb-svc-title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--k-blu);
}

.kb-svc-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--k-fucsia);
}

.kb-svc-text {
    margin: 4px 0 18px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--k-gray-txt);
}

.kb-svc-get .kb-svc-text {
    margin-bottom: 0;
    color: var(--k-blu);
    font-weight: 500;
}

/* ── 5. Casi studio ── */
.kb-cases-section {
    background: var(--k-gray-lt);
}

.kb-cases {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 36px;
}

.kb-case {
    display: flex;
    flex-direction: column;
    background: var(--k-white);
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 4px 24px rgba(38,50,81,0.07);
}

.kb-case-logo {
    align-self: flex-start;
    height: 30px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 12px;
}

.kb-case-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--k-blu);
}

.kb-case-sector {
    margin-top: 2px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--k-gray-txt);
}

.kb-case-kpi {
    margin: 20px 0 14px;
}

.kb-case-kpi-num {
    display: inline-block;
    font-weight: 800;
    font-size: 2.1rem;
    line-height: 1.1;
    background: var(--k-grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kb-case-kpi-lbl {
    display: block;
    margin-top: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--k-gray-txt);
}

.kb-case-text {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--k-gray-txt);
}

    .kb-case-text strong {
        color: var(--k-blu);
    }

.kb-case .kb-review {
    margin-top: 22px;
}

/* ── 6. Chi sono ── */
.kb-bio-section {
    background: var(--k-white);
}

.kb-bio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
    align-items: start;
}

    .kb-bio .kl-section-title {
        margin-bottom: 20px;
    }

.kb-bio-text p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--k-gray-txt);
}

.kb-sign {
    font-weight: 700;
    color: var(--k-blu);
}

/* ── Dove siamo ── */
.kb-where-section {
    background: var(--k-gray-lt);
}

.kb-where-lede {
    max-width: 680px;
    margin: 16px auto 0;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--k-gray-txt);
}

.kb-where {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 36px auto 0;
}

.kb-where-card {
    position: relative;
    padding: 26px 24px 24px 28px;
    background: var(--k-white);
    border-radius: 12px;
}

    .kb-where-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
        border-radius: 12px 0 0 12px;
        background: var(--kb-grad-v);
    }

    .kb-where-card p {
        font-size: 0.95rem;
        line-height: 1.65;
        color: var(--k-gray-txt);
    }

.kb-where-title {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--k-blu);
}

/* ── 7. Dopo la call ── */
.kb-after-section {
    background: var(--k-grad-hero);
    color: var(--k-white);
}

    .kb-after-section .kl-section-title {
        color: var(--k-white);
    }

.kb-after {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 920px;
    margin: 36px auto 0;
}

.kb-after-item {
    position: relative;
    overflow: hidden;
    padding: 28px 24px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
}

    .kb-after-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--k-grad1);
    }

.kb-after-lead {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
}

.kb-after-item p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.72);
}

/* ── 8. Offerta + form ── */
.kb-offer {
    max-width: 680px;
    margin: 0 auto 40px;
    text-align: center;
}

    .kb-offer p {
        margin-bottom: 14px;
        font-size: 1rem;
        line-height: 1.75;
        color: var(--k-gray-txt);
    }

.kb-form-error {
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid #e8b4ae;
    border-radius: 6px;
    background: #fdf0ee;
    color: #c0392b;
    font-size: 0.92rem;
}

.kb-success {
    text-align: center;
    padding: 40px 8px;
}

.kb-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--k-grad1);
    color: var(--k-white);
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-success h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--k-blu);
}

.kb-success p {
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.7;
    color: var(--k-gray-txt);
}

/* ── 9. Chiusura personale ── */
.kb-close-section {
    background: var(--k-white);
}

.kb-close {
    max-width: 640px;
    margin: 0 auto;
}

    .kb-close p {
        margin-bottom: 18px;
        font-size: 1.05rem;
        line-height: 1.8;
        color: var(--k-blu);
    }

.kb-close-sign {
    font-weight: 800;
    font-size: 1.2rem;
}

/* ── CTA sticky (solo mobile) ── */
.kb-sticky {
    display: none;
}

@media (max-width: 900px) {
    .kb-sticky {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--k-blu);
        border-top: 3px solid transparent;
        border-image: var(--k-grad1) 1;
        transition: transform 0.25s ease;
    }

        .kb-sticky .kl-btn-primary {
            display: block;
            width: 100%;
            padding: 14px 12px;
            text-align: center;
            font-size: 0.8rem;
            letter-spacing: 0.06em;
            animation: none;
        }

    /* Quando il form è a schermo la barra sparisce e non copre il pulsante di invio */
    .kb-sticky--hidden {
        transform: translateY(120%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, visibility 0s 0.25s;
    }

    /* Spazio in fondo perché la barra non nasconda il footer */
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
        background: var(--k-blu);
    }
}

/* ── Desktop ── */
@media (min-width: 901px) {
    .kb-check-section,
    .kb-steps-section,
    .kb-svc-section,
    .kb-cases-section,
    .kb-bio-section,
    .kb-where-section,
    .kb-after-section,
    .kb-close-section {
        padding: 90px 60px;
    }

    .kb-hero .kl-hero-inner {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 64px;
        align-items: center;
    }

    .kb-hero .kl-h1 {
        font-size: 2.35rem;
    }

    .kb-photo {
        max-width: 340px;
    }

    .kb-who-section {
        padding: 90px 60px;
    }

    .kb-who,
    .kb-where,
    .kb-svc-grid,
    .kb-cases {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .kb-bio {
        grid-template-columns: 300px 1fr;
        gap: 56px;
    }

        .kb-bio .kb-photo {
            max-width: 300px;
            margin: 0;
        }

    .kb-after {
        grid-template-columns: 1fr 1fr;
    }
}
