.apafiq-hero-slider {
    position: relative;
    overflow: hidden;

    /* Sale del ancho contenido de Elementor y ocupa todo el viewport. */
    width: 100vw;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    min-height: var(--apafiq-hero-height, 600px);
    border-radius: 0;
    background: #043d4a;
    isolation: isolate;
}

.apafiq-hero-slider,
.apafiq-hero-slider * {
    box-sizing: border-box;
}

.apafiq-hero-slider__track {
    position: relative;
    min-height: var(--apafiq-hero-height, 600px);
}

.apafiq-hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    min-height: var(--apafiq-hero-height, 600px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 650ms ease, visibility 650ms ease;
}

.apafiq-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.apafiq-hero-slide__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;

    /* Sin efecto de zoom: mantiene la imagen en su escala natural de cover. */
    transform: none;
}

.apafiq-hero-slide.is-active .apafiq-hero-slide__bg {
    transform: none;
}

.apafiq-hero-slide__bg--empty {
    background: linear-gradient(135deg, #033d4a 0%, #28c59d 55%, #a96bc3 100%);
}

.apafiq-hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(0, 52, 64, 0.92) 0%, rgba(0, 52, 64, 0.75) 38%, rgba(0, 52, 64, 0.24) 70%, rgba(0, 52, 64, 0.08) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.04));
}

.apafiq-hero-slide__content {
    position: relative;
    z-index: 2;
    width: min(700px, calc(100% - 140px));
    max-width: 700px;
    margin-left: clamp(72px, 9vw, 170px);
    margin-right: 70px;
    padding: 48px 0 86px;
    color: #fff;
}

.apafiq-hero-slide__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(48, 196, 158, 0.94);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apafiq-hero-slide__title {
    max-width: 700px;
    margin: 0 0 16px;
    color: #fff;
    font-family: inherit;
    font-size: clamp(31px, 3.15vw, 52px);
    font-weight: 800;
    line-height: 1.07;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.apafiq-hero-slide__excerpt {
    max-width: 610px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(15px, 1.25vw, 19px);
    line-height: 1.5;
}

.apafiq-hero-slide__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 13px 23px;
    border-radius: 999px;
    background: #b56bc7;
    color: #fff !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.apafiq-hero-slide__button:hover,
.apafiq-hero-slide__button:focus {
    transform: translateY(-2px);
    background: #31c49e;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.apafiq-hero-slider__arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #073f4b;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 180ms ease, transform 180ms ease;
}

.apafiq-hero-slider__arrow:hover,
.apafiq-hero-slider__arrow:focus {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}

.apafiq-hero-slider__arrow--prev {
    left: clamp(14px, 2vw, 34px);
}

.apafiq-hero-slider__arrow--next {
    right: clamp(14px, 2vw, 34px);
}

.apafiq-hero-slider__dots {
    position: absolute;
    left: clamp(72px, 9vw, 170px);
    bottom: 28px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.apafiq-hero-slider__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 180ms ease, background 180ms ease;
}

.apafiq-hero-slider__dot.is-active {
    width: 34px;
    background: #31c49e;
}

.apafiq-hero-slider-empty {
    padding: 18px 20px;
    border-left: 4px solid #b56bc7;
    background: #fff8ff;
    color: #333;
}

@media (max-width: 1024px) {
    .apafiq-hero-slide__content {
        width: min(640px, calc(100% - 120px));
        margin-left: 72px;
        margin-right: 48px;
    }

    .apafiq-hero-slide__title {
        font-size: clamp(32px, 4.6vw, 46px);
    }

    .apafiq-hero-slider__dots {
        left: 72px;
    }
}

@media (max-width: 767px) {
    .apafiq-hero-slider,
    .apafiq-hero-slider__track,
    .apafiq-hero-slide {
        min-height: 560px;
    }

    .apafiq-hero-slide__bg {
        background-position: center center;
    }

    .apafiq-hero-slide__overlay {
        background: linear-gradient(0deg, rgba(0, 52, 64, 0.96) 0%, rgba(0, 52, 64, 0.78) 66%, rgba(0, 52, 64, 0.34) 100%);
    }

    .apafiq-hero-slide {
        align-items: flex-end;
    }

    .apafiq-hero-slide__content {
        width: calc(100% - 40px);
        max-width: none;
        margin: 0 20px;
        padding: 84px 0 78px;
    }

    .apafiq-hero-slide__title {
        font-size: clamp(29px, 8vw, 40px);
        line-height: 1.08;
    }

    .apafiq-hero-slide__excerpt {
        font-size: 16px;
        line-height: 1.45;
    }

    .apafiq-hero-slider__arrow {
        top: 42%;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }

    .apafiq-hero-slider__dots {
        left: 20px;
        bottom: 22px;
    }
}
