/* FAQ Section - Modern Design */
.faq {
    padding: 80px 0;
    background-color: var(--background);
    color: var(--text);
}

.faq h2 {
    text-align: center;
    font-size: var(--font-xxl);
    margin-bottom: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.faq-row {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--button-border-radius);
    overflow: hidden;
    transition: all 0.2s;
}

.faq-row h3 {
    margin: 0;
    padding: 1.5rem 4rem 1.5rem 1.5rem;
    font-size: var(--font-ml);
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    position: relative;
    color: var(--text);
    transition: color 0.2s;
    background-color: var(--background);
    z-index: 2;
}

.faq-row h3::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transform: translateY(-50%);
    transition: transform 0.2s;
    opacity: 0.5;
}

.rtl .faq-row h3::after {
    left: 1.5rem;
    right: auto;
}

.dark-mode .faq-row h3::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
}

.faq-row p {
    margin: 0;
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: var(--font-md);
    line-height: 1.6;
    color: color-mix(in srgb, var(--text) 80%, transparent);
}

/* Active State */
.faq-row.active {
    border-color: var(--maestra-blue);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--maestra-blue) 30%, transparent);
}

.faq-row.active h3 {
    color: var(--maestra-blue);
}

.faq-row.active h3::after {
    transform: translateY(-50%) rotate(45deg);
    opacity: 1;
}

/* Closed State */
.faq-row.close p {
    display: none;
}

/* Hover Effects */
.faq-row:hover {
    border-color: var(--maestra-blue);
}

.faq-row:hover h3::after {
    opacity: 1;
}

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

.faq-row.active p {
    animation: slideDown 0.3s ease-out;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .faq-row {
        width: 90%;
    }
}

@media (max-width: 767px) {
    .faq {
        padding: 40px 0;
    }

    .faq h2 {
        font-size: var(--font-xl);
        margin-bottom: 2rem;
    }

    .faq-row {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .faq-row h3 {
        padding: 1.25rem 3rem 1.25rem 1.25rem;
        font-size: var(--font-md);
    }

    .faq-row h3::after {
        right: 1.25rem;
        width: 16px;
        height: 16px;
    }

    .faq-row p {
        padding: 0 1.25rem 1.25rem 1.25rem;
        font-size: var(--font-sm);
    }
}
