/**
 * UNIFIED FAQ STYLES
 * تنسيق موحد للأسئلة الشائعة في جميع الصفحات
 * ===========================================
 */

/* ===== الأسئلة الشائعة الأساسية ===== */
.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.faq-item.active {
    border-color: #205781;
    box-shadow: 0 12px 35px rgba(32, 87, 129, 0.15);
}

/* ===== سؤال الأسئلة الشائعة ===== */
.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: none;
    width: 100%;
    text-align: right;
}

.faq-question:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%) !important;
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%) !important;
}

.faq-question h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    padding-left: 20px;
}

.faq-question h3 i {
    color: #205781;
    margin-left: 10px;
    font-size: 1rem;
}

/* ===== أيقونة الأسئلة الشائعة ===== */
.faq-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(32, 87, 129, 0.1);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    margin-right: 10px;
    color: #205781;
}

.faq-item.active .faq-icon {
    background: #205781;
    color: white;
    transform: rotate(45deg);
}

/* ===== إجابة الأسئلة الشائعة ===== */
.faq-answer {
    display: none;
    background: white;
    animation: slideDown 0.3s ease-out;
}

.faq-answer.active {
    display: block;
}

.faq-answer-content {
    padding: 0 30px 25px 30px;
    border-top: 1px solid #e9ecef;
}

.faq-answer-content > div {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #205781;
}

.faq-answer-content p {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

.faq-answer-content p i {
    color: #ffc107;
    margin-left: 8px;
}

/* ===== أنيميشن الانزلاق ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== تنسيقات خاصة للصفحة الرئيسية ===== */
.faq-grid .faq-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-right: 4px solid #205781;
    transition: all 0.3s ease;
}

.faq-grid .faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.faq-grid .faq-question {
    background: transparent;
    padding: 20px;
}

.faq-grid .faq-question:hover {
    background: transparent !important;
}

.faq-grid .faq-question span {
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.faq-grid .faq-answer {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #e9ecef;
}

.faq-grid .faq-answer-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-right: 3px solid #205781;
}

.faq-grid .faq-answer-content p {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== تنسيقات خاصة لصفحات المنتجات ===== */
.product-faq .faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.product-faq .faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.product-faq .faq-item.active {
    border-color: #205781;
    box-shadow: 0 12px 35px rgba(32, 87, 129, 0.15);
}

.product-faq .faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.product-faq .faq-question:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%) !important;
}

.product-faq .faq-item.active .faq-question {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%) !important;
}

.product-faq .faq-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(32, 87, 129, 0.1);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    margin-right: 10px;
    color: #205781;
}

.product-faq .faq-item.active .faq-icon {
    background: #205781;
    color: white;
    transform: rotate(45deg);
}

.product-faq .faq-answer {
    display: none;
    background: white;
    animation: slideDown 0.3s ease-out;
}

.product-faq .faq-answer.active {
    display: block;
}

.product-faq .faq-answer-content {
    padding: 0 30px 25px 30px;
    border-top: 1px solid #e9ecef;
}

.product-faq .faq-answer-content > div {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 10px;
    border-right: 4px solid #205781;
}

.product-faq .faq-answer-content p {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

.product-faq .faq-answer-content p i {
    color: #ffc107;
    margin-left: 8px;
}

/* ===== تنسيقات خاصة للصفحات التعليمية ===== */
.educational-content .faq-item {
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.educational-content .faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.educational-content .faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.educational-content .faq-question:hover {
    background: #e9ecef;
}

.educational-content .faq-question h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.educational-content .faq-icon {
    font-size: 1.2rem;
    color: #205781;
    transition: transform 0.3s ease;
}

.educational-content .faq-answer {
    padding: 0 20px 20px 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.educational-content .faq-answer.active {
    max-height: 500px;
}

.educational-content .faq-answer p {
    color: #555;
    line-height: 1.6;
    margin: 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-right: 3px solid #205781;
}

/* ===== تنسيقات خاصة لصفحة الاتصال ===== */
.contact-page .faq-item {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: right;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.contact-page .faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-page .faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #205781, #133a56);
}

.contact-page .faq-item h3 {
    color: #2c5aa0;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.contact-page .faq-item p {
    color: #666;
    line-height: 1.6;
}

/* ===== تنسيقات خاصة لصفحات المنتجات ===== */
.product-content .faq-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 25px;
    border-radius: 15px;
    border-right: 4px solid #205781;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.product-content .faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.product-content .faq-item h4 {
    color: #205781;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.product-content .faq-item p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== تنسيقات للهواتف المحمولة ===== */
@media (max-width: 768px) {
    .faq-question {
        padding: 20px !important;
    }
    
    .faq-question h3 {
        font-size: 1.1rem !important;
        padding-left: 15px !important;
    }
    
    .faq-answer-content {
        padding: 0 20px 20px 20px !important;
    }
    
    .faq-container {
        padding: 0 15px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-item h3 {
        font-size: 1rem;
    }
    
    .faq-section {
        padding: 30px 20px;
    }
    
    .product-content .faq-item {
        padding: 20px;
    }
    
    .product-content .faq-item h4 {
        font-size: 1rem;
    }
    
    .contact-page .faq-item {
        padding: 25px;
    }
    
    .contact-page .faq-item h3 {
        font-size: 1.2rem;
    }
}

/* ===== تنسيقات للشاشات الصغيرة جداً ===== */
@media (max-width: 480px) {
    .faq-question {
        padding: 15px !important;
    }
    
    .faq-question h3 {
        font-size: 1rem !important;
        padding-left: 10px !important;
    }
    
    .faq-answer-content {
        padding: 0 15px 15px 15px !important;
    }
    
    .faq-icon {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
    
    .faq-item {
        margin-bottom: 15px;
    }
}

/* ===== تنسيقات للوصولية ===== */
.faq-question:focus {
    outline: 2px solid #205781;
    outline-offset: 2px;
}

.faq-question[aria-expanded="true"] {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%) !important;
}

.faq-answer[aria-hidden="false"] {
    display: block;
}

/* ===== تنسيقات للطباعة ===== */
@media print {
    .faq-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .faq-question {
        background: white !important;
    }
    
    .faq-answer {
        display: block !important;
    }
    
    .faq-icon {
        display: none;
    }
}
