/* ===== ریسپانسیو پایه ===== */
* {
    box-sizing: border-box;
}

/* ===== 1. فهرست مطالب ===== */
.ae-toc {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 12px;
    margin: 20px 0;
    border-right: 4px solid #007bff;
}
.ae-toc h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
}
.ae-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ae-toc-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}
.ae-toc-list li:last-child {
    border-bottom: none;
}
.ae-toc-list a {
    color: #007bff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ae-toc-list a:hover {
    color: #0056b3;
    text-decoration: underline;
}
.ae-toc-list a::before {
    content: "▸";
    color: #007bff;
}

/* ===== 2. باکس‌های رنگی ===== */
.ae-box {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-right: 5px solid #333;
}
.ae-box-tip {
    background: #d1ecf1;
    border-right-color: #17a2b8;
}
.ae-box-warning {
    background: #fff3cd;
    border-right-color: #ffc107;
}
.ae-box-success {
    background: #d4edda;
    border-right-color: #28a745;
}
.ae-box-danger {
    background: #f8d7da;
    border-right-color: #dc3545;
}
.ae-box-info {
    background: #cce5ff;
    border-right-color: #007bff;
}
.ae-box strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
}

/* ===== 3. FAQ ===== */
.ae-faq {
    margin: 25px 0;
}
.ae-faq h4 {
    text-align: center;
    margin-bottom: 20px;
}
.ae-faq-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 8px 0;
    overflow: hidden;
}
.ae-faq-q {
    padding: 14px 18px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    user-select: none;
}
.ae-faq-q:hover {
    background: #e9ecef;
}
.ae-faq-q span {
    font-size: 22px;
    font-weight: 300;
}
.ae-faq-a {
    padding: 15px 18px;
    background: white;
    line-height: 1.8;
    display: none;
}

/* ===== 4. جدول مقایسه‌ای ===== */
.ae-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
}
.ae-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ae-table th {
    background: #007bff;
    color: white;
    padding: 12px 15px;
    text-align: right;
}
.ae-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}
.ae-table tr:nth-child(even) {
    background: #f8f9fa;
}
.ae-table tr:hover {
    background: #e9ecef;
}

/* ===== 5. لیست دوستونه/سه‌ستونه ===== */
.ae-grid {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}
.ae-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.ae-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
.ae-grid-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.3s;
}
.ae-grid-item:hover {
    transform: translateY(-3px);
}
.ae-grid-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* ===== 6. باکس CTA ===== */
.ae-cta {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 25px 0;
}
.ae-cta h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
}
.ae-cta-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s;
}
.ae-cta-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ===== 7. باکس نقل قول ===== */
.ae-quote {
    padding: 25px 30px;
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
}
.ae-quote-mark {
    font-size: 50px;
    opacity: 0.2;
    display: block;
    line-height: 0.8;
}
.ae-quote-text {
    font-size: 18px;
    line-height: 1.8;
    font-style: italic;
    margin: 10px 0;
}
.ae-quote-author {
    text-align: left;
    font-weight: bold;
    margin-top: 10px;
}
.ae-quote-author::before {
    content: "— ";
}

/* ===== 8. تب‌های محتوایی ===== */
.ae-tabs {
    margin: 25px 0;
}
.ae-tabs-nav {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}
.ae-tab-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}
.ae-tab-btn:hover {
    background: #e9ecef;
}
.ae-tab-btn.active {
    background: #007bff;
    color: white;
}
.ae-tab-panel {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: none;
}
.ae-tab-panel.active {
    display: block;
}

/* ===== 9. کارت‌های آماری ===== */
.ae-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.ae-stat-card {
    background: #f8f9fa;
    padding: 25px 15px;
    text-align: center;
    border-radius: 12px;
    transition: transform 0.3s;
}
.ae-stat-card:hover {
    transform: translateY(-5px);
}
.ae-stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #007bff;
}
.ae-stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* ===== 10. اسلایدر نظرات ===== */
.ae-testimonials {
    overflow: hidden;
    margin: 25px 0;
}
.ae-testimonial-track {
    display: flex;
    gap: 20px;
    animation: aeSlide 20s infinite linear;
}
.ae-testimonial {
    flex: 0 0 300px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}
.ae-testimonial-text {
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 10px;
}
.ae-testimonial-author {
    font-weight: bold;
}
.ae-testimonial-stars {
    color: #ffc107;
}
@keyframes aeSlide {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(0); }
    25% { transform: translateX(-320px); }
    45% { transform: translateX(-320px); }
    50% { transform: translateX(-640px); }
    70% { transform: translateX(-640px); }
    75% { transform: translateX(-960px); }
    95% { transform: translateX(-960px); }
}

/* ===== 11. خلاصه سریع ===== */
.ae-tldr {
    background: #007bff;
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}
.ae-tldr-label {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

/* ===== 12. نکته کلیدی ===== */
.ae-key {
    background: #ffc107;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}
.ae-key-label {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

/* ===== 13. دکمه‌های پیشرفته ===== */
.ae-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}
.ae-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.ae-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* ===== 14. جمع‌بندی نهایی ===== */
.ae-conclusion {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-right: 4px solid #28a745;
}
.ae-conclusion h4 {
    margin: 0 0 15px 0;
    color: #28a745;
}

/* ===== 15. لوگوهای اعتماد ===== */
.ae-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}
.ae-trust-item {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 16. تایمر شمارش معکوس ===== */
.ae-countdown {
    background: #1a1a2e;
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}
.ae-countdown-title {
    font-size: 18px;
    margin-bottom: 15px;
}
.ae-countdown-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 20px;
}
.ae-countdown-display span {
    background: #16213e;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 28px;
    min-width: 60px;
}

/* ===== 17. دکمه شناور ===== */
.ae-floating {
    position: fixed;
    padding: 14px 24px;
    background: #007bff;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0,123,255,0.4);
    z-index: 999;
    transition: all 0.3s;
}
.ae-floating:hover {
    transform: scale(1.05);
    color: white;
}
.ae-floating-bottom-right {
    bottom: 30px;
    right: 30px;
}
.ae-floating-bottom-left {
    bottom: 30px;
    left: 30px;
}
.ae-floating-top-right {
    top: 30px;
    right: 30px;
}
.ae-floating-top-left {
    top: 30px;
    left: 30px;
}

/* ===== 18. نوار پیشرفت مطالعه ===== */
.ae-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #f1f1f1;
    z-index: 9999;
}
.ae-progress-fill {
    height: 100%;
    background: #007bff;
    width: 0%;
    transition: width 0.1s linear;
}

/* ===== 19. باکس منابع ===== */
.ae-sources {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 14px;
}
.ae-sources h5 {
    margin: 0 0 10px 0;
}

/* ===== 20. دکمه اشتراک‌گذاری ===== */
.ae-share {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.ae-share a, .ae-share button {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}
.ae-share a:hover, .ae-share button:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ===== ویجت نویسنده (اضافه به فوتر) ===== */
.ae-author-box {
    display: flex;
    gap: 20px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    align-items: center;
    flex-wrap: wrap;
}
.ae-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ae-author-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}
.ae-author-bio {
    margin: 5px 0;
    color: #666;
}
.ae-author-socials {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.ae-author-socials a {
    text-decoration: none;
    color: #007bff;
}

/* ===== مقالات مرتبط ===== */
.ae-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.ae-related-item {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}
.ae-related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.ae-related-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.ae-related-title {
    padding: 15px;
    font-weight: bold;
    display: block;
}

/* ===== دکمه بازگشت به بالا ===== */
.ae-back-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #007bff;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
    border: none;
    cursor: pointer;
}
.ae-back-top.show {
    opacity: 1;
    visibility: visible;
}
.ae-back-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
}

/* ===== ریسپانسیو موبایل ===== */
@media (max-width: 768px) {
    .ae-grid-2, .ae-grid-3 {
        grid-template-columns: 1fr;
    }
    .ae-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .ae-testimonial-track {
        animation-duration: 40s;
    }
    .ae-testimonial {
        flex: 0 0 280px;
    }
    .ae-btns {
        flex-direction: column;
    }
    .ae-btns .ae-btn {
        text-align: center;
    }
    .ae-countdown-display {
        font-size: 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .ae-countdown-display span {
        font-size: 20px;
        min-width: 50px;
        padding: 8px 12px;
    }
    .ae-author-box {
        flex-direction: column;
        text-align: center;
    }
    .ae-author-socials {
        justify-content: center;
    }
    .ae-related {
        grid-template-columns: 1fr;
    }
    .ae-tabs-nav {
        flex-direction: column;
    }
    .ae-tab-btn {
        border-radius: 8px;
    }
    .ae-floating {
        padding: 12px 18px;
        font-size: 14px;
    }
    .ae-floating-bottom-right {
        bottom: 20px;
        right: 20px;
    }
    .ae-share {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ae-stats {
        grid-template-columns: 1fr 1fr;
    }
    .ae-stat-number {
        font-size: 28px;
    }
    .ae-quote-text {
        font-size: 16px;
    }
    .ae-cta {
        padding: 20px;
    }
    .ae-cta h3 {
        font-size: 18px;
    }
}