/* ==========================================================================
   Home — hero (prefix: kh-)
   Lightweight: flat surfaces, no blur / backdrop-filter / looping animation.
   ========================================================================== */

main.site-main.site-main--home,
.site-main.site-main--home {
    max-width: none;
    padding: 0;
    overflow-x: clip;
    font-family: 'IranSans', Tahoma, Arial, sans-serif;
}

.kh {
    --kh-navy: #082442;
    --kh-green: var(--katabam-primary, #6ebe45);
    --kh-green-d: var(--katabam-primary-dark, #5aab38);
    --kh-ink: var(--katabam-secondary, #082442);
    --kh-muted: var(--katabam-text-muted, #5c5c5c);
    --kh-line: var(--katabam-border, #e8e8e8);
    --kh-gap: 16px;
    --kh-side: clamp(280px, 27vw, 350px);
    --kh-r: 24px;
    --kh-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    --kh-io: cubic-bezier(0.76, 0, 0.24, 1);
    --kh-slide-ratio: 1800 / 1160;
    --kh-slide-pad: 64.44%;   /* = 1160 / 1800 — drives the stage height without relying on aspect-ratio (iOS) */

    padding: 28px 0 44px;
}

html.dark .kh {
    --kh-ink: #f1f5f9;
    --kh-muted: rgba(226, 232, 240, 0.7);
    --kh-line: rgba(255, 255, 255, 0.12);
}

.kh *,
.kh *::before,
.kh *::after {
    box-sizing: border-box;
}

.kh-empty {
    margin: 3rem auto;
    text-align: center;
    color: var(--katabam-text-muted);
}

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

/* —— Layout —— */
.kh__shell {
    width: 100%;
    max-width: min(var(--katabam-content, 1250px), calc(100% - 2.5rem));
    margin: 0 auto;
}

.kh__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--kh-side);
    gap: var(--kh-gap);
    align-items: stretch;
    direction: rtl;
}

.kh__grid--solo {
    grid-template-columns: minmax(0, 1fr);
}


/* ==========================================================================
   Stage — performance notes
   · no mask-image / backdrop-filter; clip-path rrect is a cheap GPU clip
   · everything that moves is transform/opacity only (compositor thread)
   · drag writes inline transforms on the slides (no CSS-var inheritance storm)
   ========================================================================== */
.kh-stage {
    position: relative;
    min-width: 0;
    width: 100%;
    /* no aspect-ratio here: in a grid item with stretch alignment WebKit (iOS) resolved the width from a
       zero-height row and collapsed the stage to 0×0. The ::before padding-top below sets the height. */
    border-radius: var(--kh-r);
    overflow: hidden;
    background: var(--kh-navy);
    color: #fff;
    -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
    isolation: isolate;
    contain: paint;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.kh-stage.is-dragging {
    cursor: grabbing;
}

.kh-stage::before {
    content: "";
    display: block;
    width: 100%;
    padding-top: var(--kh-slide-pad);
}

.kh-track {
    position: absolute;
    inset: 0;
}

.kh-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: translate3d(calc(var(--o, 0) * 100%), 0, 0);
    transition: transform 1.05s var(--kh-io);
    will-change: transform;
    backface-visibility: hidden;
    contain: layout paint;
}

.kh-stage.is-dragging .kh-slide {
    transition: none;
}

.kh-slide__media,
.kh-slide__media picture,
.kh-slide__media img,
.kh-slide__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Parallax: the picture drifts against the slide, and settles to 1:1 when active */
.kh-slide__media img,
.kh-slide__placeholder {
    transform: translate3d(calc(var(--o, 0) * -10%), 0, 0) scale(1.2);
    transition: transform 1.05s var(--kh-io);
    will-change: transform;
    backface-visibility: hidden;
}

.kh-slide.is-active .kh-slide__media img,
.kh-slide.is-active .kh-slide__placeholder {
    transform: translate3d(0, 0, 0) scale(1);
    transition: transform 1.05s var(--kh-io);
}

.kh-stage.is-dragging .kh-slide__media img {
    transition: none;
}

.kh-slide__placeholder {
    background: linear-gradient(145deg, #0d3a6b, #082442);
}

.kh-slide__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(5, 18, 34, 0.82) 0%, rgba(5, 18, 34, 0.34) 38%, transparent 66%),
        linear-gradient(180deg, rgba(5, 18, 34, 0.28) 0%, transparent 22%);
    pointer-events: none;
}

.kh-slide__link {
    position: absolute;
    inset: 0;
    z-index: 2;
    -webkit-user-drag: none;
}

.kh-slide__link:focus-visible {
    outline: 3px solid var(--kh-green);
    outline-offset: -6px;
    border-radius: var(--kh-r);
}

/* —— Progress pills —— */
.kh-tabs {
    position: absolute;
    z-index: 4;
    top: 24px;
    inset-inline-start: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
}

.kh-tab {
    flex: none;
    padding: 10px 3px;
    border: 0;
    background: none;
    cursor: pointer;
}

.kh-tab__line {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    transition: width 0.6s var(--kh-ease), background 0.3s ease;
}

.kh-tab:hover .kh-tab__line {
    background: rgba(255, 255, 255, 0.85);
}

.kh-tab.is-active .kh-tab__line {
    width: 56px;
    background: rgba(255, 255, 255, 0.3);
}

/* progress is driven by the Web Animations API (see home-hero.js) */
.kh-tab__bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: 100% 50%;
}

.kh.is-static .kh-tab.is-active .kh-tab__bar,
.kh.no-waapi .kh-tab.is-active .kh-tab__bar {
    transform: scaleX(1);
}

.kh-tab:focus-visible,
.kh-nav:focus-visible,
.kh-tile:focus-visible {
    outline: 2px solid var(--kh-green);
    outline-offset: 3px;
}

.kh-tile:focus-visible {
    outline-offset: -5px;
}

/* —— Text —— */
.kh-card {
    position: absolute;
    z-index: 3;
    bottom: 36px;
    inset-inline-start: 36px;
    width: min(520px, calc(100% - 72px));
    pointer-events: none;
}

.kh-card__kicker,
.kh-card__desc,
.kh-card__cta {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.kh-slide.is-active .kh-card__kicker,
.kh-slide.is-active .kh-card__desc,
.kh-slide.is-active .kh-card__cta {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s var(--kh-ease), transform 0.95s var(--kh-ease);
}

.kh-slide.is-active .kh-card__kicker { transition-delay: 0.45s; }
.kh-slide.is-active .kh-card__desc { transition-delay: 0.85s; }
.kh-slide.is-active .kh-card__cta { transition-delay: 1s; }

/* title: masked word-by-word rise */
.kh-w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}

.kh-w > span {
    display: inline-block;
    transform: translate3d(0, 118%, 0) rotate(3deg);
    transform-origin: 100% 100%;
    transition: transform 0.35s ease;
}

.kh-slide.is-active .kh-w > span {
    transform: none;
    transition: transform 1.05s var(--kh-ease) calc(0.5s + var(--i, 0) * 0.075s);
}

/* first paint (no state change happens, so use keyframes) */
.kh:not(.is-ready) .kh-slide.is-active .kh-card__kicker,
.kh:not(.is-ready) .kh-slide.is-active .kh-card__desc,
.kh:not(.is-ready) .kh-slide.is-active .kh-card__cta {
    animation: kh-rise 0.9s var(--kh-ease) both;
}

.kh:not(.is-ready) .kh-slide.is-active .kh-card__kicker { animation-delay: 0.1s; }
.kh:not(.is-ready) .kh-slide.is-active .kh-card__desc { animation-delay: 0.5s; }
.kh:not(.is-ready) .kh-slide.is-active .kh-card__cta { animation-delay: 0.65s; }

.kh:not(.is-ready) .kh-slide.is-active .kh-w > span {
    animation: kh-word 1s var(--kh-ease) calc(0.15s + var(--i, 0) * 0.075s) both;
}

@keyframes kh-rise {
    from { opacity: 0; transform: translate3d(0, 22px, 0); }
}

@keyframes kh-word {
    from { transform: translate3d(0, 118%, 0) rotate(3deg); }
}

.kh-card__kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.kh-card__kicker b {
    font-weight: 600;
    color: #fff;
}

.kh-card__sep {
    opacity: 0.4;
}

.kh-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kh-green);
    box-shadow: 0 0 0 4px rgba(110, 190, 69, 0.25);
}

.kh-card__title {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.kh-card__desc {
    margin: 0 0 22px;
    max-width: 44ch;
    font-size: 0.92rem;
    line-height: 1.95;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   CTA button — a green bubble that floods the pill on hover
   (own element wrapper: the stagger transition no longer overrides its hover transition)
   ========================================================================== */
.kh-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 6px 22px 6px 6px;
    border-radius: 99px;
    -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
    background: #fff;
    color: var(--kh-navy);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55);
    transition: color 0.45s var(--kh-ease) 0.05s, box-shadow 0.5s var(--kh-ease), transform 0.5s var(--kh-ease);
}

.kh-btn::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--kh-green);
    /* circle behind the arrow; on hover it grows to flood the pill (vector clip, always sharp) */
    clip-path: circle(22px at 28px 50%);
    transition: clip-path 0.75s var(--kh-io);
}

.kh-btn__ico {
    position: relative;
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    overflow: hidden;
    color: #fff;
}

.kh-btn__ico > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transition: transform 0.6s var(--kh-io);
}

.kh-btn__ico > span:last-child {
    transform: translate3d(150%, 0, 0);
}

.kh-btn svg {
    width: 19px;
    height: 19px;
}

.kh-btn__txt {
    position: relative;
}

@media (hover:hover) and (pointer:fine) {
    @media (hover:hover) and (pointer:fine){.kh-slide__link:hover ~ .kh-card .kh-btn,
    .kh-slide__link:focus-visible ~ .kh-card .kh-btn {
        color: #fff;
        box-shadow: 0 16px 34px -12px rgba(110, 190, 69, 0.75);
    }}

    @media (hover:hover) and (pointer:fine){.kh-slide__link:hover ~ .kh-card .kh-btn::before,
    .kh-slide__link:focus-visible ~ .kh-card .kh-btn::before {
        clip-path: circle(260px at 28px 50%);
    }}

    @media (hover:hover) and (pointer:fine){.kh-slide__link:hover ~ .kh-card .kh-btn__ico > span:first-child,
    .kh-slide__link:focus-visible ~ .kh-card .kh-btn__ico > span:first-child {
        transform: translate3d(-150%, 0, 0);
    }}

    @media (hover:hover) and (pointer:fine){.kh-slide__link:hover ~ .kh-card .kh-btn__ico > span:last-child,
    .kh-slide__link:focus-visible ~ .kh-card .kh-btn__ico > span:last-child {
        transform: none;
    }}
}

@media (hover:hover) and (pointer:fine){.kh-slide__link:active ~ .kh-card .kh-btn {
    transform: scale(0.96);
}}

/* —— Counter + arrows —— */
.kh-ctrl {
    position: absolute;
    z-index: 4;
    bottom: 36px;
    inset-inline-end: 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.kh-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    direction: rtl;
    color: #fff;
}

.kh-count__win {
    display: block;
    height: 1em;
    overflow: hidden;
    font-size: 2.8rem;
    font-weight: 300;
    line-height: 1;
}

.kh-count__roll {
    display: flex;
    flex-direction: column;
    transform: translate3d(0, calc(var(--kh-idx, 0) * -1em), 0);
    transition: transform 0.8s var(--kh-io);
}

.kh-count__roll em {
    display: block;
    height: 1em;
    font-style: normal;
    line-height: 1;
}

.kh-count__total {
    font-size: 0.9rem;
    opacity: 0.65;
}

.kh-ctrl__btns {
    display: flex;
    gap: 10px;
    direction: rtl;
}

.kh-nav {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    background: rgba(8, 36, 66, 0.3);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.45s var(--kh-ease), color 0.45s var(--kh-ease), transform 0.35s var(--kh-ease);
}

.kh-nav::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.55s var(--kh-io);
}

.kh-nav svg {
    width: 18px;
    height: 18px;
    transition: transform 0.45s var(--kh-ease);
}

@media (hover:hover) and (pointer:fine) {
    .kh-nav:hover {
        background-color: #fff;
        color: var(--kh-navy);
    }

    .kh-nav:hover::before {
        transform: scale(1);
    }

    .kh-nav[data-kh-prev]:hover svg { transform: translateX(3px); }
    .kh-nav[data-kh-next]:hover svg { transform: translateX(-3px); }
}

.kh-nav:active {
    transform: scale(0.9);
}

.kh.is-single .kh-tabs,
.kh.is-single .kh-ctrl {
    display: none;
}

.kh.is-single .kh-stage {
    cursor: default;
}

/* ==========================================================================
   Side tiles
   ========================================================================== */
.kh-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: var(--kh-gap);
    min-height: 0;
    min-width: 0;
}

.kh-tile {
    position: relative;
    display: block;
    min-height: 0;
    border-radius: var(--kh-r);
    overflow: hidden;
    background: var(--kh-navy);
    color: #fff;
    isolation: isolate;
    /* anti-aliased rounded clip instead of clip-path (which stair-stepped while the image scaled on hover) */
    -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
    transform: translateZ(0);
}

a.kh-tile:hover {
    color: #fff;
}

.kh-tile picture {
    position: absolute;
    inset: 0;
    display: block;
}

.kh-tile__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--kh-ease);
    backface-visibility: hidden;
    will-change: transform;
}

.kh-tile__img--ph {
    background: linear-gradient(155deg, #0d3a6b, #082442);
}

@media (hover:hover) and (pointer:fine) {
    a.kh-tile:hover .kh-tile__img {
        transform: scale(1.06);
    }
}

.kh-tile__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(5, 18, 34, 0.78) 0%, transparent 58%);
}

.kh-tile__go {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    isolation: isolate;
    overflow: hidden;
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(8, 36, 66, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    color: #fff;
    transition: background-color 0.45s var(--kh-ease), color 0.45s var(--kh-ease);
}

.kh-tile__go::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.55s var(--kh-io);
}

.kh-tile__go > span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transition: transform 0.55s var(--kh-io);
}

.kh-tile__go > span:last-child {
    transform: translate3d(150%, 0, 0);
}

.kh-tile__go svg {
    width: 17px;
    height: 17px;
}

@media (hover:hover) and (pointer:fine) {
    a.kh-tile:hover .kh-tile__go {
        background-color: #fff;
        color: var(--kh-navy);
    }

    a.kh-tile:hover .kh-tile__go::before { transform: scale(1); }
    a.kh-tile:hover .kh-tile__go > span:first-child { transform: translate3d(-150%, 0, 0); }
    a.kh-tile:hover .kh-tile__go > span:last-child { transform: none; }
}

.kh-tile__copy {
    position: absolute;
    inset-inline: 20px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.kh-tile__eyebrow {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.kh-tile__title {
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
    font-weight: 700;
    line-height: 1.4;
}

/* ==========================================================================
   Perks — navy band, 4 cells, icon rings that fill on hover
   ========================================================================== */
.kh-perks {
    --p-bg: linear-gradient(120deg, #ffffff 0%, #f3f8ef 100%);
    --p-ink: var(--kh-navy);
    --p-muted: #5b6b7b;
    --p-line: rgba(8, 36, 66, 0.12);
    --p-ring: rgba(8, 36, 66, 0.14);
    --p-ring-bg: rgba(110, 190, 69, 0.14);
    --p-ico: #3f8f22;
    --p-hover: rgba(110, 190, 69, 0.08);
    --p-dot: rgba(8, 36, 66, 0.08);
    --p-glow: rgba(110, 190, 69, 0.22);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: var(--kh-gap) 0 0;
    padding: 0;
    list-style: none;
    direction: rtl;
    border-radius: var(--kh-r);
    background: var(--p-bg);
    color: var(--p-ink);
    box-shadow: inset 0 0 0 1px var(--p-line), 0 14px 34px -26px rgba(8, 36, 66, 0.35);
}

html.dark .kh-perks {
    --p-bg: linear-gradient(120deg, #0b2f56 0%, #082442 55%, #061b33 100%);
    --p-ink: #fff;
    --p-muted: rgba(255, 255, 255, 0.66);
    --p-line: rgba(255, 255, 255, 0.1);
    --p-ring: rgba(255, 255, 255, 0.22);
    --p-ring-bg: rgba(255, 255, 255, 0.05);
    --p-ico: #9be070;
    --p-hover: rgba(255, 255, 255, 0.04);
    --p-dot: rgba(255, 255, 255, 0.075);
    --p-glow: rgba(110, 190, 69, 0.3);
    box-shadow: inset 0 0 0 1px var(--p-line);
}

.kh-perks::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -170px;
    inset-inline-start: -90px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--p-glow), transparent 66%);
    pointer-events: none;
}

.kh-perks::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background-image: radial-gradient(var(--p-dot) 1px, transparent 1.6px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(270deg, #000, transparent 70%);
    mask-image: linear-gradient(270deg, #000, transparent 70%);
    pointer-events: none;
}

.kh-perk {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 26px;
    transition: background 0.4s ease, opacity 0.8s var(--kh-ease), transform 0.8s var(--kh-ease);
    transition-delay: 0s, calc(var(--i, 0) * 0.1s), calc(var(--i, 0) * 0.1s);
}

.kh-perk + .kh-perk::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 24%;
    height: 52%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--p-line), transparent);
}

.kh-perks[data-kh-reveal].is-armed .kh-perk {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
}

.kh-perks[data-kh-reveal].is-armed.is-in .kh-perk {
    opacity: 1;
    transform: none;
}

.kh-perk__ico {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    flex: none;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--p-ring);
    background: var(--p-ring-bg);
    color: var(--p-ico);
    transition: background-color 0.45s var(--kh-ease), color 0.45s var(--kh-ease), transform 0.6s var(--kh-ease);
}

.kh-perk__ico::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 50%;
    background: var(--kh-green);
    transform: scale(0);
    transition: transform 0.6s var(--kh-io);
}

.kh-perk__ico svg {
    width: 25px;
    height: 25px;
    transition: transform 0.6s var(--kh-ease);
}

@media (hover:hover) and (pointer:fine) {
    .kh-perk:hover {
        background: var(--p-hover);
    }

    .kh-perk:hover .kh-perk__ico {
        background-color: var(--kh-green);
        color: #fff;
        transform: translateY(-3px);
    }

    .kh-perk:hover .kh-perk__ico::before { transform: scale(1); }
    .kh-perk:hover .kh-perk__ico svg { transform: scale(1.12) rotate(-6deg); }
}

.kh-perk__txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kh-perk__txt strong {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--p-ink);
}

.kh-perk__txt span {
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--p-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .kh {
        --kh-side: 250px;
    }

    .kh-ctrl {
        top: 20px;
        bottom: auto;
        flex-direction: row;
        align-items: center;
    }

    .kh-count {
        display: none;
    }

    .kh-nav {
        width: 40px;
        height: 40px;
    }

    .kh-perk {
        padding: 20px 18px;
        gap: 12px;
    }

    .kh-perk__ico {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 860px) {
    .kh {
        padding: 20px 0 28px;
    }

    .kh__grid {
        grid-template-columns: 1fr;
    }

    .kh-side {
        grid-template-rows: none;
        grid-template-columns: 1fr 1fr;
    }

    .kh-tile {
        aspect-ratio: 1 / 1;
    }

    .kh-perks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kh-perk + .kh-perk::before {
        display: none;
    }

    .kh-perk:nth-child(n + 3) {
        box-shadow: inset 0 1px 0 var(--p-line);
    }

    .kh-perk:nth-child(odd) {
        box-shadow: inset -1px 0 0 var(--p-line);
    }

    .kh-perk:nth-child(odd):nth-child(n + 3) {
        box-shadow: inset -1px 0 0 var(--p-line), inset 0 1px 0 var(--p-line);
    }
}

@media (max-width: 560px) {
    .kh {
        --kh-gap: 12px;
        --kh-r: 22px;
        --kh-slide-ratio: 1080 / 1350;
        --kh-slide-pad: 125%;
        padding-top: 20px;
    }

    .kh-tabs {
        top: 12px;
        inset-inline-start: 18px;
    }

    .kh-ctrl {
        display: none;
    }

    .kh-card {
        bottom: 20px;
        inset-inline: 20px;
        width: auto;
    }

    .kh-card__kicker {
        margin-bottom: 8px;
        font-size: 0.76rem;
    }

    .kh-card__title {
        font-size: 1.5rem;
        line-height: 1.55;
    }

    .kh-card__desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.84rem;
        line-height: 1.8;
        margin-bottom: 16px;
    }

    .kh-btn {
        font-size: 0.78rem;
        gap: 8px;
        padding: 4px 14px 4px 4px;
    }

    .kh-btn__ico {
        width: 32px;
        height: 32px;
    }

    .kh-btn::before { clip-path: circle(16px at 20px 50%); }
    .kh-btn svg { width: 15px; height: 15px; }

    .kh-slide__scrim {
        background:
            linear-gradient(0deg, rgba(5, 18, 34, 0.9) 0%, rgba(5, 18, 34, 0.5) 38%, transparent 66%),
            linear-gradient(180deg, rgba(5, 18, 34, 0.25) 0%, transparent 18%);
    }

    .kh-tile__go {
        width: 32px;
        height: 32px;
        top: 10px;
        inset-inline-end: 10px;
    }

    .kh-tile__copy {
        inset-inline: 14px;
        bottom: 14px;
    }

    .kh-tile__title {
        font-size: 1.02rem;
    }

    .kh-perk {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 8px 10px;
        padding: 16px 14px;
    }

    .kh-perk__txt {
        display: contents;
    }

    .kh-perk__ico {
        grid-column: 1;
        grid-row: 1;
        width: 40px;
        height: 40px;
    }

    .kh-perk__ico svg {
        width: 20px;
        height: 20px;
    }

    .kh-perk__txt strong {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .kh-perk__txt span {
        grid-column: 1 / -1;
        grid-row: 2;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.72rem;
        line-height: 1.75;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh *,
    .kh *::before,
    .kh *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .kh-w > span,
    .kh-card__kicker,
    .kh-card__desc,
    .kh-card__cta {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   Authors rail (prefix: kha-) — compact: round avatars, no panel.
   ========================================================================== */
.kha {
    --kha-green: var(--katabam-primary, #6ebe45);
    --kha-navy: #082442;
    --kha-ink: var(--katabam-secondary, #082442);
    --kha-muted: #5b6b7b;
    --kha-line: rgba(8, 36, 66, 0.12);
    --kha-btn-line: rgba(8, 36, 66, 0.2);
    --kha-btn-ink: var(--kha-navy);
    --kha-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    --kha-io: cubic-bezier(0.76, 0, 0.24, 1);
    --kha-size: clamp(80px, 7.2vw, 92px);
    --kha-sk-base: #e8edf3;
    --kha-sk-hi: rgba(255, 255, 255, 0.75);
    /* below the fold: the browser skips layout/paint until the section is near the viewport; the box keeps its height (no layout shift) */
    content-visibility: auto;
    contain-intrinsic-size: auto 250px;
    padding: 0 0 32px;
    font-family: 'IranSans', Tahoma, Arial, sans-serif;
}

html.dark .kha {
    --kha-ink: #f1f5f9;
    --kha-muted: rgba(226, 232, 240, 0.7);
    --kha-line: rgba(255, 255, 255, 0.16);
    --kha-btn-line: rgba(255, 255, 255, 0.3);
    --kha-btn-ink: #fff;
    --kha-sk-base: rgba(255, 255, 255, 0.08);
    --kha-sk-hi: rgba(255, 255, 255, 0.14);
}

.kha *,
.kha *::before,
.kha *::after {
    box-sizing: border-box;
}

.kha__shell {
    width: 100%;
    max-width: min(var(--katabam-content, 1250px), calc(100% - 2.5rem));
    margin: 0 auto;
}

.kha__panel {
    direction: rtl;
    padding-top: 0;
}

/* —— Header: one line —— */
.kha__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.kha__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 800;
    line-height: 1.6;
    color: var(--kha-ink);
}

.kha__title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kha-green);
    box-shadow: 0 0 0 4px rgba(110, 190, 69, 0.22);
}

.kha__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

/* round arrows: fill-sweep hover */
.kha__nav {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    cursor: pointer;
    color: var(--kha-btn-ink);
    box-shadow: inset 0 0 0 1.5px var(--kha-btn-line);
    transition: color 0.45s var(--kha-ease), box-shadow 0.45s var(--kha-ease), transform 0.35s var(--kha-ease), opacity 0.3s ease;
}

.kha__nav::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: var(--kha-green);
    transform: scale(0);
    transition: transform 0.55s var(--kha-io);
}

.kha__nav {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.kha__nav svg { width: 16px; height: 16px; }
.kha__nav.is-off { opacity: 0.35; pointer-events: none; }
@media (hover:hover) and (pointer:fine) {
    .kha__nav:active { transform: scale(0.9); }
    .kha__nav:hover {
        color: #fff;
        box-shadow: inset 0 0 0 1.5px var(--kha-green);
    }
    .kha__nav:hover::before { transform: scale(1); }
}

.kha__nav:focus-visible,
.kha-card__link:focus-visible {
    outline: 2px solid var(--kha-green);
    outline-offset: 3px;
}

/* —— Rail —— */
.kha__rail {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 6px 2px 8px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.kha__rail::-webkit-scrollbar { display: none; }
.kha__rail.is-drag { cursor: grabbing; user-select: none; }
/* while dragging, links are inert so releasing over a card can never open it */
.kha__rail.is-drag .kha-card__link { pointer-events: none; }

.kha-card {
    flex: 0 0 calc(var(--kha-size) + 28px);
}

.kha-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px;
    color: var(--kha-ink);
    text-align: center;
    text-decoration: none;
}

/* avatar ring */
.kha-card__media {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: var(--kha-size);
    height: var(--kha-size);
    border-radius: 50%;
    background: linear-gradient(160deg, hsl(var(--h) 42% 40%), hsl(var(--h) 45% 22%));
    box-shadow: 0 0 0 3px var(--katabam-bg, #fff), 0 0 0 4.5px var(--kha-line);
    transition: box-shadow 0.45s var(--kha-ease), transform 0.5s var(--kha-ease);
}

.kha-card__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    pointer-events: none;
    transition: transform 0.8s var(--kha-ease);
}

/* —— photo skeleton: a shimmer (transform only, no repaint) until the avatar has loaded —— */
.kha-card__media--img { background: var(--kha-sk-base); }

.kha-card__media--img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, var(--kha-sk-hi) 50%, transparent 80%);
    transform: translate3d(100%, 0, 0);
    animation: kha-sk 1.4s ease-in-out infinite;
}

.kha-card__media.is-loaded::before,
.kha-card__media.is-error::before { display: none; animation: none; }
.kha-card__media.is-error img { display: none; }
.kha-card__media--img.is-error { background: linear-gradient(160deg, hsl(var(--h) 42% 40%), hsl(var(--h) 45% 22%)); }

@keyframes kha-sk { to { transform: translate3d(-100%, 0, 0); } }

.kha-card__mono {
    font-size: calc(var(--kha-size) * 0.4);
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
}

.kha-card__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 100%;
}

.kha-card__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.6;
}

.kha-card__count {
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--kha-muted);
}

@media (hover:hover) and (pointer:fine) {
    .kha-card__link:hover .kha-card__media {
        transform: translate3d(0, -3px, 0);
        box-shadow: 0 0 0 3px var(--katabam-bg, #fff), 0 0 0 5px var(--kha-green);
    }

    .kha-card__link:hover .kha-card__media img { transform: scale(1.1); }
}

/* reveal on scroll (armed by home-hero.js) */
.kha__panel[data-kh-reveal].is-armed .kha-card { opacity: 0; }

.kha__panel[data-kh-reveal].is-armed.is-in .kha-card {
    opacity: 1;
    animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) calc(min(var(--i), 8) * 0.14s) backwards;
}

@media (max-width: 560px) {
    .kha { --kha-size: 76px; padding-bottom: 28px; contain-intrinsic-size: auto 232px; }
    .kha__nav { display: none; }
    /* full-bleed: avatars run to the screen edges, the first one lines up with the page gutter */
    .kha__rail { cursor: auto; margin-inline: -1.25rem; padding-inline: 1.25rem; scroll-padding-inline: 1.25rem; }
    .kha-card { flex-basis: calc(var(--kha-size) + 22px); }
    .kha-card__name { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .kha *, .kha *::before, .kha *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* ==========================================================================
   Categories (prefix: khc-) — desktop grid, phone swipe rail. No JS, no looping motion.
   ========================================================================== */
.khc {
    --khs-green: var(--katabam-primary, #6ebe45);
    --khs-btn-ink: #082442;
    --khs-btn-line: rgba(8, 36, 66, 0.2);
    --khs-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    --khs-io: cubic-bezier(0.76, 0, 0.24, 1);
    --khc-ink: var(--katabam-secondary, #082442);
    --khc-muted: #5b6b7b;
    --khc-line: rgba(8, 36, 66, 0.12);
    --khc-green: var(--katabam-primary, #6ebe45);
    --khc-tint: rgba(110, 190, 69, 0.07);
    --khc-sk-base: #e8edf3;
    --khc-sk-hi: rgba(255, 255, 255, 0.75);
    --khc-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    padding: 4px 0 36px;
    font-family: 'IranSans', Tahoma, Arial, sans-serif;
    /* NOTE: no content-visibility here — it implies paint containment, which cut the entrance
       animation (rise from below) and the hover lift/shadow at the section's bottom edge. */
    overflow: visible;
}

html.dark .khc {
    --khs-btn-ink: #fff;
    --khs-btn-line: rgba(255, 255, 255, 0.3);
    --khc-ink: #f1f5f9;
    --khc-muted: rgba(226, 232, 240, 0.7);
    --khc-line: rgba(255, 255, 255, 0.14);
    --khc-tint: rgba(110, 190, 69, 0.1);
    --khc-sk-base: rgba(255, 255, 255, 0.08);
    --khc-sk-hi: rgba(255, 255, 255, 0.14);
}

.khc *,
.khc *::before,
.khc *::after { box-sizing: border-box; }

.khc__shell {
    width: 100%;
    max-width: min(var(--katabam-content, 1250px), calc(100% - 2.5rem));
    margin: 0 auto;
}

.khc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    direction: rtl;
}

.khc__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 800;
    line-height: 1.6;
    color: var(--khc-ink);
}

.khc__title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--khc-green);
    box-shadow: 0 0 0 4px rgba(110, 190, 69, 0.22);
}


.khc__list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    direction: rtl;
}

/* 6 square tiles per row */
.khc-item { flex: 0 0 calc((100% - 5 * 14px) / 6); min-width: 0; }

/* the card itself (.khc-card) lives in cat-cards.css — shared with the shop strip and the all-categories page */

/* tablets: 4 per row */
@media (max-width: 1024px) and (min-width: 761px) {
    .khc-item { flex-basis: calc((100% - 3 * 14px) / 4); }
}

/* phones: full-bleed swipe rail — tiles run to the screen edges, the first one lines up with the page gutter */
@media (max-width: 760px) {
    .khc { padding-bottom: 28px; }

    .khc__list {
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin-inline: -1.25rem;
        padding: 4px 1.25rem 10px;
        scroll-padding-inline: 1.25rem;
    }

    .khc__list::-webkit-scrollbar { display: none; }
    .khc-item { flex: 0 0 min(42vw, 180px); }
}

@media (prefers-reduced-motion: reduce) {
    .khc *, .khc *::before, .khc *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* ==========================================================================
   Special discounts (prefix: khs-) — drag / swipe rail, same behaviour as the authors rail
   ========================================================================== */
.khs {
    --khs-green: var(--katabam-primary, #6ebe45);
    --khs-ink: var(--katabam-secondary, #082442);
    --khs-muted: #5b6b7b;
    --khs-line: rgba(8, 36, 66, 0.12);
    --khs-btn-line: rgba(8, 36, 66, 0.2);
    --khs-btn-ink: #082442;
    --khs-sale: #e5484d;
    --khs-sk-base: #e8edf3;
    --khs-sk-hi: rgba(255, 255, 255, 0.75);
    --khs-ease: cubic-bezier(0.22, 0.8, 0.3, 1);
    --khs-io: cubic-bezier(0.76, 0, 0.24, 1);
    padding: 0 0 40px;
    font-family: 'IranSans', Tahoma, Arial, sans-serif;
}

html.dark .khs {
    --khs-ink: #f1f5f9;
    --khs-muted: rgba(226, 232, 240, 0.7);
    --khs-line: rgba(255, 255, 255, 0.14);
    --khs-btn-line: rgba(255, 255, 255, 0.3);
    --khs-btn-ink: #fff;
    --khs-sk-base: rgba(255, 255, 255, 0.08);
    --khs-sk-hi: rgba(255, 255, 255, 0.14);
}

.khs *, .khs *::before, .khs *::after { box-sizing: border-box; }

.khs__shell {
    width: 100%;
    max-width: min(var(--katabam-content, 1250px), calc(100% - 2.5rem));
    margin: 0 auto;
    direction: rtl;
}

.khs__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.khs__titles { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }

.khs__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    font-weight: 800;
    line-height: 1.6;
    color: var(--khs-ink);
}

.khs__title::before {
    content: "";
    flex: none;
    width: 4px;
    height: 1.15em;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--khs-green, #6ebe45), #3f8f22);
}

.khs__chip {
    padding: 3px 12px;
    border-radius: 99px;
    background: rgba(229, 72, 77, 0.1);
    color: var(--khs-sale);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.7;
}

.khs__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

/* round arrows: fill-sweep hover */
.khs__nav {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    cursor: pointer;
    color: var(--khs-btn-ink);
    box-shadow: inset 0 0 0 1.5px var(--khs-btn-line);
    transition: color 0.45s var(--khs-ease), box-shadow 0.45s var(--khs-ease), transform 0.35s var(--khs-ease), opacity 0.3s ease;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.khs__nav::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: var(--khs-green);
    transform: scale(0);
    transition: transform 0.55s var(--khs-io);
}

.khs__nav svg { width: 16px; height: 16px; }
.khs__nav.is-off { opacity: 0.35; pointer-events: none; }
.khs__nav:active { transform: scale(0.9); }

@media (hover:hover) and (pointer:fine) {
    .khs__nav:hover {
        color: #fff;
        box-shadow: inset 0 0 0 1.5px var(--khs-green);
    }

    .khs__nav:hover::before { transform: scale(1); }
}

/* "مشاهده همه" — light: white button with a hairline border; dark: frosted glass. Green arrow tile in both. */
.kh-more {
    --kh-more-bg: #fff;
    --kh-more-bg-hi: rgba(110, 190, 69, 0.1);
    --kh-more-ink: var(--katabam-secondary, #082442);
    --kh-more-line: rgba(8, 36, 66, 0.14);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px 0 5px;
    border-radius: 12px;
    background: var(--kh-more-bg);
    color: var(--kh-more-ink);
    box-shadow: inset 0 0 0 1.5px var(--kh-more-line);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
html.dark .kh-more {
    --kh-more-bg: rgba(255, 255, 255, 0.08);
    --kh-more-bg-hi: rgba(255, 255, 255, 0.16);
    --kh-more-ink: #fff;
    --kh-more-line: rgba(255, 255, 255, 0.16);
}
.kh-more svg {
    width: 26px;
    height: 26px;
    padding: 6px;
    box-sizing: border-box;
    flex: none;
    border-radius: 9px;
    background: var(--katabam-primary, #6ebe45);
    color: #fff;
    transition: transform 0.35s var(--khs-io, ease);
}
@media (hover:hover) and (pointer:fine) {
    .kh-more:hover { background: var(--kh-more-bg-hi); color: var(--kh-more-ink); box-shadow: inset 0 0 0 1.5px var(--katabam-primary, #6ebe45); }
    .kh-more:hover svg { transform: translate3d(-3px, 0, 0); }
}
.kh-more:focus-visible { outline: 2px solid var(--katabam-primary, #6ebe45); outline-offset: 3px; }

.khs__nav:focus-visible,
.khs-card__link:focus-visible {
    outline: 2px solid var(--khs-green);
    outline-offset: 3px;
}


/* —— Rail —— */
.khs__rail {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 6px 2px 14px;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-x pan-y pinch-zoom;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    direction: rtl;
}

.khs__rail::-webkit-scrollbar { display: none; }
.khs__rail.is-drag { cursor: grabbing; user-select: none; }
/* the shop card (.about-surface) reads --about-* tokens that only the shop/blog templates define */
.khs {
    --about-heading: var(--katabam-secondary, #082442);
    --about-text: var(--katabam-text, #1a1a1a);
    --about-muted: var(--katabam-text-muted, #5c5c5c);
    --about-surface: #ffffff;
    --about-surface-soft: #eef1f5;
    --about-surface-border: rgba(8, 24, 42, 0.1);
    --about-panel: #e8edf3;
    --about-panel-border: rgba(8, 24, 42, 0.08);
    --about-glow: rgba(110, 190, 69, 0.18);
    --about-spotlight: rgba(110, 190, 69, 0.09);
    --about-glare: rgba(110, 190, 69, 0.07);
    --about-border-beam: #6ebe45;
    --about-border-beam-soft: #9fd97a;
}

html.dark .khs {
    --about-heading: #f1f5f9;
    --about-text: #e8eef4;
    --about-muted: #94a3b8;
    --about-surface: #10263c;
    --about-surface-soft: rgba(148, 163, 184, 0.1);
    --about-surface-border: rgba(255, 255, 255, 0.12);
    --about-panel: rgba(148, 163, 184, 0.08);
    --about-panel-border: rgba(255, 255, 255, 0.1);
    --about-glow: rgba(110, 190, 69, 0.22);
    --about-spotlight: rgba(110, 190, 69, 0.1);
    --about-glare: rgba(255, 255, 255, 0.07);
    --about-border-beam: #7ed957;
    --about-border-beam-soft: #b6e89a;
}

.khs__rail.is-drag > .shop-card { pointer-events: none; }
.khs__rail.is-drag .shop-card__chips-track { animation-play-state: paused; }
.khs { --shop-discount: #d92d2d; }

/* the real shop card (template-parts/shop/card.php) laid out as a rail */
.khs__rail.shop-grid {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 14px;
    /* room inside the scroller for the card's shadow and hover lift, given back with negative margins */
    padding: 26px 2px 62px;
    margin: -26px -2px -50px;
    grid-template-columns: none;
}

.khs__rail.shop-grid > .shop-card {
    /* exactly five cards fill the row (same grid as the tabs section), so nothing is cut at rest */
    flex: 0 0 calc((100% - 56px) / 5);
    margin: 0; /* shop cards carry a 2px margin that pushed the row wider than the page */
    width: auto;
    min-width: 0;
}

@media (max-width: 1180px) {
    .khs__rail.shop-grid > .shop-card { flex-basis: calc((100% - 42px) / 4); }
}
@media (max-width: 900px) {
    .khs__rail.shop-grid > .shop-card { flex-basis: calc((100% - 28px) / 3); }
}

/* entrance: cards slide in one after another (keyframes, so the mobile "no transition" rule leaves them alone) */
.khs__rail.shop-grid > .shop-card.shop-reveal,
.kht__grid.shop-grid > .shop-card.shop-reveal { opacity: 1; }
.khs__rail[data-kh-reveal].is-armed > .shop-card.shop-reveal,
.kht__grid[data-kh-reveal].is-armed > .shop-card.shop-reveal,
.khc__list[data-kh-reveal].is-armed > .khc-item { opacity: 0; }

.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal,
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal,
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item {
    opacity: 1;
    animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(2),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(2),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(2) { animation-delay: 0.14s; }
.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(3),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(3),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(3) { animation-delay: 0.28s; }
.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(4),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(4),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(4) { animation-delay: 0.42s; }
.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(5),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(5),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(5) { animation-delay: 0.56s; }
.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(6),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(6),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(6) { animation-delay: 0.7s; }
.khs__rail[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(n + 7),
.kht__grid[data-kh-reveal].is-armed.is-in > .shop-card.shop-reveal:nth-child(n + 7),
.khc__list[data-kh-reveal].is-armed.is-in > .khc-item:nth-child(n + 7) { animation-delay: 0.84s; }

@keyframes kh-enter {
    0% { opacity: 0; transform: translate3d(0, 40px, 0) scale(0.9); }
    100% { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
    .khs { padding-bottom: 28px; }
    .khs__nav { display: none; }
    /* full-bleed rail */
    .khs__rail.shop-grid {
        gap: 10px;
        cursor: auto;
        margin-inline: -1.25rem;
        padding-inline: 1.25rem;
        scroll-padding-inline: 1.25rem;
    }

    .khs__rail.shop-grid > .shop-card { flex-basis: min(43vw, 176px); }
}

@media (prefers-reduced-motion: reduce) {
    .khs *, .khs *::before, .khs *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* carousel links never change colour on touch / press / focus (iOS keeps :hover after a tap) */
.kha-card__link, .kha-card__link:is(:hover, :active, :focus, :visited) { color: var(--kha-ink); -webkit-touch-callout: none; }
.kha-card__name { color: var(--kha-ink); }
.kha-card__link:focus:not(:focus-visible), .khc-card:focus:not(:focus-visible) { outline: none; }

/* ==========================================================================
   Newest / best sellers (prefix: kht-) — tab bar + 4-column grid, phone swipe rail
   ========================================================================== */
.kht { padding-bottom: 44px; }
.kht .khs__titles { gap: 8px 22px; }

/* segmented tab bar with a sliding indicator (transform only) */
.kht__tabs {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 99px;
    background: rgba(8, 36, 66, 0.06);
    direction: rtl;
}

html.dark .kht__tabs { background: rgba(255, 255, 255, 0.08); }

.kht__ink {
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: var(--w, 0px);
    border-radius: 99px;
    background: var(--khs-green);
    box-shadow: 0 6px 16px -8px rgba(90, 171, 56, 0.9);
    transform: translate3d(var(--x, 0px), 0, 0);
    transition: transform 0.45s var(--khs-io), width 0.45s var(--khs-io);
}

.kht__ink:not([data-ready]) { transition: none; }

.kht__tab {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0 16px;
    height: 32px;
    border: 0;
    border-radius: 99px;
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--khs-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.kht__tab.is-active { color: #fff; }
.kht__tab:focus-visible { outline: 2px solid var(--khs-green); outline-offset: 2px; }

.kht__panel[hidden] { display: none; }

/* desktop: a plain 4-column grid of shop cards */
.kht__grid.shop-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.kht__grid.shop-grid > .shop-card { width: auto; min-width: 0; margin: 0; }

@media (max-width: 1180px) {
    .kht__grid.shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .kht__grid.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* phones: the same cards as a full-bleed swipe rail (native scrolling, no snapping) */
@media (max-width: 760px) {
    .kht { padding-bottom: 28px; }
    /* title + "مشاهده همه" on the first row, the two tabs as a full-width segmented control below */
    .kht .khs__head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px 10px;
    }
    .kht .khs__tools { display: contents; }
    .kht .kh-more { grid-column: 2; grid-row: 1; height: 34px; font-size: 0.78rem; }
    .kht .khs__titles { display: contents; }
    .kht .khs__title { grid-column: 1; grid-row: 1; }
    .kht__tabs {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        width: 100%;
    }
    .kht__tab { height: 36px; padding: 0 8px; font-size: 0.86rem; }

    .kht__grid.shop-grid {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 10px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 26px 1.25rem 62px;
        margin: -26px -1.25rem -50px;
        scroll-padding-inline: 1.25rem;
    }

    .kht__grid.shop-grid::-webkit-scrollbar { display: none; }
    .kht__grid.shop-grid > .shop-card { flex: 0 0 min(43vw, 176px); }
}

@media (prefers-reduced-motion: reduce) {
    .kht__ink { transition: none; }
}

/* home product cards: no shadow when hovered (the border-beam stays) */
html .khs .shop-card.about-surface:is(:hover, .is-hov) { box-shadow: none !important; }


/* ==========================================================================
   Blog section
   ========================================================================== */
.khb { padding-bottom: 44px; }

.khb__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 10px 2px;
    margin: -10px -2px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-x pan-y pinch-zoom;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    direction: rtl;
}
.khb__list::-webkit-scrollbar { display: none; }
.khb__list.is-drag { cursor: grabbing; user-select: none; }
.khb__list.is-drag > .khb-card { pointer-events: none; }

.khb-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 0 0 calc((100% - 56px) / 5);
    overflow: hidden;
    border-radius: 16px;
}
.khs .khb-card > .khb-card__body { position: static; }
html .khs .khb-card.about-surface:is(:hover, .is-hov) { box-shadow: none !important; }

.khb-card__media {
    position: relative;
    display: block;
    aspect-ratio: 800 / 450;
    overflow: hidden;
    background: var(--about-surface-soft);
    -webkit-user-drag: none;
    user-select: none;
}

.khb-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
    transition: transform 0.7s var(--khs-io, ease);
}

.khb-card__ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--about-surface-soft), var(--about-panel)); }

.khb-card__body { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; flex: 1; }

.khb-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 0.74rem; color: var(--about-muted); }
.khb-card__cat { padding: 3px 10px; border-radius: 99px; background: rgba(110, 190, 69, 0.14); color: #2f6f17; font-weight: 700; }
html.dark .khb-card__cat { color: #b9ec9d; }

.khb-card__title { margin: 0; font-size: 0.86rem; font-weight: 800; line-height: 1.7; }
.khb-card__title a,
.khb-card__title a:is(:hover, :active, :focus, :visited) {
    color: var(--about-heading);
    text-decoration: none;
    -webkit-touch-callout: none;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
/* the whole card is the click target */
.khb-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.khb-card__excerpt {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.85;
    color: var(--about-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.khb-card__date { margin-top: auto; padding-top: 4px; font-size: 0.74rem; color: var(--about-muted); }

@media (hover:hover) and (pointer:fine) {
    .khb-card:hover .khb-card__media img { transform: scale(1.05); }
}

/* entrance: one card after another */
.khb__list[data-kh-reveal].is-armed > .khb-card { opacity: 0; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card { opacity: 1; animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card:nth-child(2) { animation-delay: 0.14s; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card:nth-child(3) { animation-delay: 0.28s; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card:nth-child(4) { animation-delay: 0.42s; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card:nth-child(5) { animation-delay: 0.56s; }
.khb__list[data-kh-reveal].is-armed.is-in > .khb-card:nth-child(n + 6) { animation-delay: 0.7s; }

@media (max-width: 1100px) {
    .khb-card { flex-basis: calc((100% - 42px) / 4); }
}

/* phones: full-bleed swipe rail, no snapping */
@media (max-width: 760px) {
    .khb { padding-bottom: 28px; }
    .khs .khb__list, .khb__list {
        gap: 10px;
        cursor: auto;
        padding: 10px 1.25rem;
        margin: -10px -1.25rem;
        scroll-padding-inline: 1.25rem;
    }
    .khb-card { flex: 0 0 min(52vw, 210px); }
}

/* category tabs on phones: long names may wrap instead of overflowing */
@media (max-width: 760px) {
    .kcat .kht__tab { white-space: normal; line-height: 1.35; height: auto; min-height: 36px; padding: 6px 6px; font-size: 0.8rem; }
}


/* ==========================================================================
   Book request: the designed banner image (admin-uploaded) or a light fallback card
   ========================================================================== */
.khr { padding-bottom: 48px; }

.khr__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
}
.khr__cta {
    position: absolute;
    z-index: 2;
    top: 54%;
    right: 4%;
    line-height: 1;
    pointer-events: none;
    animation: khr-cta-float 2.6s ease-in-out infinite;
}
.khr__cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding-inline: 18px 7px;
    border-radius: 999px;
    background: #12381c;
    color: #f4fff0;
    box-shadow:
        0 14px 28px rgba(6, 28, 10, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.28);
    overflow: hidden;
    font-size: 1rem;
    font-weight: 800;
    animation: khr-cta-glow 2.6s ease-in-out infinite;
}
.khr__cta-btn::before {
    content: "";
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg, transparent 0 58%, rgba(255, 255, 255, 0.15) 72%, #fff 84%, #b6f08a 92%, transparent 100%);
    animation: khr-cta-spin 2.4s linear infinite;
    z-index: 0;
}
.khr__cta-btn::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(182, 240, 138, 0.28), transparent 46%),
        linear-gradient(180deg, #1d5a2c 0%, #12381c 100%);
    z-index: 0;
}
.khr__cta-shine {
    position: absolute;
    inset: 2px;
    border-radius: inherit;
    background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.42) 48%, transparent 64%);
    transform: translateX(140%);
    animation: khr-cta-shine 2.6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
.khr__cta-label { position: relative; z-index: 2; white-space: nowrap; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18); }
.khr__cta-ico {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #e8f8de 100%);
    color: #146b28;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.khr__cta-ico svg { width: 16px; height: 16px; }
@keyframes khr-cta-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes khr-cta-glow {
    0%, 100% { box-shadow: 0 14px 28px rgba(6, 28, 10, 0.32), 0 0 0 0 rgba(255, 255, 255, 0.38); }
    50% { box-shadow: 0 18px 34px rgba(6, 28, 10, 0.36), 0 0 0 7px rgba(255, 255, 255, 0); }
}
@keyframes khr-cta-spin { to { transform: rotate(360deg); } }
@keyframes khr-cta-shine {
    0%, 42% { transform: translateX(140%); }
    100% { transform: translateX(-160%); }
}
@media (hover: hover) and (pointer: fine) {
    .khr__link:hover .khr__cta { animation-play-state: paused; transform: translateY(-4px); }
    .khr__link:hover .khr__cta-ico { transform: translateX(-4px); }
}
.khr__link picture,
.khr__link img { display: block; width: 100%; height: auto; }
.khr__link:focus-visible { outline: 2px solid var(--katabam-primary, #6ebe45); outline-offset: 3px; }

.khr__box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: 24px;
    color: var(--khs-ink);
    background: linear-gradient(135deg, rgba(110, 190, 69, 0.14), rgba(110, 190, 69, 0.04));
    box-shadow: inset 0 0 0 1px rgba(110, 190, 69, 0.28);
}
html.dark .khr__box { background: linear-gradient(135deg, rgba(110, 190, 69, 0.16), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 0 0 1px rgba(110, 190, 69, 0.3); }
.khr__title { margin: 0 0 6px; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; line-height: 1.7; color: var(--khs-ink); }
.khr__text { margin: 0; max-width: 52ch; font-size: 0.9rem; line-height: 2; color: var(--khs-muted); }

.khr__btn,
.khr__btn:is(:hover, :active, :focus, :visited) {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 20px;
    border-radius: 13px;
    background: var(--katabam-primary, #6ebe45);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}
.khr__btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--khs-io, ease); }
@media (hover:hover) and (pointer:fine) {
    .khr__btn:hover { filter: brightness(1.06); }
    .khr__btn:hover svg { transform: translate3d(-4px, 0, 0); }
}

.khr__link[data-kh-reveal].is-armed,
.khr__box[data-kh-reveal].is-armed { opacity: 0; }
.khr__link[data-kh-reveal].is-armed.is-in,
.khr__box[data-kh-reveal].is-armed.is-in { opacity: 1; animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) backwards; }

@media (max-width: 760px) {
    .khr { padding-bottom: 32px; }
    .khr__link, .khr__box { border-radius: 20px; }
    .khr__box { flex-direction: column; align-items: stretch; padding: 22px 20px; }
    .khr__btn { justify-content: center; }
    .khr__cta {
        top: auto;
        bottom: 3.2%;
        right: 4.7%;
        left: auto;
        height: 10.5%;
        animation: none;
    }
    .khr__cta-btn {
        height: 100%;
        gap: 6px;
        font-size: clamp(0.75rem, 3.2vw, 0.9rem);
        padding-inline: 12px 4px;
        animation: none;
        box-shadow: 0 8px 18px rgba(6, 28, 10, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.28);
    }
    .khr__cta-ico { width: auto; height: 72%; aspect-ratio: 1; }
    .khr__cta-ico svg { width: 46%; height: 46%; }
}
@media (max-width: 760px) and (hover: hover) and (pointer: fine) {
    .khr__link:hover .khr__cta { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
    .khr__cta,
    .khr__cta-btn,
    .khr__cta-btn::before,
    .khr__cta-shine { animation: none; }
}

/* ==========================================================================
   Two banners side by side
   ========================================================================== */
.khd { padding-bottom: 40px; }
.khd__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.khd__grid--one { grid-template-columns: 1fr; }
.khd__item { display: block; overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(#fff, #000); transform: translateZ(0); border-radius: 22px; line-height: 0; -webkit-tap-highlight-color: transparent; }
.khd__item img { display: block; width: 100%; height: auto; transition: transform 0.7s var(--khs-io, ease); }
.khd__item:focus-visible { outline: 2px solid var(--katabam-primary, #6ebe45); outline-offset: 3px; }
@media (hover:hover) and (pointer:fine) { a.khd__item:hover img { transform: scale(1.03); } }
.khd__grid[data-kh-reveal].is-armed > .khd__item { opacity: 0; }
.khd__grid[data-kh-reveal].is-armed.is-in > .khd__item { opacity: 1; animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.khd__grid[data-kh-reveal].is-armed.is-in > .khd__item:nth-child(2) { animation-delay: 0.16s; }
@media (max-width: 760px) {
    .khd { padding-bottom: 26px; }
    .khd__grid { grid-template-columns: 1fr; gap: 12px; }
    .khd__item { border-radius: 18px; }
}

/* a little more air between the home sections */
main.site-main--home { --khy: 56px; }
@media (max-width: 1100px) { main.site-main--home { --khy: 46px; } }
@media (max-width: 760px)  { main.site-main--home { --khy: 34px; } }
main.site-main--home > section { margin: 0; padding-top: 0; padding-bottom: 0; }
main.site-main--home > section + section { margin-top: var(--khy); }
main.site-main--home > section.kh { padding-top: 28px; }
main.site-main--home > section:last-of-type { margin-bottom: var(--khy); }

/* the border beam keeps travelling while hovered (the one-off entrance animation would otherwise replace it) */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    /* keep the (finished) entrance animation in the list so leaving the card does not replay it */
    html .khs [data-kh-reveal].is-armed.is-in.is-done > .about-surface:is(:hover, .is-hov) {
        animation: kh-enter 1s cubic-bezier(0.16, 1, 0.3, 1) backwards, about-border-spin 2.4s linear infinite !important;
    }
}

/* the heading changes with the tab: reserve the width of the longest title so the tabs never shift */
.kht__stack { display: inline-grid; }
.kht__stack > * { grid-area: 1 / 1; }
.kht__ghost { visibility: hidden; pointer-events: none; }
.kht__ghost::before { content: attr(data-t); }

/* slider button — dark mode: dark glass pill instead of the light one */
html.dark .kh-btn {
    background: rgba(14, 30, 52, 0.82);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 28px -12px rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ---- FAQ ---- */
.khf__wrap { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 32px; align-items: start; }
.khf__aside {
    position: sticky; top: calc(var(--katabam-header-h, 150px) + 16px);
    position: -webkit-sticky;
    overflow: hidden; isolation: isolate;
    padding: 30px 26px 26px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(110, 190, 69, 0.16) 0%, rgba(110, 190, 69, 0.03) 65%), var(--about-surface, #fff);
    box-shadow: inset 0 0 0 1px var(--about-surface-border, rgba(8, 24, 42, 0.1));
}
.khf__mark {
    position: absolute; z-index: -1; inset-block-start: -22px; inset-inline-end: 14px;
    font-size: 9rem; font-weight: 900; line-height: 1; color: rgba(110, 190, 69, 0.14); pointer-events: none;
}
.khf__aside .khs__title { margin-bottom: 12px; }
.khf__lead { margin: 0 0 24px; font-size: 0.86rem; line-height: 2; color: var(--about-muted, #5c5c5c); }
.khf__cta {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 20px; border-radius: 14px;
    background: var(--katabam-primary, #6ebe45); color: #fff !important; text-decoration: none;
    font-size: 0.88rem; font-weight: 800;
    box-shadow: 0 14px 28px -14px rgba(110, 190, 69, 0.95);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s;
}
.khf__cta { position: relative; overflow: hidden; isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(#fff, #000); }
.khf__cta::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translate3d(-120%, 0, 0);
    animation: khf-shine 4.5s ease-in-out infinite 1.2s;
}
@keyframes khf-shine { 0%, 62% { transform: translate3d(-120%, 0, 0); } 100% { transform: translate3d(120%, 0, 0); } }

.khf__ico { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.khf__ico::before, .khf__ico::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    opacity: 0; animation: khf-ring 2.6s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.khf__ico::after { animation-delay: 1.3s; }
@keyframes khf-ring { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.7); opacity: 0; } }

.khf__ico svg { width: 22px; height: 22px; overflow: visible; flex: none; }
.khf__ico .khf-bub { transform-box: fill-box; transform-origin: 20% 90%; animation: khf-bub 3.2s ease-in-out infinite; }
@keyframes khf-bub {
    0%, 100% { transform: translateY(0) rotate(0); }
    18% { transform: translateY(-1.2px) rotate(-4deg); }
    36% { transform: translateY(0) rotate(3deg); }
    54% { transform: translateY(0) rotate(0); }
}
.khf__ico .khf-dot { fill: currentColor; stroke: none; transform-box: fill-box; transform-origin: center; animation: khf-dot 1.5s ease-in-out infinite; }
.khf__ico .khf-dot:nth-of-type(2) { animation-delay: 0.18s; }
.khf__ico .khf-dot:nth-of-type(3) { animation-delay: 0.36s; }
@keyframes khf-dot {
    0%, 60%, 100% { transform: translateY(0) scale(1); opacity: 0.55; }
    30% { transform: translateY(-2.6px) scale(1.25); opacity: 1; }
}
.khf__ico .khf-badge { fill: #fff; stroke: none; transform-box: fill-box; transform-origin: center; animation: khf-badge 3.2s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
@keyframes khf-badge { 0%, 8% { transform: scale(0); } 20%, 88% { transform: scale(1); } 100% { transform: scale(0); } }
@media (hover: hover) and (pointer: fine) {
    .khf__cta:hover .khf-dot { animation-duration: 0.7s; }
    .khf__cta:hover .khf-bub { animation-duration: 1.4s; }
}
@media (prefers-reduced-motion: reduce) {
    .khf__cta::before, .khf__ico::before, .khf__ico::after, .khf__ico .khf-bub, .khf__ico .khf-dot, .khf__ico .khf-badge { animation: none; }
    .khf__ico .khf-dot { opacity: 1; }
}
@media (hover: hover) and (pointer: fine) { .khf__cta:hover { transform: translate3d(0, -2px, 0); filter: brightness(1.07); } }
.khf__list { display: grid; gap: 10px; counter-reset: khf; }
.khf__item {
    counter-increment: khf;
    border-radius: 18px;
    background: var(--about-surface, #fff);
    box-shadow: inset 0 0 0 1px var(--about-surface-border, rgba(8, 24, 42, 0.1));
    transition: box-shadow 0.4s ease;
}
.khf__item.is-open { box-shadow: inset 0 0 0 1.5px var(--katabam-primary, #6ebe45); }
.khf__h { margin: 0; font: inherit; }
.khf__q {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 18px 20px; border: 0; background: none; cursor: pointer; text-align: start;
    font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.8;
    color: var(--about-heading, #082442);
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.khf__q::before {
    content: counter(khf, persian);
    flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
    background: rgba(110, 190, 69, 0.14); color: #3f8f22; font-size: 0.8rem; font-weight: 800;
}
.khf__q > span { flex: 1; min-width: 0; }
.khf__q i {
    flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--about-surface-soft, #eef1f5); color: var(--about-heading, #082442);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, color 0.3s;
}
.khf__q i svg { width: 15px; height: 15px; }
.khf__item.is-open .khf__q i { transform: rotate(180deg); background: var(--katabam-primary, #6ebe45); color: #fff; }
/* smooth height: 0fr -> 1fr */
.khf__a {
    display: grid; grid-template-rows: 0fr; visibility: hidden;
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.5s;
}
.khf__item.is-open .khf__a { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.khf__ai { overflow: hidden; min-height: 0; opacity: 0; transition: opacity 0.35s ease; padding-inline: 20px 20px; padding-inline-start: 64px; }
.khf__item.is-open .khf__ai { opacity: 1; transition-delay: 0.1s; }
.khf__ai p { margin: 0 0 20px; color: var(--about-muted, #5c5c5c); font-size: 0.88rem; line-height: 2.05; }
html.dark .khf__q::before { color: #8fdc63; }
@media (prefers-reduced-motion: reduce) { .khf__a, .khf__ai, .khf__q i { transition: none; } }
@media (max-width: 900px) {
    .khf__wrap { grid-template-columns: 1fr; gap: 16px; }
    .khf__aside { position: static; padding: 22px 20px; }
    .khf__lead { margin-bottom: 16px; }
}
@media (max-width: 760px) {
    .khf__q { padding: 14px; font-size: 0.86rem; gap: 10px; }
    .khf__q::before { width: 26px; height: 26px; border-radius: 8px; font-size: 0.72rem; }
    .khf__ai { padding-inline-start: 14px; padding-inline-end: 14px; }
    .khf__ai p { font-size: 0.84rem; margin-bottom: 16px; }
}

.kh-perk__ico{width:54px;height:54px;border-radius:17px;background:linear-gradient(145deg,rgba(110,190,69,.2),rgba(110,190,69,.04));border:1px solid rgba(110,190,69,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 8px 20px -14px rgba(110,190,69,.6)}
.kh-perk__ico svg{width:29px;height:29px}
