/* Banner carousel: app/themes/proxymo/views/page/tez/widgets/_banners_carousel.html.erb */

.visually_hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Налезает на синий hero ~40px */
.banners_carousel_section {
    position: relative;
    z-index: 5;
    width: 100%;
    margin: 0 0 40px;
    padding: 0 30px;
    box-sizing: border-box;
    transition: margin-top 0.3s ease;
}

.banners_carousel_limit {
    position: relative;
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.banners_carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 20px 3px rgba(0, 0, 0, 0.2);
}

.banners_carousel_slide {
    height: auto;
}

.banners_carousel_item {
    position: relative;
    display: block;
    width: 100%;
    height: 400px;
    background-color: #d9dee5;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    text-decoration: none;
    color: #ffffff;
    box-sizing: border-box;
}

.banners_carousel_caption {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 80px;
    background: rgba(0, 0, 0, 0.30);
    color: #ffffff;
    text-align: center;
    box-sizing: border-box;
}

.banners_carousel_caption_title,
.banners_carousel_caption_text {
    width: 100%;
    max-width: 720px;
}

.banners_carousel_caption_title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.banners_carousel_caption_text {
    color: #ffffff;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    white-space: pre-line;
    overflow-wrap: break-word;
}

.banners_carousel_prev,
.banners_carousel_next {
    position: absolute;
    top: 50%;
    z-index: 20;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    padding: 0;
    border: 0;
    border-radius: 100%;
    background: #ffffff;
    color: var(--quaternary-color);
    cursor: pointer;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.banners_carousel_prev {
    left: -30px;
}

.banners_carousel_next {
    right: -30px;
}

.banners_carousel_prev::before,
.banners_carousel_next::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
}

.banners_carousel_prev::before {
    margin: -10px 0 0 -5px;
    border-left: 3px solid var(--quaternary-color);
    border-bottom: 3px solid var(--quaternary-color);
    transform: rotate(45deg);
}

.banners_carousel_next::before {
    margin: -10px 0 0 -17px;
    border-right: 3px solid var(--quaternary-color);
    border-bottom: 3px solid var(--quaternary-color);
    transform: rotate(-45deg);
}

.banners_carousel_prev:hover,
.banners_carousel_next:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

/* Точки-переключатели */
.banners_carousel_pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.banners_carousel_pagination .swiper-pagination-bullet {
    display: block;
    width: 10px;
    height: 10px;
    margin: 0 2px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 10px;
    background: transparent;
    opacity: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.banners_carousel_pagination .swiper-pagination-bullet-active,
.banners_carousel_pagination .swiper-pagination-bullet:hover {
    background: #ffffff;
}

@media (max-width: 991px) {
    .banners_carousel_section {
        margin-top: 0;
        padding: 0 10px;
    }

    .banners_carousel_item {
        height: 280px;
    }

    .banners_carousel_caption {
        padding: 16px 64px;
        gap: 8px;
    }

    .banners_carousel_caption_title {
        font-size: 24px;
    }

    .banners_carousel_caption_text {
        font-size: 16px;
    }

    .banners_carousel_prev,
    .banners_carousel_next {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }

    .banners_carousel_prev {
        left: 8px;
    }

    .banners_carousel_next {
        right: 8px;
    }

    .banners_carousel_prev::before,
    .banners_carousel_next::before {
        width: 14px;
        height: 14px;
    }

    .banners_carousel_prev::before {
        margin: -8px 0 0 -4px;
    }

    .banners_carousel_next::before {
        margin: -8px 0 0 -13px;
    }
}

@media (max-width: 768px) {
    .banners_carousel_section {
        margin-top: -40px;
        margin-bottom: 28px;
        padding: 0 10px;
    }

    .banners_carousel_item {
        height: 220px;
    }

    .banners_carousel_caption {
        padding: 12px 16px;
    }

    .banners_carousel_caption_title {
        font-size: 20px;
    }

    .banners_carousel_caption_text {
        font-size: 14px;
    }

    .banners_carousel_prev,
    .banners_carousel_next {
        display: none;
    }
}
