/* Ergo-style FAQ Component */
.ergo-faq {
    /* Use site variables for consistency */
    --faq-bg-closed: var(--gray, #f4f6f8);
    --faq-bg-open: #ffffff;
    --faq-text-color: var(--text-main, #333333);
    --faq-border-color: #e0e0e0;
    --faq-radius: 8px;
    --faq-transition: 0.3s ease;
    --faq-icon-color: var(--primary, #e72c52);
    /* Brand accent */

    width: 100%;
    /* Changed from max-width to width 100% to fill flex column */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-main, 'Montserrat', sans-serif);
}

.ergo-faq__item {
    border-radius: var(--faq-radius);
    overflow: hidden;
    transition: all var(--faq-transition);
}

/* Closed State (Default) */
.ergo-faq__item {
    background-color: var(--faq-bg-closed);
    border: 1px solid transparent;
}

/* Open State */
.ergo-faq__item.is-open {
    background-color: var(--faq-bg-open);
    border-color: var(--faq-border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ergo-faq__trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--faq-text-color);
    font-weight: 600;
    font-size: 1rem;
}

.ergo-faq__icon {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--faq-icon-color);
    transition: transform var(--faq-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Rotate icon when open */
.ergo-faq__item.is-open .ergo-faq__icon {
    transform: rotate(45deg);
    /* Turns + into x */
}

.ergo-faq__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--faq-transition);
    padding: 0 1.5rem;
    opacity: 0;
}

.ergo-faq__item.is-open .ergo-faq__content {
    padding-bottom: 1.5rem;
    opacity: 1;
}

.ergo-faq__content p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Espaciado exclusivo para la página FAQ */
.faq-bottom-spacing {
    margin-bottom: 15rem;
}

/* --- Video Section Styles --- */

/* Layout Container (kept for backward compatibility) */
.faq-layout-container {
    display: flex;
    gap: 3rem;
    /* Space between columns */
    align-items: flex-start;
    /* Align to top */
}

.faq-list-column {
    flex: 1;
    /* Takes remaining space */
}

.faq-video-column {
    flex: 0 0 40%;
    /* Fixed width for video column */
    max-width: 450px;
}

/* Sticky positioning ONLY for FAQ page video (in two-column layout) */
.faq-video-column .faq-video-section {
    position: sticky;
    top: 2rem;
}

.faq-video-section {
    padding-bottom: 0;
    text-align: center;
    /* Sticky positioning removed - only applied to FAQ page via .faq-video-column */
}

.faq-video-subtitle {
    font-family: var(--font-main, 'Montserrat', sans-serif);
    font-size: 1.1rem;
    color: var(--text-main, #333333);
    margin-bottom: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.faq-video-wrapper {
    width: 100%;
    border-radius: var(--faq-radius, 8px);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background-color: #000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive Video Container (16:9 Aspect Ratio) */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    padding-top: 0;
    height: 0;
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* New styles for video below FAQ questions - LARGER SIZE */
.faq-video-section-bottom {
    margin-top: 3rem;
    text-align: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.faq-video-wrapper-large {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--faq-radius, 8px);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background-color: #000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .faq-layout-container {
        flex-direction: column;
        /* Stack vertically */
        gap: 2rem;
    }

    .faq-video-column {
        flex: none;
        width: 100%;
        max-width: 100%;
        order: 2;
        /* Video below questions on tablet/mobile */
    }

    .faq-list-column {
        width: 100%;
        order: 1;
    }

    .faq-video-wrapper {
        max-width: 600px;
        /* Limit width on mobile */
        margin: 0 auto;
    }

    .faq-video-wrapper-large {
        max-width: 100%;
    }
}