/* تنسيقات عامة */
:root {
    --primary-color: #3454D1;
    --primary-dark: #283CAB;
    --secondary-color: #34C759;
    --secondary-dark: #24A846;
    --dark-color: #333333;
    --light-color: #f8f9fc;
    --transition: all 0.3s ease;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --header-height: 80px; /* ارتفاع الهيدر - مهم لتحديد المساحة */
    
    /* ألوان الوضع الفاتح (الافتراضي) */
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fc;
    --text-color: #333333;
    --text-secondary: #555555;
    --border-color: #e9ecef;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.98);
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --dropdown-bg: #ffffff;
}

/* تنسيقات الوضع الداكن */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --bg-secondary: #252525;
    --text-color: #f0f0f0;
    --text-secondary: #cccccc;
    --border-color: #333333;
    --card-bg: #2d2d2d;
    --navbar-bg: rgba(26, 26, 26, 0.9);
    --navbar-scrolled-bg: rgba(26, 26, 26, 0.98);
    --input-bg: #333333;
    --input-border: #444444;
    --dropdown-bg: #333333;
    --header-height: 80px; /* ارتفاع الهيدر - للوضع الداكن */
}

/* تنسيقات إصلاح مشكلة الهيدر الذي يحجب المحتوى */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

/* مساحة للموقع لتجنب تداخل الهيدر مع المحتوى */
body {
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* عنصر main ليأخذ كامل المساحة المتاحة */
main {
    flex: 1;
}

/* إصلاح بعض المشاكل المحتملة في الصفحات المختلفة */
.hero-section {
    margin-top: 0 !important;
}

/* التعديلات للشاشات الصغيرة */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }
    [data-theme="dark"] {
        --header-height: 70px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 60px;
    }
    [data-theme="dark"] {
        --header-height: 60px;
    }
}

/* تحسين عرض شريط التنقل */
.navbar {
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* لتحسين التفاعل مع شريط التنقل - إظهاره عند التمرير للأعلى */
.navbar-hidden {
    transform: translateY(-100%);
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    color: var(--text-color);
    background-color: var(--bg-color);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* تنسيقات القسم الرئيسي - بسيط واحترافي */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fc, #ffffff);
    overflow: hidden;
    padding: 80px 0;
    box-shadow: inset 0 -10px 20px -5px rgba(0, 0, 0, 0.05);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/subtle-pattern.svg');
    background-size: 200px;
    background-repeat: repeat;
    opacity: 0.1;
    z-index: 1;
}

/* إضافة طبقة الـمتدرج اللوني على الخلفية */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom right, rgba(52, 84, 209, 0.08) 0%, transparent 70%),
                radial-gradient(ellipse at top left, rgba(52, 199, 89, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* تنسيقات المحتوى */
.hero-content {
    position: relative;
    z-index: 10;
    padding: 20px 0;
}

/* تنسيقات الصورة */
.hero-image {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-image:hover img {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* تنسيقات العنوان */
.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    line-height: 1.3;
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(52, 84, 209, 0.2);
    border-radius: 4px;
    z-index: -1;
}

/* تنسيقات الوصف */
.hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* تنسيقات الإحصائيات */
.quick-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(52, 84, 209, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.stat-info {
    display: flex;
        flex-direction: column;
    }
    
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.stat-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* تنسيقات الأزرار */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* تنسيقات للوضع الداكن */
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a1a, #252525);
}

[data-theme="dark"] .hero-section::before {
    background: radial-gradient(ellipse at bottom right, rgba(52, 84, 209, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse at top left, rgba(52, 199, 89, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .hero-title {
    color: var(--light-color);
}

[data-theme="dark"] .hero-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-number {
    color: var(--light-color);
}

[data-theme="dark"] .stat-icon {
    background-color: rgba(52, 84, 209, 0.2);
}

/* تنسيقات للشاشات المتوسطة */
@media (max-width: 992px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .quick-stats {
        gap: 1.5rem;
    }
}

/* تنسيقات للشاشات الصغيرة */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
        min-height: auto;
}

    .hero-content {
        text-align: center;
        padding: 20px 0 40px;
}

    .hero-title {
        font-size: 2rem;
}

    .hero-description {
        font-size: 1rem;
}

    .quick-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-actions {
    justify-content: center;
}

    .hero-image {
        margin-bottom: 30px;
    }
}

/* تنسيقات للشاشات الصغيرة جداً */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
}

    .hero-description {
        font-size: 0.95rem;
}

    .quick-stats {
        gap: 1rem;
}

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
}

    .stat-number {
        font-size: 1.3rem;
}

    .stat-title {
        font-size: 0.8rem;
}

    .hero-actions {
        flex-direction: column;
}
}

/* تحسين ظهور خلفية الصفحة الرئيسية في الوضع الداكن */
[data-theme="dark"] .hero-hexagon-bg {
    background-image: url('../images/hexagon-pattern.svg');
    background-size: 800px;
    background-repeat: repeat;
    opacity: 0.2 !important;
    z-index: 1;
}

[data-theme="dark"] .hero-english-bg {
    background-image: url('../images/english-pattern.svg');
    background-size: 800px;
    background-repeat: repeat;
    opacity: 0.2 !important;
    z-index: 1;
    animation: slowMove 60s linear infinite;
}

/* إضافة خلفية متدرجة للصفحة الرئيسية في الوضع الداكن */
[data-theme="dark"] .hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7), rgba(38, 38, 38, 0.7));
    z-index: -1;
}

/* تحسين رؤية العناصر الدائرية في الخلفية في الوضع الداكن */
[data-theme="dark"] .hero-circle {
    opacity: 0.7;
    background: linear-gradient(135deg, #24A846, #1c8235);
}

[data-theme="dark"] .hero-accent {
    opacity: 0.7;
    background: linear-gradient(135deg, #283CAB, #1e2d7e);
}

/* ضمان ظهور النماذج في الوضع الداكن */
[data-theme="dark"] .topography-bg,
[data-theme="dark"] .testimonials::before,
[data-theme="dark"] .cta-section::before,
[data-theme="dark"] .footer-top::before {
    opacity: 0.1 !important;
}

/* تعديلات الوضع الداكن */
[data-theme="dark"] .testimonial-card {
    background-color: var(--card-bg);
}

[data-theme="dark"] .testimonial-card:hover::before {
    opacity: 0.1;
}

[data-theme="dark"] .testimonial-text {
    color: var(--text-color);
}

[data-theme="dark"] .author-title {
    color: var(--text-secondary);
}

[data-theme="dark"] .footer-top {
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
}

[data-theme="dark"] .subscribe-form .form-control {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .stat-card {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .feature-icon {
    background: rgba(52, 84, 209, 0.15);
}

[data-theme="dark"] .feature-card:hover .feature-icon {
    background: var(--primary-color);
}

[data-theme="dark"] .feature-card::before {
    background: linear-gradient(135deg, rgba(52, 84, 209, 0.05), rgba(28, 200, 138, 0.05));
}

[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

[data-theme="dark"] .dropdown-divider {
    border-color: var(--border-color);
}

[data-theme="dark"] .navbar-collapse {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .user-toggle {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .auth-btn-login {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .user-dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* إزالة الزر القديم للوضع الداكن */
body .theme-toggle {
    display: none;
}

/* إزالة خطوط تحت النصوص في جميع أنحاء الموقع */
a, a:hover, a:focus, a:active, 
.nav-link, .nav-link:hover, .nav-link:focus, .nav-link:active,
.dropdown-item, .dropdown-item:hover, .dropdown-item:focus, .dropdown-item:active,
.footer-links a, .footer-links a:hover, .footer-links a:focus, .footer-links a:active,
.footer-bottom-links a, .footer-bottom-links a:hover, .footer-bottom-links a:focus, .footer-bottom-links a:active,
.breadcrumb-item a, .breadcrumb-item a:hover, .breadcrumb-item a:focus, .breadcrumb-item a:active,
.btn, .btn:hover, .btn:focus, .btn:active,
.btn-custom, .btn-custom:hover, .btn-custom:focus, .btn-custom:active {
    text-decoration: none !important;
}

/* التأكد من إزالة underline-animation بشكل كامل */
.underline-animation, .underline-animation:hover, .underline-animation:focus, .underline-animation:active {
    text-decoration: none !important;
}

.underline-animation::after, 
.underline-animation:hover::after,
.underline-animation:focus::after,
.underline-animation:active::after {
    display: none !important;
}

/* التأكد من إزالة جميع pseudo-elements التي قد تضيف خطوط */
*::after, *::before {
    text-decoration: none !important;
}

/* إزالة تنسيقات خط التأكيد في breadcrumb */
.breadcrumb-item + .breadcrumb-item::before {
    text-decoration: none !important;
}

/* تحسين تجربة المستخدم دون خطوط */
.nav-link:hover, .dropdown-item:hover, a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* زيادة تباين الألوان لتعويض غياب الخطوط */
.footer-links a:hover, .footer-bottom-links a:hover {
    color: var(--secondary-color);
}

/* تأثيرات بديلة عن الخطوط */
.navbar-nav .nav-link:hover {
    background-color: rgba(52, 84, 209, 0.05);
    border-radius: 8px;
}

/* تحسينات لوحة التحكم الخاصة بالطالب */
.dashboard-sidebar {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.bg-gradient-primary {
    background: linear-gradient(45deg, #4e73df, #224abe);
}

.bg-gradient-secondary {
    background: linear-gradient(45deg, #6c757d, #495057);
}

.bg-gradient-info {
    background: linear-gradient(45deg, #36b9cc, #258391);
}

.welcome-card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
}

.welcome-icon {
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.dashboard-stat-card {
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.bg-primary-light {
    background-color: rgba(78, 115, 223, 0.1);
}

.bg-success-light {
    background-color: rgba(40, 167, 69, 0.1);
}

.bg-info-light {
    background-color: rgba(54, 185, 204, 0.1);
}

.stat-title {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #6c757d;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2e3338;
}

.course-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}

.course-image-container {
    position: relative;
    overflow: hidden;
    height: 140px;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image {
    transform: scale(1.1);
}

.course-title {
    font-size: 1rem;
    font-weight: 600;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-excerpt {
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.empty-state {
    padding: 30px 15px;
}

.student-avatar {
    border: 3px solid #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* تحسينات القائمة الجانبية */
.list-group-item-action {
    border-right: 4px solid transparent;
    transition: all 0.2s ease;
}

.list-group-item-action:hover {
    background-color: rgba(78, 115, 223, 0.05);
    border-right-color: rgba(78, 115, 223, 0.5);
}

.list-group-item-action.active {
    background-color: rgba(78, 115, 223, 0.1);
    color: #4e73df;
    border-right-color: #4e73df;
    font-weight: 600;
}

.list-group-item-action.active i {
    color: #4e73df;
}

/* تحسينات إضافية للقائمة الجانبية للطالب */
.sidebar-nav .list-group-item-action {
    border-right: 4px solid transparent;
    transition: all 0.3s ease;
    border-left: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.sidebar-nav .list-group-item-action::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(78, 115, 223, 0.05);
    transition: all 0.4s ease;
    z-index: -1;
}

.sidebar-nav .list-group-item-action:hover::before {
    right: 0;
}

.sidebar-nav .list-group-item-action .icon-container {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(78, 115, 223, 0.05);
    color: #6c757d;
    transition: all 0.3s ease;
}

.sidebar-nav .list-group-item-action:hover {
    background-color: transparent;
    border-right-color: rgba(78, 115, 223, 0.5);
}

.sidebar-nav .list-group-item-action:hover .icon-container {
    color: #4e73df;
    transform: scale(1.1);
    background-color: rgba(78, 115, 223, 0.1);
}

.sidebar-nav .list-group-item-action.active {
    background-color: rgba(78, 115, 223, 0.1);
    color: #4e73df;
    border-right-color: #4e73df;
    font-weight: 600;
}

.sidebar-nav .list-group-item-action.active .icon-container {
    color: #fff;
    background-color: #4e73df;
    box-shadow: 0 0 10px rgba(78, 115, 223, 0.5);
}

.sidebar-divider {
    border-color: rgba(0, 0, 0, 0.1);
    margin: 0.75rem 0;
    height: 0;
    opacity: 0.2;
}

.user-avatar-container {
    transition: all 0.4s ease;
    position: relative;
}

.user-avatar-container::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(78, 115, 223, 0.5), transparent);
    transition: all 0.4s ease;
}

.user-avatar-container:hover::after {
    width: 80%;
}

.dashboard-sidebar .card-header {
    position: relative;
    overflow: hidden;
    padding: 1rem 1.25rem;
}

.dashboard-sidebar .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
}

.dashboard-sidebar:hover .card-header::before {
    animation: cardHeaderGlow 1.5s linear;
}

.sidebar-nav .list-group-item-action.text-danger {
    border-right-color: transparent;
}

.sidebar-nav .list-group-item-action.text-danger:hover {
    border-right-color: #dc3545;
    color: #dc3545 !important;
}

.sidebar-nav .list-group-item-action.text-danger .icon-container {
    color: #dc3545;
}

.sidebar-nav .list-group-item-action.text-danger:hover .icon-container {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

@keyframes cardHeaderGlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

.dashboard-sidebar {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1) !important;
}

.dashboard-sidebar:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}

/* تحسين شكل الشارات */
.sidebar-nav .badge {
    transition: all 0.3s ease;
}

.sidebar-nav .list-group-item-action:hover .badge {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* تحسين ارتفاع أيقونة حساب المستخدم */
.user-avatar-container .rounded-circle {
    transition: all 0.3s ease;
    transform-origin: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar-container:hover .rounded-circle {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* التأثيرات الحركية الإضافية */
.sidebar-nav .list-group-item-action:active {
    transform: scale(0.98);
}

/* تحسين شكل الهوفر لرابط المعلم الجديد */
.sidebar-nav a[target="_blank"] .icon-container {
    background-color: rgba(52, 191, 163, 0.1);
    color: #34bfa3;
}

.sidebar-nav a[target="_blank"]:hover .icon-container {
    background-color: rgba(52, 191, 163, 0.2);
    color: #34bfa3;
    transform: scale(1.1) rotate(10deg);
}

.sidebar-nav a[target="_blank"]:hover {
    border-right-color: #34bfa3;
}

/* تصحيح مسارات الصور في صفحة index.php */
.course-card .course-image-container img[src*="/storage/uploads/courses/"],
.courses-section .course-card .course-image img,
.course-card .card-img-top {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* تصحيح مسارات الصور في صفحة my-courses.php */
.course-card .course-image-container img[src*="/assets/uploads/courses/"] {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* تصحيح مسارات الصور العامة */
.course-card .course-image-container img[src*="//storage/uploads/courses/"] {
    height: 200px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* تحديد صورة بديلة في حالة عدم وجود الصورة */
.course-image-container img.card-img-top[src*="onerror"] {
    content: url("../images/default-course.jpg");
}

/* قاعدة قوية لضمان أن جميع النصوص في الـfooter تكون بيضاء */
.footer, .footer p, .footer a, .footer span, .footer div, 
.footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6,
.footer-links a, .footer-contact .contact-text span, .footer-about p, 
.footer-title, .subscribe-title, .copyright, .footer-bottom-links a {
    color: #fff !important;
}

/* تنسيقات لقسم البحث والتصفية في صفحة الكورسات */
.search-filter-section {
    padding-top: 2rem;
    margin-top: 0;
    background-color: var(--light-bg);
}

.search-form {
    max-width: 500px;
    margin-left: auto;
    position: relative;
}

.search-form .form-control {
    height: calc(2.5rem + 2px);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 50px 0 0 50px;
    border: 2px solid transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.15);
}

.search-form .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0 50px 50px 0;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.search-form .btn:hover {
    background: var(--primary-dark);
    transform: translateX(-3px);
}

.filter-section {
    position: relative;
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 2;
}

[data-theme="dark"] .filter-section {
    background-color: var(--card-bg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.filters-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    margin: 0.25rem;
    border-radius: 50px;
    color: var(--text-color);
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

[data-theme="dark"] .filter-btn {
    background-color: #2d2d2d;
    border-color: #333;
    color: #e0e0e0;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary-color);
}

.alert-info {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}
  
/* تنسيقات عامة للأقسام */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* ألوان علامات المواد الدراسية */
.badge-math {
    background: linear-gradient(135deg, #1E88E5, #0D47A1);
}

.badge-arabic {
    background: linear-gradient(135deg, #43A047, #1B5E20);
}

.badge-english {
    background: linear-gradient(135deg, #039BE5, #01579B);
}

.badge-physics {
    background: linear-gradient(135deg, #3949AB, #1A237E);
}

.badge-chemistry {
    background: linear-gradient(135deg, #E53935, #B71C1C);
}

.badge-biology {
    background: linear-gradient(135deg, #7CB342, #33691E);
}

.badge-history {
    background: linear-gradient(135deg, #8D6E63, #4E342E);
}

.badge-geography {
    background: linear-gradient(135deg, #00ACC1, #006064);
}

.badge-religion {
    background: linear-gradient(135deg, #5E35B1, #311B92);
}

.badge-science {
    background: linear-gradient(135deg, #00897B, #004D40);
}

.badge-computer {
    background: linear-gradient(135deg, #546E7A, #263238);
}

.badge-default {
    background: linear-gradient(135deg, #757575, #424242);
}

/* الألوان المميزة للمواد */
.text-primary {
    color: var(--physics-color);
    font-weight: 700;
}

.text-secondary {
    color: var(--chemistry-color);
    font-weight: 700;
}

/* تنسيق رأس القسم */
.section-header {
    margin-bottom: 3rem;
    position: relative;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
    color: var(--accent-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: var(--text-color);
}

.section-title::after {
    content: attr(data-text);
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    color: var(--text-color);
    font-size: 2.5rem;
    opacity: 0.05;
    font-weight: 800;
    white-space: nowrap;
    filter: blur(2px);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 1rem;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    max-width: 300px;
}

.divider-line {
    height: 3px;
    flex-grow: 1;
    background: linear-gradient(to right, rgba(var(--primary-rgb), 0.1), rgba(var(--primary-rgb), 0.5));
    border-radius: 3px;
}

.divider-line:last-child {
    background: linear-gradient(to left, rgba(var(--secondary-rgb), 0.1), rgba(var(--secondary-rgb), 0.5));
}

.divider-icon {
    margin: 0 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1rem;
    transform: rotate(10deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* أزرار القسم */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    background: linear-gradient(to right, var(--physics-color), var(--chemistry-color));
    color: white;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-view-all:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(to right, var(--chemistry-color), var(--physics-color));
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-view-all:hover:before {
    width: 100%;
    right: auto;
    left: 0;
}

.btn-view-all:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: white;
}

/* كروت الكورسات */
.course-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.course-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 30px;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.course-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.course-card:hover .course-overlay {
    opacity: 0.8;
}

.course-badge {
    position: absolute;
    right: 15px;
    top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.badge-physics {
    background: var(--physics-gradient);
}

.badge-chemistry {
    background: var(--chemistry-gradient);
}

.course-card:hover .course-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.course-content {
    padding: 25px;
    position: relative;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    padding-right: 3px;
}

.course-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    bottom: -7px;
    right: 0;
    background: linear-gradient(to right, var(--physics-color), var(--chemistry-color));
    transition: width 0.3s ease;
}

.course-card:hover .course-title {
    color: var(--physics-color);
}

.course-card:hover .course-title::after {
    width: 70px;
}

.course-desc {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--physics-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.course-card:hover .meta-item i {
    transform: scale(1.15);
    color: var(--chemistry-color);
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--physics-color);
    font-weight: 600;
    padding: 8px 15px;
    background-color: rgba(var(--physics-rgb), 0.08);
    border-radius: 30px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.course-card:hover .teacher-info {
    background-color: rgba(var(--physics-rgb), 0.15);
}

[data-theme="dark"] .teacher-info {
    background-color: rgba(var(--physics-rgb), 0.15);
    color: #a3d4e3;
}

.teacher-info i {
    color: var(--chemistry-color);
    transition: all 0.3s ease;
}

.course-card:hover .teacher-info i {
    transform: rotate(5deg) scale(1.1);
}

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

.course-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--chemistry-color);
    font-size: 1.1rem;
}

.course-price i {
    font-size: 1rem;
    color: var(--accent-color);
}

.btn-course-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: transparent;
    color: var(--physics-color);
    border: 2px solid var(--physics-color);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-course-details:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--physics-color), var(--chemistry-color));
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-course-details:hover:before {
    width: 100%;
    right: auto;
    left: 0;
}

.btn-course-details:hover {
    color: white;
    border-color: transparent;
}

.btn-course-details i {
    transition: transform 0.3s ease;
}

.btn-course-details:hover i {
    transform: translateX(-5px);
}

/* حالة الفارغة */
.empty-state {
    background-color: var(--background-light);
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--physics-color);
    opacity: 0.7;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--physics-color);
}

.empty-text {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .course-meta {
        flex-wrap: wrap;
        gap: 10px;
}

.course-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
}

.course-tag {
    font-size: 0.75rem;
    padding: 4px 12px;
}

.btn-view-all {
    font-size: 0.95rem;
    padding: 8px 18px;
}
}

@media (max-width: 768px) {
    .course-title {
        font-size: 1.2rem;
    }
    
    .course-desc {
        font-size: 0.9rem;
    }
    
    .meta-item i {
        font-size: 0.9rem;
    }
    
    .teacher-info {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .course-price {
        font-size: 1rem;
    }
    
    .btn-course-details {
        font-size: 0.9rem;
        padding: 7px 18px;
    }
}

@media (max-width: 576px) {
    .course-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .btn-course-details {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
    }
    
    .course-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .course-tag {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    
    .btn-view-all {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
    
    .course-image {
        height: 180px;
    }
}

@media (max-width: 375px) {
    .course-title {
        font-size: 1rem;
    }
    
    .course-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
    }
    
    .meta-item {
        font-size: 0.7rem;
    }
    
    .meta-item i {
        font-size: 0.8rem;
    }
    
    .teacher-info {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .course-price {
        font-size: 0.9rem;
    }
    
    .btn-course-details {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .course-badge, .course-tag {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    .btn-view-all {
        font-size: 0.8rem;
        padding: 7px 14px;
    }
    
    .course-image {
        height: 160px;
    }
}

/* تنسيقات محسّنة لقسم آراء الطلاب - الجزء الرابع: تحسين الأداء والوصولية */
.testimonials-section {
    padding: 100px 0;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.testimonials-pattern {
    position: absolute;
    width: 500px;
    height: 500px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.05;
    pointer-events: none; /* تحسين تجربة المستخدم */
    will-change: transform; /* تحسين الأداء */
}

.physics-pattern {
    background-image: url('<?php echo SITE_URL; ?>/public/assets/images/atom-large.png');
    top: -100px;
    right: -100px;
    animation: floatPattern 20s ease-in-out infinite alternate;
    transform: translateZ(0); /* تفعيل تسريع الهاردوير */
}

.chemistry-pattern {
    background-image: url('<?php echo SITE_URL; ?>/public/assets/images/molecule-large.png');
    bottom: -100px;
    left: -100px;
    animation: floatPattern 25s ease-in-out infinite alternate-reverse;
    transform: translateZ(0); /* تفعيل تسريع الهاردوير */
}

@keyframes floatPattern {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 30px) rotate(10deg); }
}

.testimonial-slider {
    position: relative;
    padding: 30px 0;
}

.testimonial-slide-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    gap: 30px;
    padding: 20px 10px;
    margin: 0 -10px;
    scroll-snap-type: x mandatory; /* تحسين التمرير على الموبايل */
}

.testimonial-slide-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.testimonial-slide {
    flex: 0 0 auto;
    width: calc(33.333% - 20px);
    transition: all 0.3s ease;
    scroll-snap-align: start; /* تحسين التمرير على الموبايل */
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.4s ease;
    height: 100%;
    overflow: hidden;
    direction: rtl;
    border: 1px solid rgba(0, 0, 0, 0.05);
    contain: content; /* تحسين الأداء */
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    transition: all 0.3s ease;
}

.physics-theme:before {
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.chemistry-theme:before {
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
}

.testimonial-quote {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.1;
    color: var(--primary-color);
}

.testimonial-rating {
    margin-bottom: 20px;
    display: flex;
    direction: ltr;
}

.testimonial-rating i {
    color: #FFD700;
    margin-right: 3px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    min-height: 5.6rem; /* تثبيت الارتفاع لمنع القفز */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.testimonial-author {
    display: flex;
    align-items: center;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    padding-top: 20px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 15px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    will-change: transform; /* تحسين أداء التحويلات */
}

.testimonial-card:hover .author-avatar {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--text-color);
}

.author-title {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.physics-theme .author-name {
    color: var(--primary-color);
}

.chemistry-theme .author-name {
    color: var(--secondary-color);
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative; /* تحسين الوصولية */
    z-index: 2; /* تحسين الوصولية */
}

.nav-btn:hover, .nav-btn:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
    outline: none; /* تحسين الوصولية */
}

.nav-btn:focus-visible {
    outline: 2px solid var(--primary-color); /* تحسين الوصولية */
    outline-offset: 2px;
}

/* تحسين إمكانية الوصول */
.testimonial-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* تنسيقات الوضع الداكن */
[data-theme="dark"] .testimonials-section {
    background: #1a1a1a;
}

[data-theme="dark"] .testimonials-pattern {
    opacity: 0.1;
}

[data-theme="dark"] .testimonial-card {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .testimonial-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .testimonial-quote {
    color: var(--primary-color);
}

[data-theme="dark"] .testimonial-text {
    color: #aaa;
}

[data-theme="dark"] .testimonial-author {
    border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .author-avatar {
    border-color: #2d2d2d;
}

[data-theme="dark"] .author-name {
    color: #eee;
}

[data-theme="dark"] .author-title {
    color: #aaa;
}

[data-theme="dark"] .nav-btn {
    background: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
    .testimonial-slide {
        width: calc(50% - 15px);
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .author-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .testimonial-slide {
        width: 100%;
    }
    
    .testimonial-card {
        padding: 25px;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        -webkit-line-clamp: 4;
        min-height: 6.8rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .testimonial-quote {
        font-size: 1.5rem;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .author-title {
        font-size: 0.8rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 375px) {
    .testimonial-card {
        padding: 15px;
    }
    
    .testimonial-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 5;
        min-height: 7.5rem;
    }
    
    .testimonial-rating i {
        font-size: 0.9rem;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
    }
    
    .author-name {
        font-size: 0.9rem;
    }
    
    .author-title {
        font-size: 0.75rem;
    }
}




    /* تم إزالة التنسيقات القديمة واستخدام التنسيقات من ملف custom.css */
    .text-physics {
        color: var(--primary-color);
    }
    .text-chemistry {
        color: var(--secondary-color);
    }

    /* تنسيقات قسم المدرسين */
    .teachers-section {
        background-color: #f8f9fa;
        position: relative;
        overflow: hidden;
        padding: 100px 0;
        background-image: linear-gradient(to bottom, #f8f9fa, #fff);
    }

    .teachers-bg-pattern {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.05;
        background-image: radial-gradient(var(--primary-color) 2px, transparent 2px), 
                        radial-gradient(var(--secondary-color) 2px, transparent 2px);
        background-size: 30px 30px;
        background-position: 0 0, 15px 15px;
        animation: patternMove 30s linear infinite;
    }

    @keyframes patternMove {
        0% {
            background-position: 0 0, 15px 15px;
        }
        100% {
            background-position: 100px 100px, 115px 115px;
        }
    }

    .teacher-card {
        background-color: #fff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        height: 100%;
        position: relative;
        direction: rtl;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .teacher-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        border-color: rgba(var(--primary-rgb), 0.2);
    }

    .teacher-card:after {
        content: '';
        position: absolute;
        z-index: -1;
        width: 100%;
        height: 100%;
        opacity: 0;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(var(--primary-rgb), 0.3);
        transition: opacity 0.4s ease-in-out;
    }

    .teacher-card:hover:after {
        opacity: 1;
    }

    .teacher-image {
        position: relative;
        overflow: hidden;
        height: 240px;
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    }

    .teacher-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.7s ease;
        filter: brightness(0.95);
    }

    .teacher-card:hover .teacher-image img {
        transform: scale(1.08) rotate(1deg);
        filter: brightness(1.05);
    }

    .teacher-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60%;
        background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }

    .teacher-card:hover .teacher-overlay {
        opacity: 0.9;
    }

    .teacher-content {
        padding: 25px;
        position: relative;
        z-index: 1;
    }

    .teacher-name {
        color: var(--text-color);
        font-size: 1.35rem;
        margin-bottom: 5px;
        font-weight: 700;
        position: relative;
        display: inline-block;
    }

    .teacher-name:after {
        content: '';
        position: absolute;
        width: 40%;
        height: 3px;
        background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
        bottom: -5px;
        right: 0;
        transition: width 0.3s ease;
    }

    .teacher-card:hover .teacher-name:after {
        width: 80%;
    }

    .teacher-specialty {
        color: #6c757d;
        margin-bottom: 15px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .teacher-specialty:before {
        content: '\f51c';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        color: var(--primary-color);
        font-size: 0.9rem;
    }

    .teacher-subject {
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        font-weight: 600;
    }

    .teacher-bio {
        margin-bottom: 20px;
        font-size: 0.9rem;
        color: #555;
        line-height: 1.6;
        padding: 15px;
        background-color: rgba(var(--primary-rgb), 0.03);
        border-radius: 10px;
        border-right: 3px solid var(--primary-color);
        position: relative;
    }

    .teacher-bio:before {
        content: '\f10d';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        position: absolute;
        top: -10px;
        right: 10px;
        font-size: 0.9rem;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .teacher-stats {
        display: flex;
        justify-content: space-between;
        margin-bottom: 25px;
        padding: 15px 0;
        border-top: 1px dashed rgba(0, 0, 0, 0.1);
        border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    }

    .teacher-stats .stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.85rem;
        transition: transform 0.3s ease;
    }

    .teacher-stats .stat:hover {
        transform: translateY(-5px);
    }

    .teacher-stats .stat i {
        font-size: 1.2rem;
        color: var(--primary-color);
        margin-bottom: 8px;
        transition: transform 0.3s ease;
    }

    .teacher-stats .stat:hover i {
        transform: scale(1.2);
        color: var(--secondary-color);
    }

    .teacher-stats .stat span {
        font-weight: 600;
    }

    .btn-teacher-courses {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: linear-gradient(to right, var(--primary-color), var(--primary-color));
        background-size: 200% auto;
        color: white;
        padding: 12px 20px;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.4s ease;
        box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.25);
        position: relative;
        overflow: hidden;
        z-index: 1;
    }

    .btn-teacher-courses:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
        opacity: 0;
        z-index: -1;
        transition: opacity 0.4s ease;
    }

    .btn-teacher-courses:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
        color: white;
    }

    .btn-teacher-courses:hover:before {
        opacity: 1;
    }

    .btn-teacher-courses i {
        transition: transform 0.3s ease;
    }

    .btn-teacher-courses:hover i {
        transform: translateX(-8px);
    }

    .teacher-badge {
        position: absolute;
        top: 15px;
        right: 15px;
        background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
        color: white;
        padding: 5px 15px;
        border-radius: 30px;
        font-size: 0.8rem;
        font-weight: 600;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .teacher-badge i {
        font-size: 0.9rem;
    }

    /* تنسيقات الوضع الداكن لقسم المدرسين */
    [data-theme="dark"] .teachers-section {
        background-color: #1a1a1a;
        background-image: linear-gradient(to bottom, #1a1a1a, #252525);
    }

    [data-theme="dark"] .teachers-bg-pattern {
        opacity: 0.1;
    }

    [data-theme="dark"] .teacher-card {
        background-color: #2d2d2d;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .teacher-card:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .teacher-card:after {
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] .teacher-image img {
        filter: brightness(0.85);
    }

    [data-theme="dark"] .teacher-card:hover .teacher-image img {
        filter: brightness(0.95);
    }

    [data-theme="dark"] .teacher-name {
        color: #f0f0f0;
    }

    [data-theme="dark"] .teacher-specialty {
        color: #cccccc;
    }

    [data-theme="dark"] .teacher-bio {
        color: #cccccc;
        background-color: rgba(var(--primary-rgb), 0.1);
        border-right-color: var(--primary-color);
    }

    [data-theme="dark"] .teacher-stats {
        border-top-color: rgba(255, 255, 255, 0.05);
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .teacher-stats .stat span {
        color: #e0e0e0;
    }

    [data-theme="dark"] .btn-teacher-courses {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .btn-teacher-courses:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    [data-theme="dark"] .teacher-badge {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    @media (max-width: 768px) {
        .teacher-image {
            height: 200px;
        }
        
        .teacher-stats {
            flex-wrap: wrap;
        }
        
        .teacher-stats .stat {
            flex: 0 0 33.333%;
            margin-bottom: 15px;
        }
        
        .btn-teacher-courses {
            width: 100%;
            padding: 12px 15px;
            justify-content: space-between;
        }
    }

    @media (max-width: 576px) {
        .btn-teacher-courses {
            font-size: 0.9rem;
            padding: 10px 15px;
        }
        
        .btn-teacher-courses i {
            margin-left: 5px;
        }
    }

    @media (max-width: 375px) {
        .btn-teacher-courses {
            padding: 8px 12px;
            font-size: 0.85rem;
        }
    }

    /* تنسيقات تجاوبية للنصوص */
    @media (max-width: 1200px) {
        .section-title {
            font-size: 2.3rem !important;
        }
        
        .section-subtitle {
            font-size: 1.15rem !important;
        }
    }

    @media (max-width: 992px) {
        .section-title {
            font-size: 2rem !important;
        }
        
        .section-subtitle {
            font-size: 1.05rem !important;
        }
    }

    @media (max-width: 768px) {
        .section-title {
            font-size: 1.8rem !important;
        }
        
        .section-subtitle {
            font-size: 0.95rem !important;
        }
    }

    @media (max-width: 576px) {
        .section-title {
            font-size: 1.7rem !important;
        }
        
        .section-subtitle {
            font-size: 0.9rem !important;
        }
    }

    @media (max-width: 375px) {
        .section-title {
            font-size: 1.5rem !important;
        }
        
        .section-subtitle {
            font-size: 0.85rem !important;
        }
        
        .section-title:after {
            font-size: 102% !important;
            opacity: 0.05 !important;
        }
    }

