/*
Theme Name: Educational App Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: قالب تطبيق تعليمي احترافي بتصميم الجوال
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: educational-app
Tags: education, lms, mobile-app, rtl

هذا القالب يحاكي تطبيق تعليمي بتصميم عصري
*/

:root {
    --primary-color: #4F46E5;
    --secondary-color: #818CF8;
    --bg-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --accent: #F59E0B;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 16px;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #e5e5e5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* حاوية التطبيق */
.app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    position: relative;
    min-height: 100vh;    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding-bottom: calc(var(--nav-height) + 20px);
    overflow-x: hidden;
}

/* الهيدر */
header {
    background: var(--card-bg);
    padding: 20px 20px 10px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    box-shadow: var(--shadow);
    z-index: 10;
    position: sticky;
    top: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info h2 {
    font-size: 1.2rem;
    color: var(--text-dark);
}

.user-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--primary-color);
}

/* البحث */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;    padding: 12px 45px 12px 15px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* التصنيفات */
.categories-wrapper {
    padding: 20px 0;
}

.section-title {
    padding: 0 20px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.categories {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 0 20px;
    scrollbar-width: none;
}

.categories::-webkit-scrollbar {
    display: none;
}

.cat-item {
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 12px;    white-space: nowrap;
    font-weight: 500;
    color: var(--text-light);
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
    display: inline-block;
}

.cat-item.active,
.cat-item:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.4);
}

/* شبكة الكورسات */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px;
}

.course-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
}

.course-card:active {
    transform: scale(0.98);
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-img {
    width: 100%;
    height: 120px;
    object-fit: cover;}

.course-content {
    padding: 12px;
}

.course-cat {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.course-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.rating {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
}

.price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
}

.price span {
    font-size: 0.7rem;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 4px;    font-weight: 400;
}

/* القائمة السفلية */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: 0.3s;
    width: 60px;
    height: 100%;
    position: relative;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: 0.3s;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary-color);
}
.nav-item.active i {
    transform: translateY(-5px);
}

.nav-center-btn {
    background: var(--primary-color);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -35px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.4);
    border: 4px solid var(--bg-color);
    font-size: 1.5rem;
    text-decoration: none;
}

/* الصفحات */
.page-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none;
}

/* تحسينات التجاوب */
@media (max-width: 480px) {
    .app-container {
        max-width: 100%;
    }
    
    .bottom-nav {
        max-width: 100%;
    }
}

/* تنسيقات إضافية للمحتوى */
.no-courses {
    text-align: center;
    padding: 50px 20px;    color: var(--text-light);
}

.no-courses i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* تحميل المزيد */
.load-more {
    text-align: center;
    padding: 20px;
    width: 100%;
}

.load-more button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}