/* General Styles */
.swp-features-widget {
    text-align: center;
}

.swp-features__title h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
}

.swp-features__image {
    max-width: 100%;
    height: auto;
    display: none; /* Hidden by default */
}

.swp-features__card {
    padding: 20px;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
}

.swp-features__card.active {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.swp-features__card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

/* This is the default for icon-position: left */
.swp-features__card-header .swp-features__icon {
    margin-right: 15px;
    margin-bottom: 0;
}

/* This is for icon-position: top */
.swp-features__card-header[style*="flex-direction: column"] .swp-features__icon {
    margin-right: 0;
    margin-bottom: 15px;
}

.swp-features__icon {
    margin-right: 15px;
    font-size: 24px;
}

.swp-features__icon i,
.swp-features__icon svg {
    width: 30px;
}

.swp-features__card-title {
    font-size: 1.2em;
    font-weight: bold;
}

.swp-features__card-description {
    font-size: 1em;
    color: #555;
}

/* --- Layout Visibility --- */

/* Hide mobile layout by default */
.swp-features-mobile {
    display: none;
}

/* Desktop Styles (min-width: 769px) */
@media (min-width: 769px) {
    .swp-features-desktop .swp-features-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .swp-features-desktop .swp-features__column {
        flex: 1;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .swp-features-desktop .swp-features__image-column {
        flex: 1.5;
        min-height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile/Tablet Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Hide desktop layout */
    .swp-features-desktop {
        display: none;
    }

    /* Show and style mobile layout */
    .swp-features-mobile {
        display: block;
    }

    .swp-features-mobile .swp-features__image-column {
        width: 100%;
        margin-bottom: 30px;
        min-height: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .swp-features-mobile .swp-features__cards-wrapper {
        width: 100%;
    }

    .swp-features-mobile .swp-features__card {
        width: 85%; /* Adjust cell width */
        margin-right: 20px;
        margin-bottom: 0; /* Remove bottom margin for carousel */
    }

    /* Flickity dots */
    .flickity-page-dots {
        bottom: -30px;
    }
    .flickity-page-dots .dot {
        background: #ccc;
    }
}

/* Elementor Edit Mode: Show both layouts for easier editing */
.elementor-element-edit-mode .swp-features-desktop,
.elementor-element-edit-mode .swp-features-mobile {
    display: block !important;
    border: 2px dashed #999;
    padding: 15px;
    margin-bottom: 15px;
}
.elementor-element-edit-mode .swp-features-desktop:before,
.elementor-element-edit-mode .swp-features-mobile:before {
    content: 'Desktop View' / 'Mobile View';
    font-weight: bold;
    color: #999;
    display: block;
    margin-bottom: 10px;
}
.elementor-element-edit-mode .swp-features-mobile:before {
    content: 'Mobile View (Carousel)';
}
