.yh-posts {
    --yh-component-blue: #1768b0;
    --yh-component-deep: #0b4f88;
    --yh-component-ink: #172033;
    --yh-component-muted: #637083;
    --yh-component-line: #dfe5ec;
}

.yh-posts__grid {
    display: grid;
    grid-template-columns: repeat(var(--yh-post-columns, 2), minmax(0, 1fr));
    gap: 24px;
}

.yh-post-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--yh-component-line);
    border-radius: 6px;
    background: #fff;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.yh-post-card:hover {
    border-color: #c6d5e4;
    box-shadow: 0 14px 34px rgba(23, 32, 51, 0.09);
    transform: translateY(-2px);
}

.yh-post-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #edf3f8;
}

.yh-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

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

.yh-post-card__body {
    padding: 22px 24px 24px;
}

.yh-post-card__date {
    display: block;
    margin-bottom: 10px;
    color: var(--yh-component-muted);
    font-size: 13px;
}

.yh-post-card__title {
    margin: 0;
    color: var(--yh-component-ink);
    font-size: 20px;
    line-height: 1.45;
}

.yh-post-card__title a {
    color: inherit;
    text-decoration: none;
}

.yh-post-card__title a:hover {
    color: var(--yh-component-blue);
}

.yh-post-card__excerpt {
    margin: 12px 0 0;
    color: var(--yh-component-muted);
    font-size: 14px;
    line-height: 1.75;
}

.yh-post-card__more {
    display: inline-flex;
    margin-top: 16px;
    color: var(--yh-component-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.yh-posts--classic .yh-post-card {
    display: grid;
    grid-template-columns: minmax(180px, 34%) 1fr;
}

.yh-posts--classic .yh-post-card--no-media {
    grid-template-columns: 1fr;
}

.yh-posts--classic .yh-post-card__media {
    height: 100%;
    aspect-ratio: auto;
}

.yh-posts__pagination {
    margin-top: 32px;
}

.yh-posts__pagination ul {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.yh-posts__pagination a,
.yh-posts__pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    padding: 6px 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--yh-component-line);
    border-radius: 5px;
    color: var(--yh-component-deep);
    background: #fff;
    text-decoration: none;
}

.yh-posts__pagination .current,
.yh-posts__pagination a:hover {
    border-color: var(--yh-component-blue);
    color: #fff;
    background: var(--yh-component-blue);
}

.yh-posts__empty {
    margin: 0;
    padding: 22px;
    border: 1px solid var(--yh-component-line);
    border-radius: 6px;
    color: var(--yh-component-muted);
    background: #f7f9fb;
}

.yh-slides {
    position: relative;
    min-height: var(--yh-slide-height, 360px);
    overflow: hidden;
    color: #fff;
    background: #0b4f88;
}

.yh-slides__track,
.yh-slide {
    min-height: inherit;
}

.yh-slide {
    position: absolute;
    inset: 0;
    display: grid;
    min-height: var(--yh-slide-height, 360px);
    padding: 48px max(7vw, 32px);
    align-items: center;
    background: var(--yh-slide-color, #0b4f88);
    opacity: 0;
    pointer-events: none;
    transition: opacity 420ms ease;
}

.yh-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.yh-slide__image,
.yh-slide__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.yh-slide__image {
    object-fit: cover;
}

.yh-slide__overlay {
    background: linear-gradient(90deg, rgba(7, 36, 64, 0.76), rgba(7, 36, 64, 0.2));
}

.yh-slide__content {
    position: relative;
    z-index: 1;
    width: min(760px, 82%);
}

.yh-slide__title {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 5vw, 64px);
    font-weight: 650;
    line-height: 1.16;
}

.yh-slide__description {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.65;
}

.yh-slide__action {
    display: inline-flex;
    min-height: 44px;
    margin-top: 24px;
    padding: 9px 18px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.yh-slide__action:hover {
    color: #0b4f88;
    background: #fff;
}

.yh-slides__arrow {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #fff;
    background: rgba(11, 79, 136, 0.2);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.yh-slides__arrow:hover {
    background: rgba(11, 79, 136, 0.72);
}

.yh-slides__arrow--prev {
    left: 18px;
}

.yh-slides__arrow--next {
    right: 18px;
}

.yh-slides__dots {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 18px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.yh-slides__dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
}

.yh-slides__dots button[aria-current="true"] {
    background: #fff;
}

.yh-legacy-button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    border-left: 3px solid transparent;
    color: #174d7e;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    text-decoration: none;
}

.yh-legacy-button:hover,
.yh-legacy-button.is-active {
    border-left-color: #c98736;
    color: #fff;
    background: #1768b0;
}

@media (max-width: 767px) {
    .yh-posts__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .yh-posts--classic .yh-post-card {
        grid-template-columns: minmax(100px, 34%) 1fr;
    }

    .yh-post-card__body {
        padding: 16px;
    }

    .yh-post-card__title {
        font-size: 17px;
    }

    .yh-posts--classic .yh-post-card__excerpt {
        display: none;
    }

    .yh-slides,
    .yh-slides__track,
    .yh-slide {
        min-height: var(--yh-slide-height-mobile, 220px);
    }

    .yh-slide {
        padding: 30px 24px;
    }

    .yh-slide__content {
        width: 100%;
    }

    .yh-slide__title {
        font-size: 30px;
    }

    .yh-slide__description {
        font-size: 15px;
        line-height: 1.6;
    }

    .yh-slides__arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yh-slide,
    .yh-post-card,
    .yh-post-card__media img {
        transition: none;
    }
}
