/* Arzpaya FAQ Frontend Styles - Matching homepage.css */

/* ===== FAQ Section ===== */
.faq-section {
    margin: 60px auto;
    max-width: 800px;
    direction: rtl;
}

.faq-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: #1a1a1a;
}

.faq-item {
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    font-size: 17px;
    font-weight: 600;
    font-family: IRANSansWeb;
    color: var(--text-body);
    padding: 20px 24px 20px 50px;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-subtle);
    position: relative;
    text-align: right;
    word-wrap: break-word;
    padding-right: 16px;
}

.faq-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    transition: transform 0.4s ease;
    flex-shrink: 0;
    z-index: 1;
    color: #1a1a1a; /* مشکی در لایت مود */
    background-color: var(--card-bg);
    padding: 2px;
    border-radius: 2px;
}

.faq-question:hover {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.faq-item.open .faq-question {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-hover);
}

.faq-item.open .faq-icon {
    transform: translateY(-50%) rotate(180deg); /* چرخش 180 درجه برای تبدیل chevron بالا به پایین */
}

/* افکت باز شدن نرم و روان */
.faq-answer {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
    width: 100%;
    margin: 8px auto 0;
    padding: 0 20px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    visibility: hidden;
}

/* حالت باز */
.faq-item.open .faq-answer {
    opacity: 1;
    max-height: 2000px;
    transform: translateY(0);
    padding: 0 20px;
    visibility: visible;
}

@media (max-width: 768px) {
    .faq-question {
        width: 100%;
        font-size: 14px;
        font-family: IRANSansWeb;
        padding: 16px 16px 16px 40px;
        line-height: 1.5;
        margin: 0;
    }
    
    .faq-icon {
        width: 14px;
        height: 14px;
        left: 16px;
        background-color: var(--card-bg);
        padding: 2px;
        color: #1a1a1a; /* مشکی در لایت مود */
    }

    .faq-item.open .faq-icon {
        background-color: var(--card-bg);
        color: #1a1a1a; /* مشکی در لایت مود */
    }
    
    /* Dark theme mobile FAQ icon styles */
    [data-theme="dark"] .faq-icon {
        background-color: transparent;
        color: white;
    }

    [data-theme="dark"] .faq-item.open .faq-icon {
        background-color: transparent;
        color: white;
    }
    
    .faq-answer {
        width: 100%;
        text-align: start;
    }
}

/* Dark theme styles for FAQ section */
[data-theme="dark"] .faq-title {
    color: var(--text-primary);
}

[data-theme="dark"] .faq-question {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-body);
    box-shadow: var(--shadow-subtle);
}

[data-theme="dark"] .faq-question:hover {
    background-color: rgba(61, 114, 254, 0.05);
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .faq-question:hover .faq-icon {
    background-color: transparent;
    color: #ffffff; /* سفید در دارک مود */
}

[data-theme="dark"] .faq-item.open .faq-question {
    background-color: var(--card-bg);
    box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .faq-answer {
    color: var(--text-secondary);
}

[data-theme="dark"] .faq-icon {
    background-color: transparent;
    color: #ffffff; /* سفید در دارک مود */
}

[data-theme="dark"] .faq-item.open .faq-icon {
    background-color: transparent;
    color: #ffffff; /* سفید در دارک مود */
}

