/* Editorial category index for the modern landing-page block. */
.yh-categories {
    --yc-ink: var(--brand-secondary, #193e32);
    --yc-accent: var(--brand-primary, #a27c34);
    --yc-muted: color-mix(in srgb, var(--yc-ink) 58%, white);
    --yc-rule: color-mix(in srgb, var(--yc-ink) 13%, transparent);
    position: relative;
    isolation: isolate;
    padding: clamp(62px, 6vw, 92px) 0;
    overflow: hidden;
    color: var(--yc-ink);
    background-color: color-mix(in srgb, var(--brand-surface, #f4f0e8) 45%, white);
}

.yh-categories::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block-start: -175px;
    inset-inline-end: -165px;
    width: 410px;
    height: 410px;
    border: 1px solid color-mix(in srgb, var(--yc-accent) 14%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 0 40px color-mix(in srgb, var(--yc-accent) 2%, transparent),
                0 0 0 80px color-mix(in srgb, var(--yc-accent) 2%, transparent);
    pointer-events: none;
}

.yh-categories__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--yc-rule);
}

.yh-categories__heading {
    max-width: 760px;
}

.yh-categories__head h2 {
    position: relative;
    margin: 0;
    padding-inline-start: 19px;
    color: var(--yc-ink);
    font-size: clamp(2rem, 3.7vw, 3.35rem);
    font-weight: 800;
    line-height: 1.25;
}

.yh-categories__head h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 11% 11%;
    width: 3px;
    background: var(--yc-accent);
}

.yh-categories__head p {
    max-width: 66ch;
    margin: 9px 0 0;
    color: var(--yc-muted);
    font-size: 14px;
    line-height: 1.8;
}

.yh-categories__all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding: 9px 0;
    color: var(--yc-ink);
    border-bottom: 1px solid var(--yc-accent);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.yh-categories__all:hover,
.yh-categories__all:focus-visible {
    color: var(--yc-accent);
}

.yh-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 1.2vw, 18px);
}

.yh-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 245px;
    padding: clamp(20px, 2vw, 27px);
    overflow: hidden;
    color: var(--yc-ink);
    background: color-mix(in srgb, white 92%, var(--brand-surface, #f4f0e8));
    border: 1px solid var(--yc-rule);
    border-top: 2px solid color-mix(in srgb, var(--yc-accent) 45%, transparent);
    border-radius: 3px 20px 3px 3px;
    text-decoration: none;
    transition: border-color .22s ease, background-color .22s ease, transform .22s ease;
}

[dir="ltr"] .yh-category-card {
    border-radius: 20px 3px 3px 3px;
}

.yh-category-card:first-child {
    background: color-mix(in srgb, var(--brand-surface, #f4f0e8) 63%, white);
    border-top-color: var(--yc-accent);
}

.yh-category-card::before {
    content: "";
    position: absolute;
    inset-block-start: -53px;
    inset-inline-end: -54px;
    width: 126px;
    height: 126px;
    border: 1px solid color-mix(in srgb, var(--yc-accent) 11%, transparent);
    border-radius: 50%;
    pointer-events: none;
}

.yh-category-card:hover,
.yh-category-card:focus-visible {
    color: var(--yc-ink);
    background: #fff;
    border-color: color-mix(in srgb, var(--yc-accent) 48%, transparent);
    transform: translateY(-4px);
}

.yh-category-card:focus-visible,
.yh-categories__all:focus-visible {
    outline: 2px solid var(--yc-accent);
    outline-offset: 3px;
}

.yh-category-card__number {
    position: absolute;
    inset-block-start: 24px;
    inset-inline-end: 24px;
    color: color-mix(in srgb, var(--yc-ink) 45%, white);
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.yh-category-card__media {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    overflow: hidden;
    color: var(--yc-accent);
    background: color-mix(in srgb, var(--yc-accent) 8%, white);
    border: 1px solid color-mix(in srgb, var(--yc-accent) 13%, transparent);
    border-radius: 15px;
    font-size: 23px;
}

.yh-category-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yh-category-card__copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.yh-category-card__copy strong {
    color: var(--yc-ink);
    font-size: clamp(16px, 1.3vw, 19px);
    font-weight: 800;
    line-height: 1.4;
}

.yh-category-card__copy > span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--yc-muted);
    font-size: 12px;
    line-height: 1.75;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.yh-category-card__arrow {
    display: grid;
    place-items: center;
    align-self: flex-end;
    width: 31px;
    height: 31px;
    margin-top: auto;
    color: var(--yc-accent);
    border: 1px solid color-mix(in srgb, var(--yc-accent) 28%, transparent);
    border-radius: 50%;
    font-size: 12px;
    transition: color .22s ease, background-color .22s ease;
}

.yh-category-card:hover .yh-category-card__arrow,
.yh-category-card:focus-visible .yh-category-card__arrow {
    color: #fff;
    background: var(--yc-accent);
}

@media (max-width: 991.98px) {
    .yh-categories__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .yh-categories {
        padding: 48px 0;
    }

    .yh-categories__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .yh-categories__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .yh-category-card {
        min-height: 190px;
    }

    .yh-category-card__media {
        margin-bottom: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yh-category-card,
    .yh-category-card__arrow {
        transition: none;
    }
}
