/* ═══════════════════════════════════════════════
   ISES Hero Carousel – Matching Reference Design
   industrialproduct.biz/index.html
   ═══════════════════════════════════════════════ */

/* ── Centralised Timing Tokens ── */
:root {
    --hero-ease: cubic-bezier(0.65, 0, 0.35, 1);
    --hero-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --hero-power3: cubic-bezier(0.645, 0.045, 0.355, 1);
    --hero-bg-duration: 1500ms;
    --hero-frame-duration: 1500ms;
    --hero-content-duration: 1500ms;
    --hero-frame-delay: 0ms;
    --hero-title-delay: 1000ms;
    --hero-desc-delay: 1500ms;
    --hero-cta-delay: 2000ms;
    --hero-exit-duration: 300ms;
}

/* ── Container ── */
.ises-hero-carousel {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
    background-color: #0a0a0a;
    font-family: 'Lato', 'Inter', 'Segoe UI', Arial, sans-serif;
}

.ises-hero-carousel__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Individual Slide ── */
.ises-hero-carousel__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.ises-hero-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 3;
}

.ises-hero-carousel__slide.is-exiting {
    opacity: 1;
    pointer-events: none;
    z-index: 2;
}

/* ── Background Image ── */
.ises-hero-carousel__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: opacity, transform;
}

/* Subtle Ken Burns zoom while active */
.ises-hero-carousel__slide.is-active .ises-hero-carousel__bg {
    animation: heroBgZoom 10s ease-out forwards;
}

@keyframes heroBgZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

/* Direction-aware background enter/exit animations */
.ises-hero-carousel__bg {
    transform-origin: center center;
    will-change: opacity, transform;
}

.ises-hero-carousel.is-direction-next .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__bg {
    animation: bgEnterFromBottom var(--hero-bg-duration) var(--hero-ease) both;
}

.ises-hero-carousel.is-direction-prev .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__bg {
    animation: bgEnterFromTop var(--hero-bg-duration) var(--hero-ease) both;
}

.ises-hero-carousel.is-direction-next .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__bg {
    animation: bgExitToTop var(--hero-exit-duration) var(--hero-ease) both;
}

.ises-hero-carousel.is-direction-prev .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__bg {
    animation: bgExitToBottom var(--hero-exit-duration) var(--hero-ease) both;
}

@keyframes bgEnterFromBottom {
    from {
        opacity: 0;
        transform: translateY(25%) scale(1);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }
}

@keyframes bgEnterFromTop {
    from {
        opacity: 0;
        transform: translateY(-25%) scale(1);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }
}

@keyframes bgExitToTop {
    from {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }

    to {
        opacity: 0;
        transform: translateY(-15%) scale(1);
    }
}

@keyframes bgExitToBottom {
    from {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }

    to {
        opacity: 0;
        transform: translateY(15%) scale(1);
    }
}

/* ── Dark Overlay ── */
.ises-hero-carousel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════
   Border Layer – Matches reference design exactly
   
   Reference CSS:
   .border-layer {
     width: 200px; height: 345px;
     border: 12px solid #fff; border-right: none;
   }
   .border-layer::before {
     right: -125px; top: -12px;
     width: 125px; height: 12px; bg: #fff;
   }
   
   Creates an open-right rectangular frame with a
   top extension bar forming an "L" + top-bar shape.
   ══════════════════════════════════════════════════ */

.ises-hero-carousel__frame {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    /* Positioned left, vertically centered */
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    /* Dimensions from reference */
    width: 200px;
    height: 345px;
    /* Thick white border on 3 sides: top, left, bottom — NO right */
    border: 12px solid #ffffff;
    border-right: none;
}

/* Top extension bar via ::before (extends the top border to the right) */
.ises-hero-carousel__frame::before {
    content: '';
    position: absolute;
    right: -125px;
    top: -12px;
    width: 125px;
    height: 12px;
    background-color: #ffffff;
}

/* ── Frame entrance animation ── */
.ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__frame {
    animation: frameSlideIn var(--hero-frame-duration) var(--hero-power3) var(--hero-frame-delay) both;
}

@keyframes frameSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* Frame exit */
.ises-hero-carousel__slide.is-exiting .ises-hero-carousel__frame {
    animation: frameExit var(--hero-exit-duration) var(--hero-power3) forwards;
}

@keyframes frameExit {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ══════════════════════════════════════════════════
   Content Container
   
   In the reference, content (heading, description, button)
   is positioned with offset from the left, overlapping
   the border-layer area.
   
   Reference data offsets:
   - border-layer: hoffset 15px
   - heading:      hoffset 80px, voffset -60px from middle
   - description:  hoffset 80px, voffset +55px from middle
   - button:       hoffset 80px, voffset +115px from middle
   ══════════════════════════════════════════════════ */

.ises-hero-carousel__content {
    position: relative;
    z-index: 3;
    padding-left: 80px;
    max-width: 650px;
}

/* ── Heading ── */
.ises-hero-carousel__heading {
    position: relative;
    display: block;
    font-family: 'Lato', 'Inter', sans-serif;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.14em;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0 0 15px 0;
    /* Initial hidden state */
    opacity: 0;
    transform: translateY(-40px);
    clip-path: inset(0 0 100% 0);
}

.ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__heading {
    animation: heroContentMaskIn var(--hero-content-duration) var(--hero-power3) var(--hero-title-delay) forwards;
}

/* Directional overrides: when carousel has direction classes, use directional enter animations */
.ises-hero-carousel.is-direction-next .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__heading,
.ises-hero-carousel.is-direction-next .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__description,
.ises-hero-carousel.is-direction-next .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__cta {
    animation-name: heroContentMaskInFromBottom;
}

.ises-hero-carousel.is-direction-prev .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__heading,
.ises-hero-carousel.is-direction-prev .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__description,
.ises-hero-carousel.is-direction-prev .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__cta {
    animation-name: heroContentMaskInFromTop;
}

.ises-hero-carousel__slide.is-exiting .ises-hero-carousel__heading {
    animation: heroContentExit var(--hero-exit-duration) var(--hero-power3) forwards;
}

/* ── Description ── */
.ises-hero-carousel__description {
    position: relative;
    display: block;
    font-family: 'Lato', 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1.6em;
    color: #ffffff;
    margin: 0 0 30px 0;
    /* Initial hidden state */
    opacity: 0;
    transform: translateY(-40px);
    clip-path: inset(0 0 100% 0);
}

.ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__description {
    animation: heroContentMaskIn var(--hero-content-duration) var(--hero-power3) var(--hero-desc-delay) forwards;
}

.ises-hero-carousel__slide.is-exiting .ises-hero-carousel__description {
    animation: heroContentExit var(--hero-exit-duration) var(--hero-power3) 50ms forwards;
}

/* ── CTA Button ── */
.ises-hero-carousel__cta {
    position: relative;
    display: inline-block;
    font-family: 'Lato', 'Inter', sans-serif;
    font-size: 14px;
    line-height: 30px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background-color: #5ea0d6;
    padding: 10px 30px;
    border: none;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* Initial hidden state */
    opacity: 0;
    transform: translateY(-40px);
    clip-path: inset(0 0 100% 0);
}

.ises-hero-carousel__cta:hover {
    background-color: #001e57;
    color: #ffffff;
    text-decoration: none;
}

.ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__cta {
    animation: heroContentMaskIn var(--hero-content-duration) var(--hero-power3) var(--hero-cta-delay) forwards;
}

.ises-hero-carousel__slide.is-exiting .ises-hero-carousel__cta {
    animation: heroContentExit var(--hero-exit-duration) var(--hero-power3) 100ms forwards;
}

/* ══════════════════════════════════════════════════
   Content Enter / Exit Keyframes
   
   Reference uses mask-based reveal from Revolution Slider:
   from: "y:[-100%]; mask: x:0; y:0"
   Simulated with clip-path + translateY for CSS-only approach.
   ══════════════════════════════════════════════════ */

@keyframes heroContentMaskIn {
    from {
        opacity: 0;
        transform: translateY(-40px);
        clip-path: inset(0 0 100% 0);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes heroContentMaskInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
        clip-path: inset(0 0 100% 0);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes heroContentMaskInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
        clip-path: inset(0 0 100% 0);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }
}

@keyframes heroContentExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-15px);
    }
}

/* ══════════════════════════════════════════════════
   Navigation Arrows
   
   Reference uses Revolution Slider hesperiden style:
   Simple chevron arrows in small semi-transparent boxes.
   ══════════════════════════════════════════════════ */

.ises-hero-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
    opacity: 0;
}

.ises-hero-carousel__nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.ises-hero-carousel__nav--prev {
    left: 0;
}

.ises-hero-carousel__nav--next {
    right: 0;
}

.ises-hero-carousel__nav svg {
    width: 12px;
    height: 20px;
}

/* Nav entrance animation */
.ises-hero-carousel.is-ready .ises-hero-carousel__nav {
    animation: heroNavEnter 600ms var(--hero-ease-out) 2200ms forwards;
}

@keyframes heroNavEnter {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Once nav has appeared, keep it visible */
.ises-hero-carousel.is-nav-visible .ises-hero-carousel__nav {
    opacity: 1;
    animation: none;
}

/* ══════════════════════════════════
   Responsive
   ══════════════════════════════════ */

@media (max-width: 1024px) {
    .ises-hero-carousel__frame {
        width: 160px;
        height: 280px;
        border-width: 10px;
        left: 15px;
    }

    .ises-hero-carousel__frame::before {
        right: -100px;
        top: -10px;
        width: 100px;
        height: 10px;
    }

    .ises-hero-carousel__heading {
        font-size: 48px;
    }

    .ises-hero-carousel__description {
        font-size: 22px;
    }

    .ises-hero-carousel__content {
        padding-left: 60px;
    }
}

@media (max-width: 767px) {
    .ises-hero-carousel {
        height: 60vh;
        min-height: 400px;
    }

    .ises-hero-carousel__frame {
        width: 120px;
        height: 220px;
        border-width: 8px;
        left: 10px;
    }

    .ises-hero-carousel__frame::before {
        right: -80px;
        top: -8px;
        width: 80px;
        height: 8px;
    }

    .ises-hero-carousel__content {
        padding-left: 30px;
        padding-right: 15px;
        max-width: none;
    }

    .ises-hero-carousel__heading {
        font-size: 32px;
    }

    .ises-hero-carousel__description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .ises-hero-carousel__cta {
        padding: 8px 24px;
        font-size: 13px;
    }

    .ises-hero-carousel__nav {
        width: 32px;
        height: 32px;
    }

    .ises-hero-carousel__nav svg {
        width: 10px;
        height: 16px;
    }

    /* Reduce animation delays on mobile */
    :root {
        --hero-content-duration: 1000ms;
        --hero-frame-duration: 1000ms;
        --hero-title-delay: 600ms;
        --hero-desc-delay: 1000ms;
        --hero-cta-delay: 1400ms;
    }
}

@media (max-width: 480px) {
    .ises-hero-carousel__frame {
        width: 80px;
        height: 180px;
        border-width: 6px;
        left: 8px;
    }

    .ises-hero-carousel__frame::before {
        right: -60px;
        top: -6px;
        width: 60px;
        height: 6px;
    }

    .ises-hero-carousel__heading {
        font-size: 24px;
    }

    .ises-hero-carousel__description {
        font-size: 14px;
    }

    .ises-hero-carousel__content {
        padding-left: 20px;
    }
}

/* ══════════════════════════════════
   Accessibility – Reduced Motion
   ══════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {

    .ises-hero-carousel__slide.is-active .ises-hero-carousel__bg {
        animation: none;
    }

    .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__frame {
        animation: none;
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }

    .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__heading,
    .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__description,
    .ises-hero-carousel__slide.is-active.is-enter .ises-hero-carousel__cta {
        animation: none;
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0 0 0 0);
    }

    .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__heading,
    .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__description,
    .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__cta,
    .ises-hero-carousel__slide.is-exiting .ises-hero-carousel__frame {
        animation: none;
    }

    .ises-hero-carousel.is-ready .ises-hero-carousel__nav {
        animation: none;
        opacity: 1;
    }
}

/* ── Elementor Editor preview: always show first slide ── */
.elementor-editor-active .ises-hero-carousel__slide.is-active .ises-hero-carousel__heading,
.elementor-editor-active .ises-hero-carousel__slide.is-active .ises-hero-carousel__description,
.elementor-editor-active .ises-hero-carousel__slide.is-active .ises-hero-carousel__cta {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
}

.elementor-editor-active .ises-hero-carousel__slide.is-active .ises-hero-carousel__frame {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.elementor-editor-active .ises-hero-carousel__nav {
    opacity: 1;
}

.ises-container__content {
    width: 1140px;
    margin: 0 auto;
    position: relative
}