/* 
فایل: style.css
ورژن: 1.0.0
تاریخ: ۲۰۲۴-۰۳-۲۰
توضیحات: استایل کامل آکادمی ریاضی آرش اوج خزر
*/

/* تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* هدر */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-section {
    text-align: center;
    margin-bottom: 1rem;
}

.logo {
    font-size: 2rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.tagline {
    color: #718096;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* بنر فروش دامنه */
.domain-banner {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.75rem 0;
    text-align: center;
    font-weight: bold;
}

.domain-phone {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-right: 0.5rem;
}

/* محتوای اصلی */
.main {
    padding: 2rem 0;
}

/* بخش جستجو */
.search-section {
    display: flex;
    margin-bottom: 2rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #5a6fd8;
}

/* فیلتر پایه‌ها */
.grade-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: white;
}

/* کانتینر پایه‌ها */
.grades-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grade-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.grade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.grade-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.grade-icon {
    font-size: 2rem;
}

.grade-title {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.grade-subtitle {
    color: #718096;
    font-size: 0.9rem;
}

.chapters-list {
    margin-top: 1rem;
}

.chapter-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f7fafc;
    border-radius: 8px;
    border-right: 4px solid #667eea;
    transition: background 0.3s;
}

.chapter-item:hover {
    background: #edf2f7;
}

/* بخش درس */
.lesson-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.back-btn {
    background: #718096;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #4a5568;
}

.lesson-progress {
    text-align: left;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #48bb78, #38a169);
    transition: width 0.3s;
}

.lesson-content {
    min-height: 400px;
}

.content-area {
    background: #f7fafc;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.content-area h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    border-right: 4px solid #667eea;
    padding-right: 1rem;
}

.example-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-right: 4px solid #48bb78;
}

.exercise-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px solid #e2e8f0;
}

.answer-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 1rem;
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

/* دکمه‌ها */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* مودال */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    display: block;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

/* فوتر */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.domain-sale {
    color: #ffd700;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* کلاس‌های کمکی */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .grade-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .grades-container {
        grid-template-columns: 1fr;
    }

    .lesson-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .lesson-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .modal-content {
        margin: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .search-section {
        flex-direction: column;
    }

    .search-input {
        border-radius: 25px;
        margin-bottom: 0.5rem;
    }

    .search-btn {
        border-radius: 25px;
        width: 100%;
    }
}