﻿

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(145deg, #eef2f7 0%, #f8fafc 100%);
    color: #1e293b;
    /*min-height: 100vh;*/
    /*padding: 25px;*/
    /*display: flex;*/
    direction: rtl;
    /*text-align: center !important;*/
    font-size:14px;
}

.faq-page {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 48px;
    padding: 40px 45px 50px;
    box-shadow: 0 40px 100px rgba(0, 20, 40, 0.12), 0 0 0 1px rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.7);
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}

/* ===== HEADER ===== */
.faq-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

    .faq-header .back-link {
        align-self: flex-start;
        text-decoration: none;
        color: #2563eb;
        font-weight: 600;
        font-size: 0.95rem;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 20px;
        border-radius: 60px;
        background: rgba(37, 99, 235, 0.08);
        transition: all 0.3s;
        margin-bottom: 15px;
    }

        .faq-header .back-link:hover {
            background: rgba(37, 99, 235, 0.15);
            transform: translateX(6px);
        }

    .faq-header .badge {
        display: inline-block;
        background: linear-gradient(135deg, #2563eb, #7c3aed);
        color: white;
        padding: 4px 20px;
        border-radius: 60px;
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        margin-bottom: 12px;
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
        background: #7bbd89;
    }

    .faq-header h1 {
        font-size: 2.8rem;
        font-weight: 900;
        background: linear-gradient(135deg, #0b2b4a, #2563eb);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        letter-spacing: -0.5px;
        display: flex;
        align-items: center;
        gap: 16px;
    }

        .faq-header h1 i {
            background: linear-gradient(135deg, #2563eb, #7c3aed);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

    .faq-header p {
        color: #475569;
        font-size: 1.1rem;
        margin-top: 6px;
        font-weight: 300;
    }

/* ===== STATS ROW ===== */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 25px 0 30px;
    flex-wrap: wrap;
}

    .stats-row .stat-item {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(255,255,255,0.6);
        padding: 8px 22px;
        border-radius: 60px;
        border: 1px solid rgba(226, 232, 240, 0.6);
        font-weight: 500;
        font-size: 0.95rem;
        backdrop-filter: blur(4px);
    }

        .stats-row .stat-item i {
            color: #2563eb;
            font-size: 1.1rem;
        }

        .stats-row .stat-item .num {
            font-weight: 700;
            color: #0b2b4a;
        }

/* ===== SEARCH & FILTER ===== */
.search-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 35px;
    background: rgba(255,255,255,0.4);
    padding: 18px 24px;
    border-radius: 80px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 60px;
    padding: 0 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    min-width: 200px;
}

    .search-box:focus-within {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    }

    .search-box i {
        color: #94a3b8;
        font-size: 1rem;
    }

    .search-box input {
        border: none;
        padding: 14px 14px;
        font-size: 0.95rem;
        font-family: inherit;
        background: transparent;
        width: 100%;
        outline: none;
        color: #1e293b;
    }

        .search-box input::placeholder {
            color: #94a3b8;
        }

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

    .filter-tabs .filter-btn {
        padding: 10px 20px;
        border-radius: 60px;
        border: 1px solid #e2e8f0;
        background: white;
        font-family: inherit;
        font-weight: 600;
        font-size: 0.85rem;
        color: #475569;
        cursor: pointer;
        transition: all 0.25s;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .filter-tabs .filter-btn i {
            font-size: 0.9rem;
        }

        .filter-tabs .filter-btn:hover {
            border-color: #2563eb;
            color: #2563eb;
            transform: translateY(-2px);
        }

        .filter-tabs .filter-btn.active {
            /*background: linear-gradient(135deg, #2563eb, #4f46e5);*/
            color: white;
            border-color: transparent;
            box-shadow: 0 8px 24px rgba(37, 99, 235, 0.30);
            background: #7bbd89;
        }

/* ===== FAQ LIST ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.faq-item {
    background: white;
    border-radius: 28px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.15, 0.75, 0.3, 1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
}

    .faq-item:hover {
        border-color: rgba(37, 99, 235, 0.20);
        box-shadow: 0 8px 32px rgba(0,0,0,0.04);
    }

    .faq-item .question {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 28px;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.90rem;
        color: #0b2b4a;
        gap: 15px;
        transition: background 0.2s;
        user-select: none;
    }

        .faq-item .question:hover {
            background: rgba(37, 99, 235, 0.02);
        }

        .faq-item .question .q-left {
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 1;
        }

            .faq-item .question .q-left .q-icon {
                width: 36px;
                height: 36px;
                display: flex;
                align-items: center;
                justify-content: center;
                background: rgba(37, 99, 235, 0.06);
                border-radius: 12px;
                /*color: #2563eb;*/
                font-size: 0.9rem;
                flex-shrink: 0;
                color: #7bbd89;
            }

            .faq-item .question .q-left .q-badge {
                font-size: 0.65rem;
                font-weight: 700;
                padding: 2px 14px;
                border-radius: 60px;
                background: #dbeafe;
                color: #1e4a7a;
                white-space: nowrap;
            }

                .faq-item .question .q-left .q-badge.hot {
                    background: #fee2e2;
                    color: #b91c1c;
                }

                .faq-item .question .q-left .q-badge.new {
                    background: #d1fae5;
                    color: #065f46;
                }

        .faq-item .question .toggle-icon {
            color: #94a3b8;
            font-size: 1.2rem;
            transition: transform 0.4s ease;
            flex-shrink: 0;
        }

    .faq-item.active .question .toggle-icon {
        transform: rotate(180deg);
        color: #2563eb;
    }

    .faq-item .answer {
        max-height: 0;
        padding: 0 28px;
        overflow: hidden;
        transition: max-height 0.45s cubic-bezier(0.15, 0.75, 0.3, 1.1), padding 0.3s ease;
        color: #334155;
        line-height: 1.9;
        border-top: 1px solid transparent;
    }

    .faq-item.active .answer {
        max-height: 500px;
        padding: 0 28px 26px 28px;
        border-top-color: rgba(226, 232, 240, 0.6);
    }

    .faq-item .answer .answer-content {
        padding-top: 18px;
        font-size: 0.9rem;
    }

        .faq-item .answer .answer-content i {
            color: #2563eb;
            margin-left: 10px;
        }

    .faq-item .answer .answer-meta {
        display: flex;
        gap: 20px;
        margin-top: 14px;
        font-size: 0.8rem;
        color: #94a3b8;
        border-top: 1px solid #f1f5f9;
        padding-top: 14px;
        flex-wrap: wrap;
    }

        .faq-item .answer .answer-meta span {
            display: flex;
            align-items: center;
            gap: 6px;
        }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    display: none;
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 16px;
        opacity: 0.3;
    }

    .empty-state p {
        font-size: 1.1rem;
    }

   /* ===== TOAST NOTIFICATION ===== */
        .toast {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: #0b2b4a;
            color: white;
            padding: 16px 28px;
            border-radius: 20px;
            box-shadow: 0 16px 48px rgba(0,0,0,0.20);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 14px;
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.15, 0.75, 0.3, 1.1);
            z-index: 999;
            border: 1px solid rgba(255,255,255,0.10);
            max-width: 90%;
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast i {
            font-size: 1.5rem;
            color: #4ade80;
        }

        .toast.error i {
            color: #f87171;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .faq-page {
                padding: 25px 18px 35px;
                border-radius: 32px;
            }
            .faq-header h1 {
                font-size: 2rem;
            }
            .ask-section {
                padding: 20px;
            }
            .form-row {
                flex-direction: column;
            }
            .captcha-wrapper {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }
            .captcha-box {
                justify-content: center;
            }
            .search-filter {
                padding: 14px 16px;
                border-radius: 32px;
                flex-direction: column;
            }
            .filter-tabs {
                justify-content: center;
            }
            .filter-tabs .filter-btn {
                padding: 6px 14px;
                font-size: 0.8rem;
            }
            .faq-item .question {
                padding: 16px 18px;
                font-size: 0.95rem;
            }
            .faq-item .question .q-left .q-badge {
                display: none;
            }
            .faq-item.active .answer {
                padding: 0 18px 20px 18px;
            }
            .stats-row {
                gap: 14px;
            }
            .stats-row .stat-item {
                padding: 4px 14px;
                font-size: 0.8rem;
            }
            .btn-submit {
                width: 100%;
                justify-content: center;
            }
            .toast {
                right: 20px;
                left: 20px;
                bottom: 20px;
                padding: 14px 20px;
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .faq-page {
                padding: 16px 12px 25px;
                border-radius: 24px;
            }
            .faq-header h1 {
                font-size: 1.6rem;
            }
            .faq-header .back-link {
                font-size: 0.8rem;
                padding: 4px 14px;
            }
            .faq-item .question {
                font-size: 0.9rem;
                padding: 14px 14px;
            }
            .faq-item .question .q-left .q-icon {
                width: 28px;
                height: 28px;
                font-size: 0.75rem;
            }
            .ask-section .ask-title {
                font-size: 1.1rem;
            }
            .captcha-box .captcha-text {
                font-size: 1.3rem;
                min-width: 80px;
                letter-spacing: 4px;
            }
        }


/* ===== ASK QUESTION FORM ===== */
.ask-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
    border-radius: 32px;
    padding: 30px 35px;
    margin-bottom: 35px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

    .ask-section .ask-title {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 1.3rem;
        font-weight: 700;
        color: #0b2b4a;
        margin-bottom: 18px;
    }

        .ask-section .ask-title i {
            /*color: #2563eb;*/
            font-size: 1.5rem;
            color: #7bbd89;
        }

.ask-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

    .form-group label {
        display: block;
        font-weight: 600;
        font-size: 0.85rem;
        color: #475569;
        margin-bottom: 6px;
    }

        .form-group label i {
            /*color: #2563eb;*/
            margin-left: 6px;
            color: #7bbd89;
        }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 16px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: all 0.3s;
        background: white;
        color: #1e293b;
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: #7bbd89;
            /*box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);*/
            box-shadow: 0 0 0 4px rgba(50, 168, 82, 0.08);
            outline: none;
        }

    .form-group textarea {
        min-height: 80px;
        resize: vertical;
    }

    .form-group .char-count {
        text-align: left;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 4px;
    }

.btn-submit {
    align-self: flex-start;
    padding: 14px 40px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    border: none;
    border-radius: 60px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.30);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #7bbd89;
}

    .btn-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 40px rgba(37, 99, 235, 0.45);
    }

    .btn-submit:active {
        transform: scale(0.97);
    }

    .btn-submit i {
        font-size: 1.1rem;
    }
/* ===== CAPTCHA ===== */
.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

    .captcha-wrapper:focus-within {
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    }

    .captcha-wrapper.error {
        border-color: #ef4444;
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
    }

.captcha-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 150px;
}

    .captcha-box .captcha-text {
        font-size: 1.6rem;
        font-weight: 900;
        font-family: 'Courier New', monospace;
        letter-spacing: 6px;
        background: linear-gradient(135deg, #1e293b, #475569);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        padding: 4px 12px;
        border-radius: 8px;
        user-select: none;
        min-width: 100px;
        text-align: center;
    }

        .captcha-box .captcha-text i {
            font-style: normal;
            -webkit-text-fill-color: #2563eb;
        }

    .captcha-box .refresh-captcha {
        background: none;
        border: none;
        color: #2563eb;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .captcha-box .refresh-captcha:hover {
            background: rgba(37, 99, 235, 0.08);
            transform: rotate(60deg);
        }

.captcha-input {
    flex: 1;
    min-width: 120px;
}

    .captcha-input input {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        font-family: inherit;
        font-size: 0.95rem;
        transition: all 0.3s;
        background: #f8fafc;
        direction: ltr;
        text-align: center;
        letter-spacing: 2px;
    }

        .captcha-input input:focus {
            border-color: #2563eb;
            outline: none;
            background: white;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
        }

        .captcha-input input.error {
            border-color: #ef4444;
            background: #fef2f2;
        }

.captcha-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .captcha-hint i {
        color: #2563eb;
    }