/* Reset body and container margins and padding */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

/* Hero Section */
.hero {
    width: 100vw;
    height: 80vh;
    /* Fixed height for desktop */
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

/* Slides Container */
.slides {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Carousel Slide */
.slide {
    width: 100%;
    height: 80vh;
    /* Match the height of the .hero section */
    background-size: auto;
    /* Prevent resizing of the image */
    background-position: center;
    /* Center the image */
    background-repeat: no-repeat;
    /* No image repetition */
    background-color: #fff;
    /* White background for unused space */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Mobile Styles */
@media (max-width: 600px) {
    .slide {
        height: auto;
        aspect-ratio: var(--carousel-image-ratio);
        background-size: cover;
        background-position: center;
    }
}

/* Overlay Container */
.overlay-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #FFCD46;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
}

/* Overlay Content */
.overlay-content {
    flex: 1;
    text-align: center;
}

.overlay-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--site-primary, #002E7A);
    margin: 0;
    line-height: 1.3;
}

/* Call-to-Action Button */
.cta-button {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 12px 24px;
    background-color: var(--site-accent, #DD5144);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-left: 20px;
    text-transform: uppercase;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #ff5722;
}

/* Mobile Styles */
@media (max-width: 768px) {

    /* Hero Section */
    .hero {
        height: auto;
    }

    /* Slides */
    .slides {
        height: auto;
    }

    /* Each Slide */
    .slide {
        display: none;
        position: relative;
        height: auto;
        aspect-ratio: var(--carousel-image-ratio);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    .slide.active {
        display: block;
        opacity: 1;
        position: static;
    }

    /* Overlay Container for Mobile */
    .overlay-container {
        position: relative;
        margin-top: 0;
        padding: 15px 20px;
        background-color: #FFCD46;
        text-align: center;
        box-shadow: none;
    }

    /* CTA Button in Mobile */
    .cta-button {
        display: inline-block;
        margin-top: 15px;
        padding: 10px 20px;
        font-size: 1rem;
        background-color: #ff5722;
        color: white;
        border-radius: 8px;
        text-transform: uppercase;
        text-decoration: none;
        width: 150px;
        min-width: 150px;
    }

    .hero .overlay-container .cta-button {
        display: inline-flex;
        width: auto;
        min-width: 0;
        max-width: 100%;
        margin: 0;
        align-items: center;
        justify-content: center;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
    }

    /* Adjust font size in Mobile for h2 in overlay-content */
    .overlay-content h2 {
        font-size: 1.1rem;
    }

    /* Hide Carousel Indicators on Mobile */
    .carousel-indicators {
        display: none;
    }
}

/* General styling for .spacer-overlay */
.spacer-overlay {
    width: 100%;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    background-color: #FFCD46;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
    position: relative;
}

@media (max-width: 768px) {
    .spacer-overlay {
        flex-direction: column;
        text-align: center;
    }

    .spacer-overlay .cta-button {
        margin-top: 15px;
    }
}