/**
 * Feature Accordion - Frontend Styles
 * Apple-style interactive feature accordion
 */

/* Container */
.fa-container {
    width: 100%;
    padding: 4rem 2rem;
    box-sizing: border-box;
    background: transparent;
}

.fa-content {
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

/* Features List */
.fa-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fa-feature {
    position: relative;
}

/* Feature Button */
.fa-feature-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--btn-color, rgba(255, 255, 255, 0.1));
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--btn-text-color, inherit);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    width: auto;
}

.fa-feature-btn:hover {
    background: var(--hover-color, rgba(255, 255, 255, 0.15));
}

.fa-feature.fa-active .fa-feature-btn {
    background: var(--active-color, #f5a623);
    color: var(--active-text-color, #000);
}

.fa-feature.fa-active .fa-feature-icon {
    color: var(--active-text-color, #000);
}

/* Padding sizes */
.fa-padding-small .fa-feature-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.5rem;
}

.fa-padding-large .fa-feature-btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    gap: 1rem;
}

/* Icon sizes */
.fa-icon-small .fa-feature-icon {
    width: 16px;
    height: 16px;
}

.fa-icon-small .fa-feature-icon svg {
    width: 16px;
    height: 16px;
}

.fa-icon-medium .fa-feature-icon {
    width: 24px;
    height: 24px;
}

.fa-icon-medium .fa-feature-icon svg {
    width: 24px;
    height: 24px;
}

.fa-icon-large .fa-feature-icon {
    width: 32px;
    height: 32px;
}

.fa-icon-large .fa-feature-icon svg {
    width: 32px;
    height: 32px;
}

/* Feature Icon */
.fa-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--icon-color, currentColor);
}

.fa-feature-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon rotation on active - plus becomes X */
.fa-feature-icon svg {
    transition: transform 0.3s ease;
}

.fa-feature.fa-active .fa-icon-plus svg {
    transform: rotate(45deg);
}

/* Subtle pulse hint on active button */
.fa-feature.fa-active .fa-feature-btn {
    cursor: pointer;
}

.fa-feature.fa-active .fa-feature-btn:hover {
    opacity: 0.85;
}

/* Feature Title */
.fa-feature-title {
    white-space: nowrap;
}

/* Feature Description */
.fa-feature-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    margin-top: 0;
}

.fa-feature.fa-active .fa-feature-description {
    max-height: 300px;
    opacity: 1;
    margin-top: 0.75rem;
}

/* Apple-style description box */
.fa-feature-description-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
}

.fa-feature-description-box p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: inherit;
}

.fa-feature-description-box strong {
    font-weight: 600;
}

/* Image Container */
.fa-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 1rem;
}

/* Hide mobile-only elements on desktop */
.fa-active-feature-title {
    display: none;
}

.fa-description-zone {
    display: none;
}

.fa-features-wrapper::after {
    display: none;
}

.fa-image-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    will-change: transform;
}

.fa-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .fa-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .fa-features {
        order: 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .fa-feature {
        flex: 0 0 auto;
    }

    .fa-image-container {
        order: 1;
        height: 350px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .fa-container {
        padding: 1rem 0;
    }

    .fa-content {
        gap: 0;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    /* Image - smaller to make room for cards */
    .fa-image-container {
        order: 1;
        height: 38vh;
        max-height: 280px;
        min-height: 200px;
        border-radius: 0;
        position: relative;
        margin-bottom: 0.75rem;
    }

    /* Hide title overlay - not needed with card stack */
    .fa-active-feature-title {
        display: none;
    }

    /* Features wrapper */
    .fa-features-wrapper {
        order: 2;
        position: relative;
    }

    /* Hide scroll gradient - not needed for vertical */
    .fa-features-wrapper::after {
        display: none;
    }

    /* Vertical card stack - tight */
    .fa-features {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow-x: visible;
        justify-content: flex-start;
        padding: 0 1rem 1rem;
        gap: 0.5rem;
    }

    .fa-feature {
        flex: 0 0 auto;
        width: 100%;
    }

    .fa-feature:last-child {
        margin-right: 0;
    }

    /* Full-width card buttons - compact */
    .fa-feature-btn {
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
        min-height: 44px;
        width: 100%;
        white-space: normal;
        border-radius: 0.75rem;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.625rem;
    }

    /* Active state */
    .fa-feature.fa-active .fa-feature-btn {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        border-radius: 0.75rem 0.75rem 0 0;
    }

    .fa-feature-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .fa-feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .fa-feature-title {
        font-size: 0.8rem;
    }

    /* Show descriptions inside cards */
    .fa-feature-description {
        display: block !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
        margin-top: 0;
    }

    .fa-feature.fa-active .fa-feature-description {
        max-height: 400px;
        opacity: 1;
        margin-top: 0;
    }

    .fa-feature-description-box {
        padding: 1rem 1.125rem;
        border-radius: 0 0 0.75rem 0.75rem;
        background: rgba(255, 255, 255, 0.08);
    }

    .fa-feature-description-box p {
        font-size: 0.875rem;
        line-height: 1.5;
        margin: 0;
    }

    /* Hide separate description zone - not needed */
    .fa-description-zone {
        display: none !important;
    }
}

/* Responsive - Small Mobile (375px and below) */
@media (max-width: 375px) {
    .fa-image-container {
        height: 28vh;
        max-height: 200px;
        min-height: 140px;
    }

    .fa-features {
        padding: 0 0.75rem 0.75rem;
        gap: 0.5rem;
    }

    .fa-feature-btn {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

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

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

    .fa-feature-description-box {
        padding: 0.875rem 1rem;
    }

    .fa-feature-description-box p {
        font-size: 0.8125rem;
    }
}

/* Animation helpers */
@keyframes fa-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fa-feature.fa-active .fa-feature-description-box {
    animation: fa-fade-in 0.4s ease forwards;
}
