﻿/* ==== Hero slider fixed ratios (Desktop 2:1, Mobile 4:5) ==== */
:root {
    --hero-desktop-ratio: calc(2 / 1); /* 1920x960 */
    --hero-mobile-ratio: calc(4 / 5); /* 1080x1350 */
    --hero-radius: var(--sa-radius);
}

/* Wrapper controls final height */
.home-hero-wrapper {
    width: 100%;
    aspect-ratio: var(--hero-desktop-ratio);
    max-height: 600px;
    overflow: hidden;
    border-radius: var(--hero-radius);
}

/* Mobile ratio */
@media (max-width: 991px) {
    .home-hero-wrapper {
        aspect-ratio: var(--hero-mobile-ratio);
        max-height: none;
    }
}

/* Swiper fills wrapper */
.home-hero-wrapper .swiper,
.home-hero-wrapper .swiper-wrapper,
.home-hero-wrapper .swiper-slide {
    width: 100%;
    height: 100%;
}

/* Slide box should fill */
.hero-slide-box {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: inherit;
}

    /* Images fill */
    .hero-slide-box picture,
    .hero-slide-box img {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* Fit + center */
    .hero-slide-box img {
        object-fit: cover;
        object-position: center;
    }

/* Ensure no padding/margin */
.homeSlider .swiper-slide,
.homeSlider .hero-slide-box,
.homeSlider picture,
.homeSlider img {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Swiper fade mode fix */
.homeSlider.swiper-fade .swiper-slide {
    display: block !important;
    position: relative;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.5s ease !important;
}

.homeSlider.swiper-fade .swiper-slide-active {
    opacity: 1 !important;
    z-index: 1;
    pointer-events: auto;
}

/* Optional: keep old row stretch */
.home-top-row {
    display: flex;
    align-items: stretch;
}

/* Tablet: reduce height between 600px and 991px */
@media (max-width: 991px) and (min-width: 600px) {
    .home-hero-wrapper {
        aspect-ratio: 16 / 9; /* or 3/2 if you want taller */
        max-height: 480px; /* optional: keep it under control */
    }
}

/* Mobile: keep 4:5 only under 600px */
@media (max-width: 599.98px) {
    .home-hero-wrapper {
        aspect-ratio: var(--hero-mobile-ratio); /* 4:5 */
        max-height: none;
    }
}