:root {
    --khp-ink: #26391c;
    --khp-muted: #6f7868;
    --khp-green: #789b25;
    --khp-green-dark: #55751b;
    --khp-line: #dfe8c9;
    --khp-soft: #f8faef;
    --khp-cream: #fffdf6;
    --khp-shadow: 0 16px 40px rgba(55, 72, 26, .10);
}

body.khp-home-active {
    background: #fff;
}

body.khp-home-active .khp-theme-header {
    min-height: 60px !important;
}

body.khp-home-active .khp-theme-header nav a,
body.khp-home-active .khp-theme-header .menu-item > a {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

body.khp-home-active .khp-theme-logo {
    width: auto !important;
    height: auto !important;
    max-height: 86px !important;
    max-width: 108px !important;
    object-fit: contain !important;
}

.khp,
.khp * {
    box-sizing: border-box;
}

.khp {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 58px;
    color: var(--khp-ink);
    font-family: inherit;
}

.khp a {
    color: inherit;
    text-decoration: none;
}

.khp img {
    display: block;
    width: 100%;
}

.khp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.khp-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 13px;
    border: 1px solid var(--khp-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: var(--khp-green-dark);
    font-size: 13px;
    font-weight: 700;
}

.khp-carousel {
    position: relative;
    padding: 12px;
    border: 1px solid #e7edd7;
    border-radius: 24px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 10px 30px rgba(55, 72, 26, .08);
    overflow: hidden;
}

.khp-carousel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 10px;
}

.khp-carousel__head p {
    margin: 0;
    color: #697260;
    font-size: 13px;
    font-weight: 700;
}

.khp-carousel__controls {
    display: flex;
    direction: ltr;
    gap: 6px;
}

.khp-carousel__btn {
    width: 34px;
    height: 34px;
    border: 1px solid #dde6c7;
    border-radius: 50%;
    background: #fff;
    color: var(--khp-green-dark);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.khp-carousel__btn:hover,
.khp-carousel__btn:focus-visible {
    background: var(--khp-soft);
    box-shadow: 0 6px 14px rgba(68, 91, 24, .12);
    transform: translateY(-1px);
    outline: none;
}

.khp-carousel__viewport {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 155, 37, .48) transparent;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 10px;
    border-radius: 17px;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    user-select: none;
}

.khp-carousel__viewport.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.khp-carousel__viewport::-webkit-scrollbar {
    height: 6px;
}

.khp-carousel__viewport::-webkit-scrollbar-track {
    background: transparent;
}

.khp-carousel__viewport::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(120, 155, 37, .48);
}

.khp-carousel__viewport::-webkit-scrollbar-thumb:hover {
    background: rgba(85, 117, 27, .72);
}

.khp-carousel__track {
    display: flex;
    gap: 12px;
    min-width: max-content;
    padding: 1px 1px 10px;
}

.khp-slide {
    flex: 0 0 214px;
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid #e8eddc;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(52, 69, 28, .07);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), box-shadow .32s ease, border-color .32s ease;
}

.khp-slide:hover,
.khp-slide:focus-visible,
.khp-slide.is-active {
    transform: translateY(-4px);
    border-color: #c9d99f;
    box-shadow: 0 16px 28px rgba(52, 69, 28, .13);
    outline: none;
}

.khp-slide__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f2f5ea;
}

.khp-slide__image img {
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.khp-slide:hover .khp-slide__image img,
.khp-slide.is-active .khp-slide__image img {
    transform: scale(1.025);
}

.khp-slide__copy {
    display: grid;
    gap: 3px;
    padding: 10px 12px 12px;
}

.khp-slide__copy strong {
    font-size: 17px;
    line-height: 1.25;
}

.khp-slide__copy small {
    color: var(--khp-muted);
    font-size: 12px;
    line-height: 1.45;
}

.khp-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 4px;
}

.khp-carousel__dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d7ddc9;
    transition: width .25s ease, border-radius .25s ease, background .25s ease;
}

.khp-carousel__dots span.is-active {
    width: 22px;
    border-radius: 999px;
    background: var(--khp-green);
}

.khp-hero {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: stretch;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid #e4ebd3;
    border-radius: 28px;
    background: linear-gradient(120deg, #fffef9 0%, #fbfde9 100%);
    box-shadow: var(--khp-shadow);
}

.khp-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 68px);
}

.khp-hero h1 {
    margin: 12px 0 14px;
    font-size: clamp(38px, 5vw, 62px);
    line-height: .98;
    letter-spacing: -.035em;
}

.khp-hero__copy > p {
    max-width: 590px;
    margin: 0;
    color: var(--khp-muted);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.65;
}

.khp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.khp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 800;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.khp-btn:hover,
.khp-btn:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.khp-btn--primary {
    background: linear-gradient(135deg, #86aa2b, #63851d);
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(92, 122, 27, .22);
}

.khp-btn--ghost {
    border: 1px solid #b8cb88;
    background: rgba(255, 255, 255, .9);
    color: var(--khp-green-dark) !important;
}

.khp-hero__media {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    min-height: 460px;
    padding: 8px;
    background: #eef4dd;
}

.khp-hero__tile {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #dfe8c9;
}

.khp-hero__tile--main {
    grid-row: 1 / span 2;
}

.khp-hero__tile img {
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

.khp-hero__tile:hover img,
.khp-hero__tile:focus-visible img {
    transform: scale(1.025);
}

.khp-section-head {
    max-width: 740px;
    margin: 0 auto 24px;
    text-align: center;
}

.khp-section-head h2 {
    margin: 10px 0 8px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.025em;
}

.khp-section-head p {
    margin: 0;
    color: var(--khp-muted);
    font-size: 17px;
    line-height: 1.6;
}

.khp-overview {
    padding-top: 74px;
}

.khp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.khp-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e3e9d5;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(54, 72, 29, .07);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, border-color .28s ease;
}

.khp-card:hover,
.khp-card:focus-visible {
    transform: translateY(-6px);
    border-color: #c6d69e;
    box-shadow: 0 18px 34px rgba(54, 72, 29, .13);
    outline: none;
}

.khp-card__media {
    display: block;
    aspect-ratio: 1 / .76;
    overflow: hidden;
    background: #f2f5ea;
}

.khp-card__media img {
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.khp-card:hover .khp-card__media img {
    transform: scale(1.025);
}

.khp-card__body {
    display: grid;
    gap: 7px;
    padding: 18px 18px 20px;
}

.khp-card__body strong {
    font-size: 23px;
    line-height: 1.2;
}

.khp-card__body small {
    min-height: 44px;
    color: var(--khp-muted);
    font-size: 14px;
    line-height: 1.55;
}

.khp-card__body b {
    color: var(--khp-green-dark);
    font-size: 14px;
}

.khp-next {
    padding-top: 78px;
    padding-bottom: 8px;
}

.khp-next__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.khp-next__grid a {
    display: grid;
    gap: 8px;
    min-height: 170px;
    padding: 24px;
    border: 1px solid #e3e9d5;
    border-radius: 19px;
    background: linear-gradient(180deg, #fff, #fbfcf7);
    box-shadow: 0 8px 20px rgba(54, 72, 29, .06);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.khp-next__grid a:hover,
.khp-next__grid a:focus-visible {
    transform: translateY(-4px);
    border-color: #c6d69e;
    box-shadow: 0 14px 26px rgba(54, 72, 29, .11);
    outline: none;
}

.khp-next__grid strong {
    font-size: 22px;
}

.khp-next__grid span {
    color: var(--khp-muted);
    font-size: 14px;
    line-height: 1.55;
}

.khp-next__grid b {
    align-self: end;
    color: var(--khp-green-dark);
    font-size: 14px;
}

.khp-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1);
}

.khp-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 1280px) {
    .khp-carousel__head p::after {
        content: " · גררו ימינה/שמאלה";
        font-weight: 600;
        opacity: .72;
    }
}

@media (max-width: 980px) {
    .khp {
        width: min(100% - 24px, 900px);
        margin-top: 12px;
    }

    .khp-hero {
        grid-template-columns: 1fr;
    }

    .khp-hero__copy {
        order: 1;
        padding: 34px 26px 38px;
    }

    .khp-hero__media {
        min-height: 370px;
    }

    .khp-grid,
    .khp-next__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    body.khp-home-active .khp-theme-logo {
        max-height: 70px !important;
        max-width: 90px !important;
    }

    .khp {
        width: calc(100% - 18px);
        margin-bottom: 40px;
    }

    .khp-carousel {
        padding: 9px;
        border-radius: 19px;
    }

    .khp-carousel__head {
        padding-bottom: 8px;
    }

    .khp-slide {
        flex-basis: min(78vw, 290px);
    }

    .khp-slide__copy strong {
        font-size: 18px;
    }

    .khp-hero {
        margin-top: 18px;
        border-radius: 21px;
    }

    .khp-hero h1 {
        font-size: 40px;
    }

    .khp-hero__media {
        grid-template-columns: 1.3fr 1fr;
        min-height: 300px;
        gap: 5px;
        padding: 5px;
    }

    .khp-hero__tile {
        border-radius: 14px;
    }

    .khp-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .khp-overview,
    .khp-next {
        padding-top: 56px;
    }

    .khp-grid,
    .khp-next__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .khp-card {
        display: grid;
        grid-template-columns: 43% 57%;
        border-radius: 17px;
    }

    .khp-card__media {
        height: 100%;
        aspect-ratio: auto;
    }

    .khp-card__body {
        padding: 16px;
    }

    .khp-card__body strong {
        font-size: 20px;
    }

    .khp-card__body small {
        min-height: 0;
    }

    .khp-next__grid a {
        min-height: 0;
        padding: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khp *,
    .khp *::before,
    .khp *::after {
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }

    .khp-reveal {
        opacity: 1;
        transform: none;
    }
}
