/*
* Sectie: Aanbieding (homepage)
* Inhoud via WordPress > Aanbieding
*/

@font-face {
    font-family: "Eras Ultra";
    src: url("/wp-content/themes/charliens/assets/fonts/ITC Eras Std Ultra.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Eras Demi";
    src: url("/wp-content/themes/charliens/assets/fonts/ITC Eras Std Demi.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

#actie {
    --kph-geel: #FFD34D;
    --kph-geel-diep: #F2B91D;
    --kph-rood: #E30613;
    --kph-rood-diep: #8F0010;
    --kph-zwart: #0a0405;
    --kph-wit: #FFFFFF;
    --kph-blauw: #21468B;

    margin: 70px 0 80px;
    position: relative;
}

#actie[hidden] {
    display: none !important;
}

#actie .kph-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Het gele bord ---------- */

#actie .kph-actie__bord {
    position: relative;
    background: var(--kph-geel);
    border-radius: 32px;
    overflow: hidden;
    isolation: isolate;
}

#actie .kph-actie__gaten {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#actie .kph-actie__gaten .gat circle:first-child {
    fill: var(--kph-geel-diep);
}

#actie .kph-actie__gaten .gat circle:last-child {
    fill: #FBCB3C;
}

#actie .kph-actie__inhoud {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 60px;
    align-items: center;
    padding: 90px 90px 80px;
}

/* ---------- Tekstkolom ---------- */

#actie .kph-actie__titel {
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-weight: normal;
    font-size: clamp(46px, 5.6vw, 84px);
    line-height: 0.94;
    letter-spacing: -0.01em;
    color: var(--kph-zwart);
    margin: 0 0 22px;
    max-width: 11ch;
    text-wrap: balance;
}

#actie .kph-actie__intro {
    font-family: "Eras", sans-serif;
    font-size: 19px;
    line-height: 1.45;
    color: var(--kph-zwart);
    max-width: 30em;
    margin: 0 0 34px;
}

#actie .kph-actie__kazen {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    gap: 16px;
}

#actie .kph-actie__kazen li {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: center;
}

#actie .kph-actie__punt {
    width: 44px;
    height: auto;
    display: block;
}

#actie .kph-actie__punt path {
    fill: var(--kph-zwart);
    stroke: var(--kph-zwart);
    stroke-width: 3;
    stroke-linejoin: round;
}

#actie .kph-actie__punt circle {
    fill: var(--kph-geel);
}

#actie .kph-actie__kaas {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 14px;
}

#actie .kph-actie__kaas strong {
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-weight: normal;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1;
    color: var(--kph-zwart);
}

#actie .kph-actie__kaas small {
    font-family: "Eras Demi", "Eras", sans-serif;
    font-size: 16px;
    line-height: 1.2;
    color: var(--kph-zwart);
    opacity: 0.68;
}

/* ---------- Knoppen en geldigheid ---------- */

#actie .kph-actie__acties {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
}

#actie a.kph-actie__knop {
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 19px;
    line-height: 1;
    padding: 18px 28px 17px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 5px 5px 0 var(--kph-zwart);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#actie a.kph-actie__knop--rood {
    background: var(--kph-rood);
    color: var(--kph-wit);
}

#actie a.kph-actie__knop--wit {
    background: var(--kph-wit);
    color: var(--kph-zwart);
}

#actie a.kph-actie__knop:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--kph-zwart);
}

#actie a.kph-actie__knop:active {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--kph-zwart);
}

#actie a.kph-actie__knop:focus-visible {
    outline: 3px solid var(--kph-blauw);
    outline-offset: 4px;
}

#actie .kph-actie__geldig {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-family: "Eras Demi", "Eras", sans-serif;
    font-size: 16px;
    line-height: 1;
    color: var(--kph-zwart);
    padding: 10px 0;
}

#actie .kph-actie__geldig i {
    font-size: 17px;
}

#actie .kph-actie__geldig.is-urgent {
    background: var(--kph-zwart);
    color: var(--kph-geel);
    padding: 12px 18px;
    border-radius: 999px;
}

#actie .kph-actie__voetnoot {
    font-size: 13px;
    line-height: 1.4;
    color: var(--kph-zwart);
    opacity: 0.7;
    margin: 22px 0 0;
}

/* ---------- Prijskolom ---------- */

#actie .kph-actie__prijskolom {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
}

#actie .kph-actie__foto {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

#actie .kph-actie__foto img {
    width: 92%;
    max-height: 420px;
    object-fit: contain;
    filter: drop-shadow(0 26px 22px rgba(120, 70, 0, 0.35));
}

#actie .heeft-foto .kph-actie__kaartje {
    align-self: flex-start;
    margin-top: -130px;
    font-size: clamp(90px, 9vw, 150px);
}

/* ---------- Prijskaartje ---------- */

#actie .kph-actie__kaartje {
    position: relative;
    background: var(--kph-wit);
    border-radius: 26px;
    box-shadow: 12px 14px 0 var(--kph-zwart);
    transform: rotate(-3deg);
    font-size: clamp(120px, 12.5vw, 200px);
    min-width: min(3.3em, 100%);
    z-index: 1;
}

#actie .kph-actie__kaartje-binnen {
    padding: 38px 48px 40px;
}

#actie .kph-actie__kaartje.heeft-besparing .kph-actie__kaartje-binnen {
    padding-bottom: 26px;
}

#actie .kph-actie__prikker {
    position: absolute;
    bottom: calc(100% - 16px);
    left: 22px;
    width: 86px;
    height: auto;
    transform: rotate(-10deg);
    transform-origin: 50% 100%;
    filter: drop-shadow(3px 5px 0 rgba(10, 4, 5, 0.18));
    pointer-events: none;
}

#actie .kph-actie__label {
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 26px;
    line-height: 1;
    color: var(--kph-zwart);
    margin: 0 0 6px 0.2em;
}

#actie .kph-actie__prijs {
    display: flex;
    align-items: flex-start;
    margin: 0;
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 1em;
    line-height: 0.86;
    color: var(--kph-rood);
    text-shadow: 0.028em 0.028em 0 var(--kph-rood-diep);
    white-space: nowrap;
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums;
    margin-bottom: -0.07em;
}

#actie .kph-actie__prijs .euro {
    font-size: 0.34em;
    line-height: 1;
    margin: 0.2em 0.08em 0 0;
}

#actie .kph-actie__prijs .cent {
    font-size: 0.46em;
    line-height: 1;
    margin: 0.07em 0 0 0.05em;
}

#actie .kph-actie__normaal {
    font-family: "Eras Demi", "Eras", sans-serif;
    font-size: 20px;
    line-height: 1;
    color: var(--kph-zwart);
    margin: 8px 0 0 0.2em;
}

#actie .kph-actie__normaal s {
    text-decoration-color: var(--kph-rood);
    text-decoration-thickness: 3px;
}

#actie .kph-actie__besparing {
    margin: 0;
    background: var(--kph-zwart);
    color: var(--kph-geel);
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 22px;
    line-height: 1;
    padding: 18px 48px 19px;
    border-radius: 0 0 26px 26px;
}

/* ---------- Stempel ---------- */

#actie .kph-actie__stempel {
    position: absolute;
    top: -64px;
    right: -58px;
    width: 172px;
    height: 172px;
    margin: 0;
    display: grid;
    place-items: center;
    background: var(--kph-blauw);
    clip-path: polygon(50% 0%, 57.1% 9.6%, 67.1% 3%, 70.5% 14.5%, 82.1% 11.7%, 81.4% 23.6%, 93.3% 25%, 88.5% 36%, 99.2% 41.3%, 91% 50%, 99.2% 58.7%, 88.5% 64%, 93.3% 75%, 81.4% 76.4%, 82.1% 88.3%, 70.5% 85.5%, 67.1% 97%, 57.1% 90.4%, 50% 100%, 42.9% 90.4%, 32.9% 97%, 29.5% 85.5%, 17.9% 88.3%, 18.6% 76.4%, 6.7% 75%, 11.5% 64%, 0.8% 58.7%, 9% 50%, 0.8% 41.3%, 11.5% 36%, 6.7% 25%, 18.6% 23.6%, 17.9% 11.7%, 29.5% 14.5%, 32.9% 3%, 42.9% 9.6%);
    transform: rotate(14deg);
    z-index: 2;
}

#actie .kph-actie__stempel span {
    display: block;
    padding: 0 34px;
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 20px;
    line-height: 1.05;
    text-align: center;
    color: var(--kph-wit);
    overflow-wrap: anywhere;
}

/* ---------- Lichtkrant ---------- */

#actie .kph-actie__band {
    background: var(--kph-zwart);
    color: var(--kph-wit);
    overflow: hidden;
    padding: 22px 0;
}

#actie .kph-actie__band-spoor {
    display: flex;
    width: max-content;
    animation: kph-lichtkrant 38s linear infinite;
}

#actie .kph-actie__band:hover .kph-actie__band-spoor {
    animation-play-state: paused;
}

#actie .kph-actie__band-reeks {
    display: flex;
    flex-shrink: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

#actie .kph-actie__band-reeks li {
    display: flex;
    align-items: center;
    font-family: "Eras Ultra", "Eras", sans-serif;
    font-size: 28px;
    line-height: 1;
    white-space: nowrap;
}

#actie .kph-actie__band-reeks li::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--kph-geel);
    margin: 0 34px;
    flex-shrink: 0;
}

#actie .kph-actie__band-reeks li:nth-child(even) {
    color: var(--kph-geel);
}

#actie .kph-actie__band-reeks li:nth-child(even)::after {
    background: var(--kph-wit);
}

@keyframes kph-lichtkrant {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Binnenkomst (eenmalig, alleen met JS) ---------- */

#actie.kan-animeren .kph-actie__kaartje {
    opacity: 0;
    transform: translateY(60px) rotate(6deg);
}

#actie.kan-animeren .kph-actie__stempel {
    opacity: 0;
    transform: scale(2.6) rotate(-24deg);
}

#actie.kan-animeren .kph-actie__prikker {
    transform: rotate(-10deg) translateY(-40px);
    opacity: 0;
}

#actie.kan-animeren.in-beeld .kph-actie__kaartje {
    opacity: 1;
    transform: rotate(-3deg);
    transition: transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

#actie.kan-animeren.in-beeld .kph-actie__prikker {
    opacity: 1;
    transform: rotate(-10deg);
    transition: transform 0.5s cubic-bezier(0.34, 1.8, 0.64, 1) 0.45s, opacity 0.2s ease 0.45s;
}

#actie.kan-animeren.in-beeld .kph-actie__stempel {
    opacity: 1;
    transform: scale(1) rotate(14deg);
    transition: transform 0.42s cubic-bezier(0.2, 1.7, 0.4, 1) 0.8s, opacity 0.12s ease 0.8s;
}

@media (prefers-reduced-motion: reduce) {
    #actie .kph-actie__band-spoor {
        animation: none;
    }
    #actie a.kph-actie__knop {
        transition: none;
    }
}

/* ---------- Responsive ---------- */

@media only screen and (max-width: 1200px) {
    #actie .kph-actie__inhoud {
        padding: 70px 60px 70px;
        gap: 40px;
    }

    #actie .kph-actie__stempel {
        right: -30px;
    }
}

@media only screen and (max-width: 1000px) {
    #actie {
        margin: 40px 0 50px;
    }

    #actie .kph-actie__bord {
        border-radius: 24px;
    }

    #actie .kph-actie__inhoud {
        grid-template-columns: 1fr;
        padding: 56px 40px 64px;
        gap: 40px;
    }

    #actie .kph-actie__titel {
        max-width: none;
    }

    #actie .kph-actie__inhoud {
        gap: 0;
    }

    /* Op mobiel staat het prijskaartje direct onder de titel */
    #actie .kph-actie__tekst {
        display: contents;
    }

    #actie .kph-actie__titel { order: 1; }
    #actie .kph-actie__intro { order: 2; }
    #actie .kph-actie__prijskolom { order: 3; }
    #actie .kph-actie__kazen { order: 4; }
    #actie .kph-actie__acties { order: 5; }
    #actie .kph-actie__voetnoot { order: 6; }

    #actie .kph-actie__prijskolom {
        padding-top: 70px;
        margin-bottom: 48px;
    }

    #actie .kph-actie__kaartje,
    #actie .heeft-foto .kph-actie__kaartje {
        align-self: center;
        font-size: clamp(110px, 22vw, 170px);
    }

    #actie .kph-actie__foto {
        justify-content: center;
    }

    #actie .kph-actie__foto img {
        width: 80%;
        max-height: 320px;
    }

    #actie .heeft-foto .kph-actie__kaartje {
        margin-top: -70px;
    }

    #actie .kph-actie__stempel {
        width: 144px;
        height: 144px;
        top: -52px;
        right: -40px;
    }

    #actie .kph-actie__stempel span {
        font-size: 17px;
        padding: 0 28px;
    }

    #actie .kph-actie__band-reeks li {
        font-size: 22px;
    }
}

@media only screen and (max-width: 600px) {
    #actie .kph-actie__inhoud {
        padding: 44px 22px 56px;
    }

    #actie .kph-actie__intro {
        font-size: 17px;
    }

    #actie .kph-actie__kazen li {
        grid-template-columns: 34px 1fr;
        gap: 12px;
    }

    #actie .kph-actie__punt {
        width: 34px;
    }

    #actie .kph-actie__acties {
        flex-direction: column;
        align-items: stretch;
    }

    #actie a.kph-actie__knop {
        text-align: center;
    }

    #actie .kph-actie__geldig {
        justify-content: center;
    }

    #actie .kph-actie__kaartje,
    #actie .heeft-foto .kph-actie__kaartje {
        font-size: clamp(88px, 27vw, 130px);
        box-shadow: 8px 10px 0 var(--kph-zwart);
    }

    #actie .kph-actie__kaartje-binnen {
        padding: 28px 30px 30px;
    }

    #actie .kph-actie__label {
        font-size: 21px;
    }

    #actie .kph-actie__besparing {
        font-size: 18px;
        padding: 15px 30px 16px;
    }

    #actie .kph-actie__prikker {
        width: 66px;
        left: 16px;
    }

    #actie .kph-actie__stempel {
        width: 118px;
        height: 118px;
        top: -44px;
        right: -14px;
    }

    #actie .kph-actie__stempel span {
        font-size: 14px;
        padding: 0 22px;
    }

    #actie .kph-actie__band {
        padding: 16px 0;
    }

    #actie .kph-actie__band-reeks li {
        font-size: 19px;
    }

    #actie .kph-actie__band-reeks li::after {
        width: 10px;
        height: 10px;
        margin: 0 22px;
    }
}
