/**
 * Feature Carousel Widget Styles
 * Isoclima Custom Elementor Widget
 */

/* Container */
.iso-carousel-section {
    width: 100%;
}

.iso-carousel-container {
    max-width: 1320px;
    margin: 0 auto;
}

.iso-carousel-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .iso-carousel-flex {
        flex-wrap: nowrap;
    }
}

/* Section Title */
.iso-section-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

/* Image/Video Section */
.iso-video-section {
    position: relative;
    max-width: 546px;
    min-height: 612px;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.iso-carousel-slide {
    display: none;
    position: absolute;
    height: 100%;
    width: 100%;
    justify-content: center;
    align-items: center;
    transition: all 0.75s ease-out;
}

.iso-carousel-slide.active {
    display: flex;
}

.iso-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    position: absolute;
    inset: 0;
}

/* Desktop slide animation */
@media (min-width: 1024px) {
    .iso-carousel-slide {
        display: flex;
        padding-top: 112%;
    }

    .iso-carousel-slide.active {
        animation: iso-slide-animation 0.75s ease-out;
    }

    @keyframes iso-slide-animation {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(0);
        }
    }
}

/* Video Play Button */
.iso-popup-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: transform 0.3s ease;
}

.iso-popup-video:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.iso-popup-video svg {
    width: 64px;
    height: 64px;
}

/* Content Section */
.iso-content-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.iso-content-top {
    flex: 1;
}

/* Feature Navigation */
.iso-feature-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.iso-font-feature {
    font-size: 36px;
    font-weight: 300;
    line-height: 56px;
    color: #BFC9CF;
    cursor: pointer;
    position: relative;
    width: fit-content;
    padding-bottom: 10px;
    margin: 0;
    transition: color 0.3s ease-in-out;
}

.iso-font-feature:hover {
    color: #05202E;
}

/* Hover underline animation */
.iso-font-feature::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #E9A23E;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.75s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 2;
}

.iso-font-feature:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.iso-font-feature.active:hover::before {
    content: none;
}

/* Active state */
.iso-font-feature.active {
    color: #05202E;
}

/* Active progress animation */
.iso-font-feature.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #E9A23E;
    animation: iso-fillProgress 3s ease-in-out forwards;
}

@keyframes iso-fillProgress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

/* Feature Content */
.iso-feature-content {
    display: none;
    margin-top: 10px;
}

.iso-feature-content.active {
    display: block;
}

.iso-feature-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
}

.iso-feature-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.4;
}

.iso-feature-description p {
    margin: 0;
}

/* View Link */
.iso-view-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 300;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid currentColor;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.iso-view-link:hover {
    color: #E9A23E;
    border-color: #E9A23E;
}

/* Read Time */
.iso-read-time {
    font-size: 1rem;
    font-weight: 300;
    margin: 0.5rem 0 0 0;
    color: inherit;
}

/* Article Link */
.iso-article-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 1rem;
    font-weight: 300;
    text-decoration: none;
    color: #05202E;
    border-bottom: 1px solid #05202E;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.iso-article-link:hover {
    color: #E9A23E;
    border-color: #E9A23E;
}

/* Responsive: Desktop Only */
.iso-desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .iso-desktop-only {
        display: block;
    }

    .iso-video-section.iso-desktop-only {
        display: block;
    }
}

/* Responsive: Mobile Only */
.iso-mobile-only {
    display: block;
}

@media (min-width: 1024px) {
    .iso-mobile-only {
        display: none !important;
    }
}

/* Mobile Styles */
@media (max-width: 1023px) {
    .iso-font-feature {
        font-size: 28px;
        line-height: 34px;
        color: #05202E;
        padding-bottom: 0;
    }

    .iso-font-feature::before {
        content: none;
    }

    .iso-font-feature::after {
        content: none !important;
        animation: none !important;
    }

    .iso-video-section {
        min-height: auto;
        height: 350px;
        max-width: 100%;
        margin-bottom: 12px;
    }

    .iso-carousel-mobile-slide {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        height: 100%;
    }

    .iso-carousel-mobile-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 4px;
        position: absolute;
        inset: 0;
    }

    .iso-tab-content {
        margin-bottom: 28px;
    }

    .iso-tab-content:last-child {
        margin-bottom: 0;
    }

    .iso-feature-title {
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .iso-carousel-section {
        padding: 40px 32px !important;
    }
}

@media (max-width: 425px) {
    .iso-carousel-section {
        padding: 40px 16px !important;
    }

    .iso-video-section {
        height: 180px;
    }
}

/* Video Popup Styles (for Magnific Popup) */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}
