@import "fonts.css";

/* ===== Shared home banners (home, blog, etc.) ===== */

.home-banners {
    width: 100%;
    padding: var(--navbar-height) 0 0;
    margin: 0;
    position: relative;
    font-family: var(--km-font-primary);
}

.home-banners__slider {
    width: 100%;
    max-width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.home-banners__slider .swiper-wrapper {
    width: 100%;
}

.home-banners__slider .swiper-slide {
    width: 100% !important;
    margin: 0 !important;
    height: auto;
}

.home-banners__slide {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 0;
    width: 100%;
    line-height: 0;
}

.home-banners__link {
    position: relative;
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

a.home-banners__link:hover {
    color: inherit;
    text-decoration: none;
}

a.home-banners__link:focus-visible {
    outline: 3px solid var(--km-gold-primary);
    outline-offset: -3px;
}

.home-banners__slide picture {
    display: block;
    width: 100%;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.home-banners__img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

/* Button over the banner art */
.home-banners__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.home-banners__btn {
    position: absolute;
    top: 31%;
    right: 50%;
    transform: translate(50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    height: 31px;
    padding: 0 1rem;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

@media (min-width: 992px) {
    .home-banners__btn {
        top: 66.5%;
        right: 6.35%;
        transform: translateY(-50%);
        min-width: clamp(160px, 13.9vw, 267px);
        height: clamp(40px, 3.4vw, 65px);
        font-size: clamp(1rem, 1.5vw, 29px);
    }
}

/* Pagination dots (RTL: the first dot is on the right) */
.home-banners__pagination.swiper-pagination {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    line-height: normal;
    pointer-events: none;
}

.home-banners__pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 5px !important;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    pointer-events: auto;
    transition: background-color 0.2s ease;
}

.home-banners__pagination .swiper-pagination-bullet-active {
    background: #fff;
}

@media (min-width: 992px) {
    .home-banners__pagination.swiper-pagination {
        bottom: 4.3vw !important;
    }

    .home-banners__pagination .swiper-pagination-bullet {
        width: clamp(8px, 0.6vw, 14px);
        height: clamp(8px, 0.6vw, 14px);
        margin: 0 0.61vw !important;
    }
}

/* Social rail */
.home-banners__social {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0 12px 12px 0;
    padding: 12px 8px;
    backdrop-filter: blur(6px);
}

.home-banners__social-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.home-banners__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 16px;
    transition: color 0.2s, transform 0.2s;
    text-decoration: none;
}

.home-banners__social-link:hover {
    color: #f0c040;
    transform: scale(1.2);
}

@media (max-width: 991.98px) {
    .home-banners__social {
        display: none;
    }
}

/* ===== Default banners (local assets when no CMS banners) ===== */

.home-banners__slide--default {
    background: linear-gradient(100deg, #ebe6e0 0%, #d8d3cc 42%, #a09b94 78%, #6e6a64 100%);
    min-height: clamp(260px, 47vw, 904px);
    display: flex;
    align-items: center;
}

.home-banners__slide--default .home-banners__link {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: inherit;
}

.home-banners__slide--default picture {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(42%, 520px);
    filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.22));
}

.home-banners__slide--default .home-banners__img {
    max-height: 70%;
    object-fit: contain;
    mix-blend-mode: lighten;
}

@media (max-width: 991.98px) {
    .home-banners__slide--default {
        background: linear-gradient(165deg, #6e6a64 0%, #a09b94 32%, #d8d3cc 68%, #ebe6e0 100%);
        min-height: 0;
        padding: 6rem 1.75rem 2.75rem;
    }

    .home-banners__slide--default picture {
        width: min(72%, 300px);
    }

    .home-banners__slide--default .home-banners__img {
        max-height: 240px;
    }
}

@media (min-width: 992px) {
    .home-banners__social {
        left: 2.5vw;
        gap: 1.67vw;
        padding: 0;
        border-radius: 0;
        background: none;
        backdrop-filter: none;
    }

    .home-banners__social-link {
        width: clamp(36px, 3vw, 58px);
        height: clamp(36px, 3vw, 58px);
    }

    .home-banners__social-link img {
        width: 100%;
        height: 100%;
    }
}
