:root {
    --primary: #034690;
    --secondary: #10B981;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-top: 4%;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Courses Section */
.courses-section {
    padding: 3rem 0;
}

.courses-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
}

/* Sidebar Filters */
.sidebar-filters {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.filters-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.filters-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-header i {
    color: var(--primary);
}

/* Category Group */
.category-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.category-header:hover {
    background: var(--light);
}

.category-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header i.fas:not(.toggle-icon) {
    color: var(--primary);
    font-size: 1.125rem;
}

.toggle-icon {
    color: var(--gray);
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.category-group.active .toggle-icon {
    transform: rotate(180deg);
}

/* Subcategories */
.subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 1rem;
}

.category-group.active .subcategories {
    max-height: 500px;
    padding: 0.5rem 1rem 1rem;
}

.subcategory-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.subcategory-option:hover {
    background: var(--light);
}

.subcategory-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.subcategory-option input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.subcategory-option input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--white);
    font-size: 0.75rem;
}

.label-text {
    font-size: 0.95rem;
    color: var(--dark);
}

.subcategory-option input[type="checkbox"]:checked ~ .label-text {
    color: var(--primary);
    font-weight: 600;
}

/* Clear Filters Button */
.clear-filters-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.clear-filters-btn:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

/* Courses Content */
.courses-content {
    min-height: 100vh;
}

.results-header {
    background: var(--white);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.results-count {
    font-size: 1.125rem;
    color: var(--gray);
    font-weight: 600;
}

.results-count span {
    color: var(--primary);
    font-weight: 700;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-description {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.instructor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.instructor-name {
    font-size: 0.9rem;
    color: var(--gray);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-info {
    display: flex;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.info-item i {
    color: var(--primary);
}

.course-price {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.no-results i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--gray);
}

/* Responsive */
@media (max-width: 1024px) {
    .courses-wrapper {
        grid-template-columns: 280px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .courses-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filters {
        position: static;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .course-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
.course-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.old-price {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
    font-weight: 500;
}

.new-price {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary);
}

.free-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

/* إذا عايز تعرضهم جنب بعض بدل فوق بعض */
.course-price.inline {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}
