/* Homepage hero background slider */

:root {
    --iasc-header-height: 96px;
}

/* Reset legacy theme spacing that pushes the hero down on the homepage */
.home #masthead.site-header--centered {
    display: block;
    flex-wrap: nowrap;
    row-gap: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.home #content.site-content,
.home #primary.content-area,
.home #main.site-main,
.home .elementor-5 {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.elementor-element-48be96e {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    margin-top: 0 !important;
    min-height: calc(100vh - var(--iasc-header-height));
}

@media (min-width: 768px) {
    .elementor-element-48be96e.elementor-section-height-full {
        height: auto !important;
        min-height: calc(100vh - var(--iasc-header-height));
    }

    .elementor-element-48be96e.elementor-section-height-full > .elementor-container {
        height: auto !important;
        min-height: calc(100vh - var(--iasc-header-height));
    }
}

.elementor-element-48be96e > .elementor-container {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - var(--iasc-header-height));
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.elementor-element-48be96e.elementor-section-items-middle > .elementor-container {
    align-items: center !important;
    align-content: center !important;
}

.elementor-element-48be96e .elementor-column {
    width: 100% !important;
    min-height: calc(100vh - var(--iasc-header-height));
}

.elementor-element-48be96e .elementor-widget-wrap {
    width: 100%;
    min-height: calc(100vh - var(--iasc-header-height));
}

.elementor-element-48be96e .elementor-column,
.elementor-element-48be96e .elementor-element-populated,
.elementor-element-48be96e .elementor-widget-wrap,
.elementor-element-48be96e .elementor-widget-container,
.elementor-element-48be96e .elementor-widget {
    position: static !important;
}

/* Slider injected as a direct child of the hero section */
.elementor-element-48be96e > .iasc-home-hero {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

/* Fallback when slider markup is still inside the widget */
.elementor-element-48be96e .elementor-widget-container > .iasc-home-hero {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    z-index: 0;
    overflow: hidden;
}

.iasc-home-hero__slides {
    position: absolute;
    inset: 0;
}

.iasc-home-hero__slide {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.2s ease, transform 8s ease;
}

.iasc-home-hero__slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.iasc-home-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(16, 20, 21, 0.55) 0%,
        rgba(16, 20, 21, 0.72) 55%,
        rgba(16, 20, 21, 0.82) 100%
    );
}

.iasc-home-hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: min(760px, calc(100% - 3rem));
    max-width: 760px;
    padding: 2rem 1.5rem;
    margin: 0;
}

.iasc-home-hero__content h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
}

.iasc-home-hero__content p {
    margin-bottom: 0;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 767px) {
    :root {
        --iasc-header-height: 76px;
    }

    .iasc-home-hero__content {
        padding: 1.5rem 1.15rem;
    }
}
