/**
 * Feature Showcase Section Styles
 * @package TubaraoCente
 */

/* ==========================================================================
   Feature Showcase - Mobile First (Accordion)
   ========================================================================== */

.feature-showcase-section {
    overflow: hidden;
}

.feature-showcase-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Navigation/Accordion */
.feature-showcase-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item-nav {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Accordion Header */
.feature-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem 1.5rem 1.5rem;
    background-color: var(--color-light-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.feature-item-header::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.feature-item-nav.active .feature-item-header::after {
    transform: rotate(180deg);
}

.feature-item-nav:hover .feature-item-header {
    background-color: #f0f0f0;
}

.feature-item-nav.active .feature-item-header {
    background-color: var(--color-white);
}

.feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-black);
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

/* Accordion Body */
.feature-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 0;
}

.feature-item-nav.active .feature-item-body {
    max-height: 2000px;
    background-color: var(--color-white);
    padding-top: 1rem;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark-gray);
    margin: 0;
    padding: 1rem 1.5rem 1rem;
    display: block;
}

.feature-image-mobile {
    width: calc(100% - 3rem);
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin: 0 1.5rem 1.5rem;
    aspect-ratio: 16 / 9;
}

.feature-image-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-image-mobile .feature-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    color: var(--color-gray);
    font-size: 2rem;
    margin: 0;
}

/* Content (hidden on mobile) */
.feature-showcase-content {
    display: none;
}

.feature-item-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-item-content.active {
    opacity: 1;
    pointer-events: auto;
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    color: var(--color-gray);
    font-size: 3rem;
}

/* ==========================================================================
   Dark Section Variants - Mobile
   ========================================================================== */

.section-dark .feature-item-header,
.section-primary .feature-item-header,
.section-primary-dark .feature-item-header,
.section-gradient .feature-item-header {
    background-color: rgba(255, 255, 255, 0.08);
}

.section-dark .feature-item-nav:hover .feature-item-header,
.section-primary .feature-item-nav:hover .feature-item-header,
.section-primary-dark .feature-item-nav:hover .feature-item-header,
.section-gradient .feature-item-nav:hover .feature-item-header {
    background-color: rgba(255, 255, 255, 0.12);
}

.section-dark .feature-item-nav.active .feature-item-header,
.section-primary .feature-item-nav.active .feature-item-header,
.section-primary-dark .feature-item-nav.active .feature-item-header,
.section-gradient .feature-item-nav.active .feature-item-header {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.section-dark .feature-item-body,
.section-primary .feature-item-body,
.section-primary-dark .feature-item-body,
.section-gradient .feature-item-body {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.section-dark .feature-item-nav.active .feature-item-body,
.section-primary .feature-item-nav.active .feature-item-body,
.section-primary-dark .feature-item-nav.active .feature-item-body,
.section-gradient .feature-item-nav.active .feature-item-body {
    background-color: rgba(255, 255, 255, 0.08);
}

.section-dark .feature-title,
.section-primary .feature-title,
.section-primary-dark .feature-title,
.section-gradient .feature-title {
    color: var(--color-white);
}

.section-dark .feature-description,
.section-primary .feature-description,
.section-primary-dark .feature-description,
.section-gradient .feature-description {
    color: rgba(255, 255, 255, 0.7);
}

.section-dark .feature-icon,
.section-primary .feature-icon,
.section-primary-dark .feature-icon,
.section-gradient .feature-icon {
    background-color: var(--color-accent);
    color: var(--color-black);
}

.section-dark .feature-showcase-content,
.section-primary .feature-showcase-content,
.section-primary-dark .feature-showcase-content,
.section-gradient .feature-showcase-content {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Desktop (≥ 992px) - Vertical Timeline
   ========================================================================== */

@media (min-width: 992px) {
    .feature-showcase-wrapper {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 3rem;
        align-items: stretch;
    }

    /* Timeline Container */
    .feature-showcase-nav {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Timeline items */
    .feature-item-nav {
        background-color: transparent;
        border-radius: 0;
        overflow: visible;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .feature-item-body {
        position: relative;
    }

    .feature-item-nav:hover .feature-item-header {
        background-color: transparent;
    }

    .feature-item-nav.active .feature-item-header {
        background-color: transparent;
        box-shadow: none;
    }

    /* Header - Timeline item */
    .feature-item-header {
        padding: 0 0 0 2rem;
        background-color: transparent;
        gap: 1rem;
        cursor: pointer;
        margin-bottom: 0;
        position: relative;
    }

    /* Hide chevron on desktop */
    .feature-item-header::after {
        display: none;
    }

    .feature-item-header:hover .feature-title {
        color: var(--color-primary);
    }

    /* Icon - appears at timeline point */
    .feature-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        margin-left: -2rem;
        background-color: var(--color-white);
        border: 3px solid var(--color-primary);
        color: var(--color-primary);
        font-size: 1.125rem;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .feature-item-nav.active .feature-icon {
        background-color: var(--color-primary);
        color: var(--color-white);
    }

    /* Title - clickable */
    .feature-title {
        font-size: 1.25rem;
        cursor: pointer;
        flex: 1;
    }

    /* Body - accordion content (description) */
    .feature-item-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: transparent;
        padding: 0;
        margin: 0.75rem 0 0 0;
        border-top: none;
    }

    .feature-item-nav.active .feature-item-body {
        max-height: 500px;
        background-color: transparent;
        padding-top: 0;
    }

    /* Description - shown only when active */
    .feature-description {
        font-size: 1.0625rem;
        line-height: 1.6;
        color: var(--color-dark-gray);
        padding: 0 0 0 2rem;
        margin: 0.75rem 0 0 0;
        display: block;
        position: relative;
        z-index: 1;
    }

    /* Hide mobile image */
    .feature-image-mobile {
        display: none;
    }

    /* Show desktop content */
    .feature-showcase-content {
        display: flex;
        position: relative;
        background-color: var(--color-light-gray);
        border-radius: var(--border-radius-lg);
        overflow: hidden;
        min-height: 400px;
        align-items: center;
        justify-content: center;
    }
}

/* Dark Section Variants - Desktop */
@media (min-width: 992px) {
    .section-dark .feature-item-nav.active .feature-item-body::before,
    .section-primary .feature-item-nav.active .feature-item-body::before,
    .section-primary-dark .feature-item-nav.active .feature-item-body::before,
    .section-gradient .feature-item-nav.active .feature-item-body::before {
        background-color: var(--color-accent);
        opacity: 0.2;
    }

    .section-dark .feature-icon,
    .section-primary .feature-icon,
    .section-primary-dark .feature-icon,
    .section-gradient .feature-icon {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--color-accent);
        color: var(--color-accent);
    }

    .section-dark .feature-item-nav.active .feature-icon,
    .section-primary .feature-item-nav.active .feature-icon,
    .section-primary-dark .feature-item-nav.active .feature-icon,
    .section-gradient .feature-item-nav.active .feature-icon {
        background-color: var(--color-accent);
        color: var(--color-black);
        border-color: var(--color-accent);
    }

    .section-dark .feature-header:hover .feature-title,
    .section-primary .feature-header:hover .feature-title,
    .section-primary-dark .feature-header:hover .feature-title,
    .section-gradient .feature-header:hover .feature-title {
        color: var(--color-accent);
    }
}

/* ==========================================================================
   Tablet/Small Desktop (≤ 991px) - Accordion
   ========================================================================== */

@media (max-width: 991px) {
    .feature-showcase-wrapper {
        gap: 1.5rem;
    }

    .feature-description {
        display: block;
        padding: 0 1.5rem 1rem;
        margin: 0;
    }
}

/* ==========================================================================
   Mobile (≤ 575px) - Optimized Accordion
   ========================================================================== */

@media (max-width: 575px) {
    .feature-item-header {
        padding: 1rem;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .feature-title {
        font-size: 1rem;
    }

    .feature-image-mobile {
        width: calc(100% - 2rem);
        margin: 0 1rem 1rem;
    }

    .feature-description {
        padding: 0 1rem 0.75rem;
        font-size: 0.9375rem;
    }
}
