/* hero.css */
.swiper {
    width: 100%;
    height: 100%; /* or set a fixed height for hero */
    min-height: 400px; /* adjust per design */
    position: relative;
    overflow: hidden;
}

/* Make sure slides are visible */
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.service-hero {
    position: relative;
    color: #fff;
    padding: 100px 0;
    overflow: hidden; /* Changed from visible to hidden */
    background-color: #000; /* Fallback color */
}

.service-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.service-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(0,0,0,0.75);
    pointer-events: none;
}

.service-hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 48px;
    align-items: center;
    max-width: 1200px; /* Added max-width */
    margin: 0 auto; /* Center the container */
    padding: 0 20px; /* Added padding */
}

.service-hero__content {
    max-width: 720px;
}

.service-hero__title {
    font-weight: 700;
    line-height: 60px;
    margin: 0 0 20px;
    font-size: clamp(34px, 7.5vw, 56px);
    letter-spacing: -1px;
    text-transform: none;
}

.service-hero__subtitle {
    font-weight: 400;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 29px;
    opacity: 0.95;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.95);
}

.service-hero__cta {
    display: inline-block;
    background: #e02214;
    color: #fff;
    padding: 18px 36px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.service-hero__cta:hover {
    background: #cc1e11;
    color: #fff;
}

/* Carousel area - Fixed positioning and visibility */
.service-hero__carousel {
    position: relative; /* Added position */
    width: 100%; /* Added width */
    height: 100%; /* Added height */
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Swiper container - Essential fixes */
.hero-swiper {
    width: 100%;
    /*max-width: 420px;*/
    height: auto !important;
    min-height: 0;
    aspect-ratio: 4 / 3;
    position: relative; /* Added position */
    z-index: 2; /* Ensure above overlay */
}

/* Prevent FOUC: keep hero swiper hidden until JS marks it ready */
.hero-swiper.is-loading {
    visibility: hidden; /* preserve layout but hide until init */
}
.hero-swiper.is-ready {
    visibility: visible;
}

/* Ensure slides are visible */
.hero-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

.hero-swiper .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.hero-swiper .swiper-slide-active {
    opacity: 1;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    display: block;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    border: 8px solid rgba(255,255,255,0.1); /* Changed to white with opacity */
    object-fit: cover;
    border-radius: 4px; /* Added subtle radius */
}

/* Pagination improvements */
.hero-swiper .swiper-pagination {
    position: relative; /* Change from absolute */
    bottom: 50px !important;
    width: 100%;
    text-align: center;
    margin-top: 18px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: rgba(255,255,255,0.55);
    opacity: 1;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
}

/* Mobile optimizations */
@media (max-width: 900px) {
    .service-hero {
        padding: 40px 0;
    }

    .service-hero__inner {
        display: flex;
        gap: 32px;
        text-align: center;
        flex-direction: column;
    }

    .service-hero__carousel {
        order: 2;
        justify-content: center;
        margin-top: 20px;
    }

    .service-hero__content {
        order: 1;
    }

    .hero-swiper {
        max-width: 320px; /* Slightly smaller on mobile */
    }

    .hero-slide-img {
        /* keep auto sizing via container on mobile */
    }
}

/* Additional responsive breakpoint for very small screens */
@media (max-width: 480px) {
    .service-hero {
        padding: 32px 0;
    }

    .service-hero__title {
        font-size: clamp(28px, 6vw, 34px);
        line-height: 36px;
    }

    .hero-slide-img {
        /* keep auto sizing via container on very small screens */
    }
}
