.yfrp-section {
    width: 100%;
    margin-top: -36px;
    padding: 0 0 84px;
    background: #fff;
    color: #111;
    font-family: Arial, "Helvetica Neue", sans-serif;
}

.yfrp-container {
    width: min(1086px, calc(100% - 30px));
    margin: 0 auto;
    padding-top: 46px;
    border-top: 1px solid #e5e5e5;
}

.yfrp-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.yfrp-heading h2 {
    margin: 0;
    color: #0d4c7c;
    font-family: "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.yfrp-accent {
    width: 54px;
    height: 3px;
    display: block;
    margin-top: 13px;
    background: #efb000;
}

.yfrp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 3px;
    color: #0d4c7c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.yfrp-view-all:hover,
.yfrp-view-all:focus-visible {
    color: #efb000;
}

.yfrp-actions,
.yfrp-controls {
    display: flex;
    align-items: center;
}

.yfrp-actions {
    gap: 16px;
}

.yfrp-controls {
    display: none;
    gap: 8px;
}

.yfrp-section.has-overflow .yfrp-controls {
    display: flex;
}

.yfrp-control {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d5dce2;
    border-radius: 50%;
    background: #fff;
    color: #0d4c7c;
    cursor: pointer;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.yfrp-control:hover,
.yfrp-control:focus-visible {
    border-color: #0d4c7c;
    background: #0d4c7c;
    color: #fff;
    outline: none;
}

.yfrp-control:focus-visible {
    box-shadow: 0 0 0 3px rgba(239, 176, 0, 0.28);
}

.yfrp-carousel {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.yfrp-carousel::-webkit-scrollbar {
    display: none;
}

.yfrp-carousel.is-enhanced {
    overflow: hidden;
    scroll-snap-type: none;
    touch-action: pan-y;
}

.yfrp-grid {
    --yfrp-visible: 4;
    display: flex;
    gap: 22px;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.yfrp-card {
    flex: 0 0 calc((100% - 66px) / 4);
    min-width: 0;
    background: #fff;
    scroll-snap-align: start;
}

.yfrp-card__link {
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #111;
    text-decoration: none;
}

.yfrp-card__image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.yfrp-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.yfrp-section--projects .yfrp-card__image img {
    object-fit: cover;
}

.yfrp-card__placeholder {
    width: 42px;
    height: 34px;
    border: 2px solid #d9d9d9;
    border-radius: 3px;
}

.yfrp-card__title {
    min-height: 48px;
    display: -webkit-box;
    margin-top: 16px;
    overflow: hidden;
    color: #222;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.yfrp-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: #0d4c7c;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
}

.yfrp-card__link:hover .yfrp-card__image,
.yfrp-card__link:focus-visible .yfrp-card__image {
    border-color: #efb000;
    box-shadow: 0 8px 24px rgba(13, 76, 124, 0.1);
}

.yfrp-card__link:hover .yfrp-card__image img,
.yfrp-card__link:focus-visible .yfrp-card__image img {
    transform: scale(1.025);
}

.yfrp-card__link:hover .yfrp-card__cta,
.yfrp-card__link:focus-visible .yfrp-card__cta {
    color: #efb000;
}

@media (max-width: 991px) {
    .yfrp-section {
        margin-top: -20px;
        padding-bottom: 64px;
    }

    .yfrp-container {
        width: calc(100% - 24px);
        padding-top: 38px;
    }

    .yfrp-grid {
        --yfrp-visible: 2;
        gap: 18px;
    }

    .yfrp-card {
        flex-basis: calc((100% - 18px) / 2);
    }
}

@media (max-width: 575px) {
    .yfrp-heading {
        align-items: flex-start;
        margin-bottom: 28px;
    }

    .yfrp-heading h2 {
        font-size: 25px;
    }

    .yfrp-view-all {
        max-width: 110px;
        justify-content: flex-end;
        text-align: right;
    }

    .yfrp-actions {
        align-items: flex-end;
        flex-direction: column;
        gap: 10px;
    }

    .yfrp-grid {
        gap: 12px;
    }

    .yfrp-card {
        flex-basis: calc((100% - 12px) / 2);
    }

    .yfrp-card__title {
        min-height: 42px;
        margin-top: 12px;
        font-size: 14px;
        line-height: 21px;
    }

    .yfrp-card__cta {
        margin-top: 9px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yfrp-grid,
    .yfrp-card__image,
    .yfrp-card__image img {
        transition: none;
    }
}
