/* ==========================================================================
   Interactive Features Widget Styles
   ========================================================================== */

.ryzels-interactive-features {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    position: relative;
    height: calc(50vh * var(--feature-count, 1));
}

.ryzels-if-sticky-wrap {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 40px; /* Provide some padding so it doesn't touch edges */
}

/* Header */
.ryzels-if-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 40px;
}

.ryzels-if-header-left {
    flex: 1;
}

.ryzels-if-header-right {
    flex: 1;
}

.ryzels-if-main-title {
    font-size: 42px;
    font-weight: 800;
    color: #124d9c; /* Default Blue */
    margin: 0;
    line-height: 1.2;
}

.ryzels-if-main-desc {
    font-size: 16px;
    color: #4a4a4a;
    line-height: 1.6;
}

/* Body */
.ryzels-if-body {
    display: flex;
    gap: 60px;
    position: relative;
    align-items: center;
}

.ryzels-if-list-col {
    flex: 0 0 40%;
}

.ryzels-if-display-col {
    flex: 1;
}

.ryzels-if-sticky-container {
    display: grid;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    /* Aspect ratio will be controlled via Elementor, defaults to auto */
}

.ryzels-if-display-item {
    grid-area: 1 / 1; /* Stacks all items in the exact same grid cell */
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.ryzels-if-display-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.ryzels-if-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.ryzels-if-image-wrapper img {
    width: 100%;
    height: 100% !important;
    display: block;
    /* Object-fit controlled by Elementor, defaults to cover */
    object-fit: cover; 
    position: relative;
    z-index: 1;
}

.ryzels-aspect-auto .ryzels-if-image-wrapper img {
    height: auto !important;
    object-fit: unset !important;
}

/* Left List Items */
.ryzels-if-item {
    margin-bottom: 60px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.ryzels-if-item.active {
    opacity: 1;
}

.ryzels-if-item-inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.ryzels-if-arrow {
    flex: 0 0 40px;
    padding-top: 5px;
}

.ryzels-if-arrow svg,
.ryzels-if-arrow i {
    width: 40px;
    height: 24px;
    font-size: 24px;
    fill: #b5b5b5; /* Inactive arrow color */
    color: #b5b5b5;
    transition: fill 0.3s ease, color 0.3s ease;
}

.ryzels-if-item.active .ryzels-if-arrow svg {
    fill: #f36c21; /* Active arrow color */
}

.ryzels-if-item.active .ryzels-if-arrow i {
    color: #f36c21; /* Active arrow color */
}

.ryzels-if-content {
    flex: 1;
}

.ryzels-if-feature-title {
    font-size: 32px;
    font-weight: 700;
    color: #b5b5b5; /* Inactive title color */
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.ryzels-if-item.active .ryzels-if-feature-title {
    color: #f36c21; /* Active title color */
}

.ryzels-if-feature-desc-wrap {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.4s ease, opacity 0.4s ease;
}

.ryzels-if-item.active .ryzels-if-feature-desc-wrap {
    height: auto;
    opacity: 1;
    margin-top: 15px;
}

.ryzels-if-feature-desc {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Button */
.ryzels-if-button {
    display: inline-block !important;
    background-color: #f36c21;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 99 !important;
}

.ryzels-if-button:hover {
    background-color: #d15715;
    transform: translateX(-50%) translateY(-2px);
    color: #fff;
}

/* Mobile Layout */
.ryzels-if-mobile-display {
    display: none;
}

@media (max-width: 991px) {
    .ryzels-if-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .ryzels-if-list-col {
        flex: 0 0 50%;
    }
}

@media (max-width: 767px) {
    /* Reset sticky wrapper on mobile */
    .ryzels-interactive-features {
        height: auto !important;
    }
    .ryzels-if-sticky-wrap {
        position: relative !important;
        height: auto !important;
        min-height: unset !important;
        display: block !important;
        padding: 0;
        justify-content: unset;
    }

    /* Stack the header vertically on mobile */
    .ryzels-if-header {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }

    .ryzels-if-body {
        flex-direction: column;
    }
    
    /* Hide the desktop sticky display */
    .ryzels-if-display-col {
        display: none;
    }
    
    .ryzels-if-list-col {
        flex: 1;
        width: 100%;
        padding-bottom: 0;
    }

    /* Float the icon left so title sits beside it,
       but everything else below is full width */
    .ryzels-if-item-inner {
        display: block;
    }

    .ryzels-if-arrow {
        float: left;
        margin-right: 10px;
        margin-top: 4px;
        flex: unset;
    }

    .ryzels-if-content {
        display: block;
        width: 100%;
    }

    /* Title flows beside the floated icon */
    .ryzels-if-feature-title {
        overflow: hidden; /* Creates a block formatting context beside the float */
    }

    /* Description and image clear the float — full width, no indent */
    .ryzels-if-feature-desc-wrap {
        clear: both;
        width: 100%;
    }

    .ryzels-if-item {
        opacity: 1;
        margin-bottom: 30px;
        cursor: default;
    }

    .ryzels-if-item:last-child {
        margin-bottom: 0;
    }
    
    .ryzels-if-feature-desc-wrap {
        height: auto !important;
        opacity: 1 !important;
        margin-top: 8px;
    }
    
    .ryzels-if-feature-title {
        color: #f36c21;
        font-size: 24px;
    }
    
    .ryzels-if-arrow svg,
    .ryzels-if-arrow i {
        fill: #f36c21;
        color: #f36c21;
    }
    
    /* Show image inside the list item for mobile */
    .ryzels-if-mobile-display {
        display: block;
        margin-top: 12px;
        position: relative;
        width: 100%;
    }
    
    .ryzels-if-mobile-display .ryzels-if-image-wrapper {
        width: 100%;
        height: 100%;
    }
    
    .ryzels-if-mobile-display .ryzels-if-button {
        bottom: 20px;
        padding: 10px 24px;
        font-size: 14px;
    }
}
