/* Карусель полезных ресурсов. Только свои классы, без влияния на остальные модули. */

.rdku-links-carousel {
    --rdku-links-gap: 18px;
    width: 100%;
    padding: 44px clamp(16px, 4vw, 64px) 56px;
    color: #20242b;
}

.rdku-links-carousel *,
.rdku-links-carousel *::before,
.rdku-links-carousel *::after {
    box-sizing: border-box;
}

.rdku-links-carousel__inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.rdku-links-carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 23px;
}

.rdku-links-carousel__title {
    margin: 0;
    color: #111111;
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-size: clamp(26px, 2.4vw, 34px);
    font-weight: 600;
    line-height: 1.2;
}

.rdku-links-carousel__arrows {
    display: flex;
    gap: 10px;
    flex: none;
}

.rdku-links-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    padding: 0;
    border: 1px solid #185bb3;
    border-radius: 50%;
    background: #ffffff;
    color: #185bb3;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.rdku-links-carousel__arrow:hover:not(:disabled),
.rdku-links-carousel__arrow:focus-visible {
    background: #185bb3;
    color: #ffffff;
}

.rdku-links-carousel__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.rdku-links-carousel__track {
    display: flex;
    gap: var(--rdku-links-gap);
    width: 100%;
    padding: 2px 1px 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.rdku-links-carousel__track::-webkit-scrollbar {
    display: none;
}

.rdku-links-carousel__card {
    display: flex;
    flex: 0 0 calc((100% - 4 * var(--rdku-links-gap)) / 5);
    flex-direction: column;
    min-width: 0;
    padding: 0 0 14px;
    overflow: hidden;
    border: 1px solid #e9edf3;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);
    scroll-snap-align: start;
}

.rdku-links-carousel__card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    color: #20242b;
    text-decoration: none;
}

.rdku-links-carousel__card-link:hover,
.rdku-links-carousel__card-link:focus-visible {
    color: #185bb3;
    text-decoration: none;
}

.rdku-links-carousel__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    background: #f7f9fc;
}

.rdku-links-carousel__image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rdku-links-carousel__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: #8da9c8;
}

.rdku-links-carousel__image-placeholder svg {
    width: 100%;
    height: 100%;
}

.rdku-links-carousel__name {
    display: block;
    padding: 14px 14px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.rdku-links-carousel__domain {
    display: block;
    padding: 8px 14px 4px;
    color: #66788c;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.rdku-links-carousel__socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 10px 14px 0;
}

.rdku-links-carousel__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 33px;
    height: 29px;
    padding: 0 6px;
    border-radius: 6px;
    background: #e8f0fb;
    color: #185bb3;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.rdku-links-carousel__social-link:hover,
.rdku-links-carousel__social-link:focus-visible {
    background: #185bb3;
    color: #ffffff;
}

.rdku-links-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
}

.rdku-links-carousel__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #b8c4d2;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.rdku-links-carousel__dot.is-active {
    background: #185bb3;
    transform: scale(1.3);
}

.rdku-links-carousel__arrows[hidden],
.rdku-links-carousel__dots[hidden] {
    display: none;
}

@media (max-width: 1200px) {
    .rdku-links-carousel__card {
        flex-basis: calc((100% - 3 * var(--rdku-links-gap)) / 4);
    }
}

@media (max-width: 980px) {
    .rdku-links-carousel__card {
        flex-basis: calc((100% - 2 * var(--rdku-links-gap)) / 3);
    }
}

@media (max-width: 700px) {
    .rdku-links-carousel {
        padding: 30px 16px 40px;
    }

    .rdku-links-carousel__card {
        flex-basis: calc((100% - var(--rdku-links-gap)) / 2);
    }
}

@media (max-width: 460px) {
    .rdku-links-carousel__card {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rdku-links-carousel__track {
        scroll-behavior: auto;
    }

    .rdku-links-carousel__card,
    .rdku-links-carousel__arrow,
    .rdku-links-carousel__dot {
        transition: none;
    }
}
