﻿/* ==========================================================
   BM Slider
   ========================================================== */

.bm-slider {
    position: relative;
    --section-margin: 0;
    --section-radius: 10px;
    width: calc(100% - (var(--section-margin) * 2));
    height: min(570px, 70vh);
    margin-inline: var(--section-margin);
    overflow: hidden;
    border-radius: var(--section-radius);
}


/* ==========================================================
   Slides wrapper
   ========================================================== */

.bm-slider__slides {
    position: relative;
    width: 100%;
    height: 100%;
}


/* ==========================================================
   Individual slide
   ========================================================== */

.bm-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 700ms ease, visibility 700ms ease;
}


    .bm-slide.active {
        opacity: 1;
        visibility: visible;
        z-index: 1;
    }


/* ==========================================================
   Background image
   ========================================================== */

.bm-slide__background {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


    .bm-slide__background img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


/* ==========================================================
   Overlay
   ========================================================== */

.bm-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}


/* ==========================================================
   Content container
   ========================================================== */

.bm-slide__container {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 100px));
    margin: 0 auto;
    display: flex;
    align-items: center;
}


/* ==========================================================
   Foreground image
   ========================================================== */

.bm-slide__image {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-right: 40px;
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 700ms ease, transform 700ms ease;
}


.bm-slide.active .bm-slide__image {
    opacity: 1;
    transform: translateX(0);
}


.bm-slide__image img {
    display: block;
    width: 100%;
    max-width: 248px;
    max-height: 277px;
    height: auto;
    object-fit: contain;
}


/* ==========================================================
   Content
   ========================================================== */

.bm-slide__content {
    flex: 2;
    min-width: 0;
    color: #fff;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 700ms ease, transform 700ms ease;
}


.bm-slide.active .bm-slide__content {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================
   Subtitle
   ========================================================== */

.bm-slide__subtitle {
    margin: 0 0 8px;
    font-family: "montserrat", sans-serif;
    font-size: 15px;
    line-height: 26px;
    font-weight: 600;
    color: #fff;
}


/* ==========================================================
   Title
   ========================================================== */

.bm-slide__title {
    margin: 0 0 24px;
    font-family: "montserrat", sans-serif;
    font-size: 35px;
    line-height: 40px;
    font-weight: 600;
    color: #fff;
}


/* ==========================================================
   Text
   ========================================================== */

.bm-slide__text {
    max-width: 550px;
    margin: 0 0 32px;
    font-family: "montserrat", sans-serif;
    font-size: 20px;
    line-height: 30px;
    font-weight: 400;
    color: #fff;
}


    .bm-slide__text p:first-child {
        margin-top: 0;
    }


    .bm-slide__text p:last-child {
        margin-bottom: 0;
    }


/* ==========================================================
   Button
   ========================================================== */

.bm-slide__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #fff;
    border-radius: 8px;
    font-size: 15px;
    line-height: 26px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}


    .bm-slide__button:hover {
        background: #111;
        color: #fff;
        transform: translateY(-2px);
    }


/* ==========================================================
   Navigation arrows
   ========================================================== */

.bm-slider__arrow {
    position: absolute;
    z-index: 10;
    top: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease;
}


    .bm-slider__arrow:hover {
        background: #fff;
        color: #111;
        border-color: #fff;
    }


    .bm-slider__arrow:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }


.bm-slider__arrow--prev {
    left: 24px;
}


.bm-slider__arrow--next {
    right: 24px;
}


.bm-slider__arrow svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================
   Pagination
   ========================================================== */

.bm-slider__pagination {
    position: absolute;
    z-index: 10;
    bottom: 30px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}


.bm-slider__dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}


    .bm-slider__dot:hover {
        background: rgba(255, 255, 255, 0.7);
    }


    .bm-slider__dot.active {
        background: #fff;
        border-color: #fff;
    }


    .bm-slider__dot:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }


/* ==========================================================
   Scroll down arrow
   ========================================================== */

.bm-slider__scroll {
    position: absolute;
    z-index: 10;
    left: max( 30px, calc((100% - 1200px) / 2) );
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


    .bm-slider__scroll img {
        display: block;
        max-width: 100%;
        height: auto;
    }


/* ==========================================================
   Tablet
   ========================================================== */

@media (max-width: 900px) {

    .bm-slide__container {
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        width: min( 700px, calc(100% - 80px) );
    }


    .bm-slide__image,
    .bm-slide__content {
        flex: none;
        width: 100%;
        margin-right: 0;
    }


    .bm-slide__image {
        justify-content: center;
    }


        .bm-slide__image img {
            max-width: 300px;
            max-height: 260px;
        }


    .bm-slide__content {
        text-align: center;
    }


    .bm-slide__text {
        margin-left: auto;
        margin-right: auto;
    }


    .bm-slider__arrow {
        width: 44px;
        height: 44px;
    }


    .bm-slider__arrow--prev {
        left: 16px;
    }


    .bm-slider__arrow--next {
        right: 16px;
    }
}


/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 600px) {

    .bm-slider {
        height: auto;
        min-height: 680px;
    }


    .bm-slider__slides {
        min-height: 680px;
    }


    .bm-slide {
        min-height: 680px;
    }


    .bm-slide__container {
        width: calc(100% - 48px);
        padding-top: 50px;
        padding-bottom: 80px;
        gap: 30px;
    }


    .bm-slide__image img {
        max-width: 240px;
        max-height: 240px;
    }


    .bm-slider__arrow {
        width: 38px;
        height: 38px;
    }


        .bm-slider__arrow svg {
            width: 20px;
            height: 20px;
        }


    .bm-slider__arrow--prev {
        left: 8px;
    }


    .bm-slider__arrow--next {
        right: 8px;
    }


    .bm-slider__pagination {
        bottom: 24px;
    }


    .bm-slider__scroll {
        left: 24px;
        top: 0;
    }
}


/* ==========================================================
   Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .bm-slide,
    .bm-slide__image,
    .bm-slide__content,
    .bm-slide__button,
    .bm-slider__arrow,
    .bm-slider__dot {
        transition: none;
    }
}
