/**
 * Focus Slider CSS
 */

.focus-slider-widget {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* CSS Variables from Elementor are applied here */
}

/* Patch: Force Elementor Widget Wrapper to act Full Width in Flex Containers */
.elementor-widget-focus_slider,
.elementor-widget-focus_slider .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    flex-grow: 1;
    display: block !important;
}

/* 1. Background Panel Layer (Lowest) */
.focus-panel-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: calc(100% - var(--image-width, 75%));
    z-index: 1;
    /* Lowest level, behind content */
    background-color: #253D53;
    /* Default fallback */
    transition: background-color 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through */
}

/* 2. Swiper Content Layer (Middle) */
/* 2. Slider Content Layer (Middle) */
.focus-slider-content {
    width: 100%;
    height: 100%;
    z-index: 5;
    /* Above background */
    position: relative;
    /* overflow: hidden;  Allowed for now */
}

.focus-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.focus-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
    background: none !important;
    /* Ensure no bg interferes */
}

.focus-slide-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* --- Apple-Style Animations --- */

/* Initial States (Hidden) */
.focus-slide-image img {
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease-out;
    transform: scale(1.05);
    /* Start slightly zoomed in */
    opacity: 0;
}

.focus-slide-title,
.focus-widget-separator,
.focus-slide-link {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease-out;
    transform: translateY(20px);
    opacity: 0;
}

/* Active States (Visible with Stagger) */

/* Image: Fades in and scales down to normal */
.focus-slide-item.active .focus-slide-image img {
    opacity: 1 !important;
    transform: scale(1);
    transition-delay: 0.1s;
}

/* Title: Slides up */
.focus-slide-item.active .focus-slide-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

/* Separator: Slides up */
.focus-slide-item.active .focus-widget-separator {
    opacity: 1;
    /* Note: uses variable color usually, but opacity needs to be explicit if we hide it */
    /* wait, separator has its own background color. setting opacity 1 is safe. */
    transform: translateY(0);
    transition-delay: 0.4s;
}

/* Link: Slides up */
.focus-slide-item.active .focus-slide-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.focus-slide-image {
    width: var(--image-width, 75%);
    height: 100%;
    min-height: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.focus-slide-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    /* opacity: 1 !important;  REMOVED for animation */
    /* visibility: visible !important; REMOVED for animation */
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    /* Override potential theme max-width */
}

/* Slide Content Area */
.focus-slide-content-area {
    width: calc(100% - var(--image-width, 75%));
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    position: relative;
    /* No background here, it lets .focus-panel-bg show through */
}

/* 3. Static UI Overlay Layer (Highest) */
.focus-ui-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(100% - var(--image-width, 75%));
    z-index: 10;
    /* Top level for interaction */
    pointer-events: none;
    /* Let clicks pass to swiper content underneath where empty */
}

.focus-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
    /* Re-enable pointer events for buttons/label */
}

.focus-slider-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.focus-btn-prev,
.focus-btn-next {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: inherit;
    /* Inherit from user setting */
}

/* SVG Styling */
.focus-slider-nav svg {
    display: block;
    width: 24px;
    /* Default, overridden by control */
    height: 24px;
}

.focus-slider-nav svg path {
    stroke: currentColor;
    /* Uses color set on parent */
}

/* Spacer to push content down if needed - currently just flex spacing */
.focus-content-spacer {
    flex-grow: 0;
    height: 40px;
    /* Approximate header height clearance */
}

/* Mobile Header - Hidden on desktop */
.focus-mobile-header {
    display: none;
}


/* Separator */
.focus-widget-separator {
    width: var(--separator-width-initial, 50px);
    height: var(--separator-height, 1px);
    background-color: var(--separator-color, #fff);
    transition: width 0.4s ease, background-color 0.3s;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Hover Effects */

/* Panel Hover: Target the bg layer when hovering the widget's right side (approx) */
/* Actually, we can hook into elementor's selector system. */
/* The PHP adds selectors for .focus-panel-bg:hover? No, likely wrapper hover. */
/* Let's rely on the PHP selectors updating .focus-panel-bg directly. */
/* If the user set hover color, it's applied to .focus-slider-panel. I need to update PHP selectors too probably. */
/* WAIT, I changed .focus-slider-panel to .focus-panel-bg in PHP? No, I used specific class in HTML. */
/* I need to make sure PHP selectors target .focus-panel-bg now. */

/* Separator Hover Expansion */
.focus-slide-content-area:hover .focus-widget-separator {
    width: var(--separator-width-hover, 150px);
}


/* Responsive Mobile */
@media (max-width: 767px) {
    .focus-slider-widget {
        height: auto !important;
        min-height: 600px;
    }

    .focus-slider-content {
        height: auto;
    }

    .focus-track {
        display: block;
        height: auto;
        position: relative;
    }

    .focus-slide-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
    }

    .focus-slide-item.active {
        position: relative;
    }

    .focus-slide-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4/3;
        flex: none;
    }

    .focus-slide-image img {
        object-fit: cover !important;
    }

    .focus-panel-bg {
        display: none;
    }

    .focus-slide-content-area {
        width: 100% !important;
        height: auto !important;
        flex: none;
        padding: 20px 25px 30px;
        background-color: var(--panel-bg-color, #253D53);
    }

    .focus-ui-overlay {
        display: none;
    }

    .focus-content-spacer {
        display: none;
    }

    .focus-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .focus-mobile-header .focus-label {
        margin-bottom: 0;
    }

    .focus-mobile-header .focus-slider-nav {
        display: flex;
        gap: 15px;
    }

    /* Disable animations on mobile */
    .focus-slide-image img,
    .focus-slide-title,
    .focus-widget-separator,
    .focus-slide-link {
        transform: none !important;
        transition: none !important;
        opacity: 1 !important;
    }

    .focus-slide-title {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .focus-widget-separator {
        margin: 15px 0;
    }
}