/*
 * FEATURES SECTION - Interactive Tabs
 * Inspired by Clueso & Trupeer design patterns
 */

/* ===== FEATURES SECTION CONTAINER ===== */
.features-tabs-section {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.features-tabs-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.features-header .section-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.1;
}

.features-header .section-subtitle {
    font-size: 18px;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== TAB NAVIGATION ===== */
.features-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.feature-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.feature-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.feature-tab.active {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.feature-tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== TAB PANELS ===== */
.features-tabs-content {
    position: relative;
}

.feature-panel {
    display: none;
    animation: fadeInPanel 0.4s ease-out;
}

.feature-panel.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@keyframes fadeInPanel {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ===== FEATURE DETAILS ===== */
.feature-details {
    padding-right: 40px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
    line-height: 1.2;
}

.feature-description {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 32px;
}

.feature-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.feature-highlights li:last-child {
    border-bottom: none;
}

.highlight-icon {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.highlight-icon svg {
    width: 14px;
    height: 14px;
}

/* ===== FEATURE PREVIEW ===== */
.feature-preview {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--gray-900);
    box-shadow: var(--shadow-2xl);
}

.feature-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent,
            rgba(124, 58, 237, 0.1),
            transparent,
            rgba(37, 99, 235, 0.1),
            transparent);
    animation: rotate 10s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.feature-preview-inner {
    position: relative;
    z-index: 1;
    background: var(--gray-900);
    margin: 2px;
    border-radius: calc(var(--radius-xl) - 2px);
    overflow: hidden;
}

.preview-video,
.preview-image {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.preview-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--gray-400);
}

.preview-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.preview-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 992px) {
    .features-tabs-section {
        padding: 80px 0;
    }

    .feature-panel.active {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-details {
        padding-right: 0;
        order: 2;
    }

    .feature-preview {
        order: 1;
    }

    .features-header .section-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .features-tabs-section {
        padding: 60px 0;
        overflow-x: hidden;
    }

    .features-header {
        margin-bottom: 40px;
        padding: 0 16px;
    }

    .features-header .section-title {
        font-size: 28px;
    }

    .features-header .section-subtitle {
        font-size: 16px;
    }

    .features-tabs-nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 16px 16px;
        margin-bottom: 40px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .features-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .feature-tab {
        padding: 12px 18px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .feature-tab-icon {
        width: 18px;
        height: 18px;
    }

    .feature-title {
        font-size: 24px;
    }

    .feature-description {
        font-size: 15px;
    }

    .features-tabs-content {
        padding: 0 16px;
    }

    .feature-panel.active {
        gap: 32px;
    }

    .feature-details {
        padding: 0;
    }

    .feature-highlights {
        gap: 12px;
    }

    .highlight-item {
        font-size: 14px;
        gap: 10px;
    }

    .preview-placeholder {
        aspect-ratio: 4/3;
    }

    .preview-placeholder svg {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .features-tabs-section {
        padding: 48px 0;
    }

    .features-header .section-title {
        font-size: 24px;
    }

    .feature-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .feature-title {
        font-size: 22px;
    }

    .feature-description {
        font-size: 14px;
    }
}