/* Testkaarten: getrapt binnenkomen (desktop en mobiel) en op mobiel een compacte lijst (12 okt 2026).
   De intro is alleen actief als test-carousel.js draait; zonder JS staat alles gewoon in beeld. */

@keyframes cpKaartOmhoog {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: none; }
}

.cp-intro-wacht > * { opacity: 0; }

.cp-intro-start > * {
    animation: cpKaartOmhoog .5s cubic-bezier(.22, 1, .36, 1) both;
    animation-delay: calc(var(--cp-i, 0) * 100ms);
}

@media (prefers-reduced-motion: reduce) {
    .cp-intro-wacht > * { opacity: 1; }
    .cp-intro-start > * { animation: none; }
}

/* Op mobiel staan de kaarten als compacte lijst onder elkaar (12 okt 2026).
   Rij: icoon links, label + titel (+ meta) in het midden, chevron rechts.
   De hele rij is tikbaar via de bestaande link, die met ::after over de kaart wordt gerekt. */
@media (max-width: 639px) {
    #hero-benefits,
    .cp-mobile-snap,
    #tests-grid { gap: .6rem; }

    /* Gedeelde rij-stijl */
    #tests-grid > article.test-card-item,
    #tests-grid > div.test-card-item,
    .cp-mobile-snap > a {
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        column-gap: .9rem;
        row-gap: 0;
        height: auto;
        padding: .9rem 1rem;
        border: 1px solid rgba(44, 44, 44, .07);
        border-radius: 1.25rem;
        background: #fff;
        box-shadow: 0 6px 18px rgba(44, 44, 44, .05);
        text-align: left;
    }

    #tests-grid > div.test-card-item:has(> div.absolute) { border-color: rgba(0, 166, 118, .3); }

    #tests-grid > article.test-card-item:has(> a:focus-visible) {
        outline: 3px solid rgba(0, 166, 118, .25);
        outline-offset: 2px;
    }

    /* Chevron: groene pijl als masker, zo is er geen extra HTML nodig */
    #tests-grid > article.test-card-item > a::before,
    #tests-grid > div.test-card-item::after,
    .cp-mobile-snap > a::after {
        content: '';
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        background: var(--hs-green-primary);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M96 48l80 80-80 80' fill='none' stroke='black' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M96 48l80 80-80 80' fill='none' stroke='black' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    /* Homepage-testkaarten */
    #tests-grid > article.test-card-item > div.w-16 {
        grid-column: 1;
        grid-row: 1 / span 4;
        width: 2.75rem;
        height: 2.75rem;
        margin: 0;
    }

    #tests-grid > article.test-card-item > div.w-16 > i { font-size: 1.4rem; }

    #tests-grid > article.test-card-item > span.block {
        grid-column: 2;
        grid-row: 1;
        margin: 0 0 .1rem;
        font-size: .6rem;
        line-height: 1.2;
    }

    #tests-grid > article.test-card-item > h3 {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
        font-size: 1rem;
        line-height: 1.2;
    }

    #tests-grid > article.test-card-item > div.text-xs {
        grid-column: 2;
        grid-row: 3;
        justify-content: flex-start;
        gap: .5rem;
        margin: .2rem 0 0;
        font-size: .7rem;
        line-height: 1.2;
    }

    #tests-grid > article.test-card-item > div.absolute {
        position: static;
        grid-column: 2;
        grid-row: 4;
        justify-self: start;
        margin-top: .3rem;
        padding: .1rem .5rem;
        font-size: 8px;
        line-height: 1.3;
    }

    #tests-grid > article.test-card-item > p,
    #tests-grid > article.test-card-item > div.h-px,
    #tests-grid > article.test-card-item > div.grid { display: none; }

    #tests-grid > article.test-card-item > a {
        position: static;
        grid-column: 3;
        grid-row: 1 / span 4;
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: none;
        box-shadow: none;
        color: transparent;
        font-size: 0;
        line-height: 0;
    }

    #tests-grid > article.test-card-item > a > i { display: none; }

    #tests-grid > article.test-card-item > a::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 1.25rem;
    }

    /* Testoverzicht (tests.html): kaart met onclick, illustratie als kleine tegel */
    #tests-grid > div.test-card-item > div:has(> img),
    #tests-grid > div.test-card-item > a.block > div:has(> img) {
        grid-column: 1;
        grid-row: 1 / span 3;
        width: 3.5rem;
        height: 3.5rem;
        aspect-ratio: 1;
        margin: 0;
        border-radius: 1rem;
    }

    #tests-grid > div.test-card-item > span,
    #tests-grid > div.test-card-item > a.block > span {
        grid-column: 2;
        grid-row: 1;
        margin: 0 0 .15rem;
        padding: .1rem .6rem;
        font-size: .65rem;
        line-height: 1.3;
    }

    #tests-grid > div.test-card-item > h3,
    #tests-grid > div.test-card-item > a.block > h3 {
        grid-column: 2;
        grid-row: 2;
        margin: 0;
        font-size: 1rem;
        line-height: 1.2;
    }

    #tests-grid > div.test-card-item > p,
    #tests-grid > div.test-card-item > a.block > p { display: none; }

    #tests-grid > div.test-card-item > a.block { display: contents; }

    #tests-grid > div.test-card-item > a.block::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 1.25rem;
    }

    #tests-grid > div.test-card-item:has(> a.block:focus-visible) {
        outline: 3px solid rgba(0, 166, 118, .25);
        outline-offset: 2px;
    }

    #tests-grid > div.test-card-item > div.absolute {
        position: static;
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        margin-top: .3rem;
        padding: .1rem .5rem;
        font-size: 8px;
        line-height: 1.3;
    }

    #tests-grid > div.test-card-item::after {
        grid-column: 3;
        grid-row: 1 / span 3;
    }

    /* Homepage: voordelen, compacte rij zonder chevron (geen link) */
    #hero-benefits > div {
        align-items: center;
        gap: .9rem;
        padding: .9rem 1rem;
        border-radius: 1.25rem;
        border-color: rgba(44, 44, 44, .07);
        box-shadow: 0 6px 18px rgba(44, 44, 44, .05);
    }

    #hero-benefits > div > div:first-child {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: .9rem;
    }

    #hero-benefits h3 { margin-bottom: .1rem; font-size: 1rem; line-height: 1.25; }
    #hero-benefits p { font-size: .8rem; line-height: 1.4; }

    /* Homepage: voorbeelden, rij is de link; de tekst blijft voor schermlezers */
    .cp-mobile-snap > a > div:first-child {
        grid-column: 1;
        width: 2.75rem;
        height: 2.75rem;
        margin: 0;
        border-radius: .9rem;
    }

    .cp-mobile-snap > a > div:first-child i { font-size: 1.4rem; }

    .cp-mobile-snap > a > h3 {
        grid-column: 2;
        margin: 0;
        font-size: 1rem;
        line-height: 1.25;
    }

    .cp-mobile-snap > a > p { display: none; }

    .cp-mobile-snap > a > div.mt-auto {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .cp-mobile-snap > a::after { grid-column: 3; }
}
