/* ============================================
   نظام أهل القرآن - ملف التصميم
   ============================================ */

/* ============================================
   Breadcrumbs Navigation Bar
   ============================================ */

.breadcrumb-bar {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: #FFFFFF !important;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    direction: rtl;
    text-align: right;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb-bar * {
    color: #FFFFFF !important;
}

.breadcrumb-bar a {
    color: #FFFFFF !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-bar a:hover {
    opacity: 0.8;
    text-decoration: underline;
    color: #FFFFFF !important;
}

.breadcrumb-bar span {
    color: #FFFFFF !important;
    margin: 0 8px;
}

.breadcrumb-bar i {
    color: #FFFFFF !important;
}

/* ============================================
   نظام أهل القرآن - ملف التصميم
   ============================================ */

:root {
    --primary-color: #00A8A8; /* Teal - أفتح وأوضح */
    --gold-color: #E6C547; /* ذهبي - أوضح */
    --dark-teal: #007A7A; /* Teal غامق - أوضح */
    --light-teal: #2BC4C4; /* Teal فاتح - أوضح */
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --gray: #CCCCCC;
    --dark-gray: #333333;
    --text-color: #1A1A1A; /* نص أغمق وأوضح */
    --border-color: #D0D0D0; /* حدود أوضح */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ============================================
   Header
   ============================================ */

.header {
    background: var(--white);
    color: var(--text-color);
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    direction: ltr !important;
    min-height: 80px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 15px 30px;
    gap: 20px;
    direction: ltr !important;
    background: var(--white);
    min-width: 0;
    flex-shrink: 1;
    position: relative;
}

.header-right {
    flex: 0 0 290px;
    width: 290px;
    min-width: 290px;
    max-width: 290px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 30px;
    direction: ltr !important;
    background: var(--dark-teal);
    flex-shrink: 0;
    box-sizing: border-box;
}

.logout-btn {
    background: transparent;
    color: var(--dark-teal);
    border: none;
    padding: 8px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    direction: ltr !important;
    flex-direction: row;
}

.logout-btn:hover {
    color: var(--primary-color);
    transform: translateX(-3px);
}

.logout-btn i {
    font-size: 16px;
}

.header-icons {
    display: flex;
    gap: 15px;
    direction: ltr !important;
    align-items: center;
    margin-left: 20px;
}

.icon-btn {
    background: transparent;
    color: var(--text-color);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    padding: 0;
    position: relative;
}

.icon-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.icon-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--gold-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 5px;
    pointer-events: none;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    direction: rtl;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

.sidebar-toggle-btn {
    background: var(--white);
    color: var(--dark-teal);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.logo {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--dark-teal);
    flex-shrink: 0;
}

.logo i {
    color: var(--dark-teal);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    line-height: 1.2;
}

.logo-text p {
    font-size: 11px;
    margin: 0;
    color: var(--white);
    opacity: 0.95;
    line-height: 1.2;
}

/* ============================================
   Main Container
   ============================================ */

.main-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    direction: ltr !important;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.main-container-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    max-height: 100%;
    position: relative;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.main-footer {
    order: 2;
    flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */

.main-footer {
    background: var(--dark-teal);
    color: var(--white);
    padding: 12px 30px;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    direction: rtl;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    order: 2;
    direction: rtl !important;
    transition: width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    flex-shrink: 0;
    flex-grow: 0;
    position: relative;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    border-left: 1px solid rgba(0, 139, 139, 0.1);
}

/* تحسين scrollbar للسايدبار */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 139, 139, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 139, 139, 0.5);
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(0, 139, 139, 0.1);
    margin-bottom: 15px;
    direction: rtl !important;
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 20px;
    left: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-color) 50%, transparent 100%);
}

.settings-icon {
    background: rgba(0, 139, 139, 0.1);
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    float: right;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.settings-icon:hover {
    transform: rotate(90deg);
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.user-profile {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    direction: rtl;
}

.profile-image-wrapper {
    position: absolute;
    top: -10px;
    right: -10px;
    z-index: 10;
}

.profile-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 139, 139, 0.2);
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 139, 139, 0.3);
    border-color: var(--gold-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    position: relative;
}

.online-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
    text-align: center;
    width: 100%;
}

.user-role {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.sidebar-nav {
    padding: 0 10px;
    direction: rtl !important;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    direction: rtl !important;
}

.nav-item {
    margin-bottom: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    justify-content: flex-start;
    position: relative;
    direction: rtl;
    border-right: 3px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gold-color);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(90deg, rgba(0, 168, 168, 0.1) 0%, rgba(0, 168, 168, 0.06) 100%);
    color: var(--primary-color);
    transform: translateX(-3px);
    padding-right: 20px;
    font-weight: 600;
}

.nav-link:hover::before {
    height: 60%;
}

.nav-item.active .nav-link {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 168, 168, 0.3);
    border-right-color: var(--gold-color);
    transform: translateX(-3px);
}

.nav-item.active .nav-link::before {
    height: 100%;
    background: var(--gold-color);
    box-shadow: 0 0 10px rgba(230, 197, 71, 0.4);
}

.nav-item.active.memorization-active .nav-link {
    background: linear-gradient(90deg, var(--gold-color) 0%, #D4A020 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(230, 197, 71, 0.4);
}

.nav-link span {
    text-align: right;
    flex: 1;
    margin: 0;
    padding: 0;
    order: 1;
    font-weight: inherit;
}

.nav-link i,
.nav-link ion-icon {
    width: 22px;
    height: 22px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: 2;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.nav-link:hover i,
.nav-link:hover ion-icon {
    transform: scale(1.1);
}

.nav-item.active .nav-link i,
.nav-item.active .nav-link ion-icon {
    transform: scale(1.15);
}

.nav-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gold-color) 0%, #B8941F 100%);
    color: #fff;
    border-radius: 12px;
    min-width: 24px;
    height: 20px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
}

.nav-section {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 139, 139, 0.1);
}

.nav-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-color);
    padding: 0 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    direction: rtl;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.3) 100%);
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    order: 1;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
}

/* تحسين scrollbar للصفحة الرئيسية */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--dark-teal);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card.gold {
    background: linear-gradient(135deg, var(--gold-color) 0%, #D4A020 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(230, 197, 71, 0.25);
}

.dashboard-card.gold * {
    color: var(--white) !important;
}

.dashboard-card.gold .card-icon {
    color: var(--white) !important;
}

.dashboard-card.gold .card-content h3 {
    color: var(--white) !important;
}

.dashboard-card.gold .card-number {
    color: var(--white) !important;
}

.dashboard-card.gold::before {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-card.teal {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 168, 168, 0.25);
}

.dashboard-card.teal *,
.dashboard-card.teal h3,
.dashboard-card.teal .card-icon,
.dashboard-card.teal .card-icon i,
.dashboard-card.teal .card-content,
.dashboard-card.teal .card-content h3,
.dashboard-card.teal .card-number {
    color: var(--white) !important;
}

.dashboard-card.teal::before {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-card.settings-highlight {
    background: var(--white);
    border: 3px solid #FF6B6B;
    color: var(--text-color);
}

.dashboard-card.settings-highlight::before {
    background: #FF6B6B;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-number {
    font-size: 32px;
    font-weight: 700;
    display: block;
    margin-top: 10px;
}

/* ============================================
   Login Page
   ============================================ */

.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--white);
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--gray);
    font-size: 13px;
}

/* ============================================
   Flash Messages
   ============================================ */

.flash-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.flash-error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.flash-info {
    background: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Responsive Grid - 4 columns max */
@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

.mobile-menu-dropdown {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 15px 20px;
    gap: 15px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

@media (min-width: 768px) {
    .mobile-menu-dropdown {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

.mobile-menu-dropdown.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0);
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-separator {
    display: none;
}

.mobile-menu-items {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 0;
    width: 100%;
}

.mobile-menu-items .logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--dark-teal);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.mobile-menu-items .logout-btn:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

.mobile-menu-items .logout-btn span {
    display: inline;
}

.mobile-menu-items .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    width: 35px;
    height: 35px;
    color: var(--text-color);
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.mobile-menu-items .icon-btn i {
    margin: 0;
    font-size: 18px;
}

.mobile-menu-items .icon-btn span {
    display: none;
}

.mobile-menu-items .icon-btn:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .header {
        flex-wrap: nowrap;
        padding: 0;
        min-height: 70px;
        height: 70px;
        justify-content: space-between;
        align-items: stretch;
        position: relative;
        z-index: 1001;
    }

    .header-left {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 15px;
        background: var(--white);
        position: relative;
        min-width: 0;
        overflow: visible;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-right {
        flex: 0 0 66%;
        width: 66%;
        min-width: 0;
        max-width: 66%;
        padding: 15px 20px 15px 15px;
        background: var(--dark-teal);
        justify-content: flex-end;
        align-items: center;
        border-top-left-radius: 40px;
        border-bottom-left-radius: 40px;
        position: relative;
        overflow: hidden;
    }

    .header-right::before {
        content: '';
        position: absolute;
        left: -25px;
        top: 0;
        width: 25px;
        height: 100%;
        background: var(--dark-teal);
        border-top-left-radius: 25px;
        border-bottom-left-radius: 25px;
    }

    .logo-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        direction: rtl;
    }

    .sidebar-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        background: var(--white);
        color: var(--dark-teal);
        border-radius: 8px;
        flex-shrink: 0;
    }

    .sidebar-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.9);
    }

    .logo-text {
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
        text-align: center;
        min-width: 0;
        padding: 0 5px;
    }

    .logo-text h1 {
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        color: var(--white);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .logo-text p {
        font-size: 12px;
        margin: 0;
        color: var(--white);
        opacity: 0.95;
        line-height: 1.3;
    }

    .logo {
        width: 45px;
        height: 45px;
        font-size: 18px;
        background: var(--white);
        border-radius: 8px;
        flex-shrink: 0;
    }

    .logo img {
        border-radius: 8px;
    }

    .logout-btn {
        display: none;
    }

    .header-icons {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-container {
        flex-direction: column;
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 70px;
        right: -280px;
        height: calc(100vh - 70px);
        width: 280px;
        z-index: 1002;
        transition: right 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        opacity: 0;
        visibility: hidden;
    }

    .sidebar.open {
        right: 0;
        opacity: 1;
        visibility: visible;
    }

    .sidebar.collapsed {
        right: -280px;
        opacity: 0;
        visibility: hidden;
    }

    .main-content {
        order: 1;
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .main-content {
        padding: 15px;
    }
    
    .dashboard-card {
        padding: 18px;
        min-height: 100px;
    }
    
    .card-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .card-content h3 {
        font-size: 15px;
    }
    
    .card-number {
        font-size: 24px;
    }

    .login-box {
        padding: 30px 20px;
    }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    animation: fadeIn 0.5s ease-out;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }

/* ============================================
   Settings Page
   ============================================ */

.settings-page {
    width: 100%;
    background: var(--light-gray);
    padding: 30px;
    margin: 0;
    direction: rtl;
}

.settings-container {
    max-width: 100%;
    margin: 0;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    direction: rtl;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.settings-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    background: var(--light-gray);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.settings-form {
    margin-top: 20px;
}

.settings-section {
    margin-bottom: 40px;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 10px;
}

.settings-section h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.color-input-wrapper .color-text {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 12px;
}

.current-logo {
    margin-bottom: 15px;
}

.current-logo img {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    direction: rtl;
}

.save-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cancel-btn {
    background: var(--light-gray);
    color: var(--text-color);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--gray);
    color: var(--white);
}

@media (max-width: 768px) {
    .settings-page {
        padding: 20px 15px;
    }

    .settings-container {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    .settings-header h1 {
        font-size: 20px;
    }

    .color-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .save-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }

    .settings-section {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .settings-section h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .settings-page {
        padding: 15px 10px;
    }

    .settings-container {
        padding: 15px 10px;
    }

    .settings-header h1 {
        font-size: 18px;
    }

    .back-btn {
        font-size: 14px;
        padding: 8px 15px;
    }
}

/* ============================================
   Profile Page
   ============================================ */

.profile-page {
    width: 100%;
    background: var(--light-gray);
    padding: 30px;
    margin: 0;
    direction: rtl;
}

.profile-container {
    max-width: 100%;
    margin: 0;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    direction: rtl;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.profile-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-section {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.profile-section h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-image-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.profile-image-large {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.profile-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-image-large:hover .profile-image-overlay {
    opacity: 1;
}

.upload-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: var(--dark-teal);
    transform: scale(1.05);
}

.profile-form,
.password-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.form-group input:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 12px;
}

@media (max-width: 768px) {
    .profile-page {
        padding: 20px 15px;
    }

    .profile-container {
        padding: 20px 15px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .profile-header h1 {
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .profile-image-large {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 15px 10px;
    }

    .profile-container {
        padding: 15px 10px;
    }

    .profile-header h1 {
        font-size: 18px;
    }

    .profile-image-large {
        width: 120px;
        height: 120px;
    }
}

/* ============================================
   Data Tables (Students, Teachers, Circles)
   ============================================ */

.data-page {
    width: 100%;
    background: var(--light-gray);
    padding: 30px;
    margin: 0;
    direction: rtl;
}

.data-container {
    max-width: 100%;
    margin: 0;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    direction: rtl;
}

.filter-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
}

.filter-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.filter-select,
.filter-group input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.filter-select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.edit-btn,
.delete-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gold-color);
    color: var(--white);
}

.edit-btn:hover,
.delete-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.search-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--dark-teal);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.action-buttons-left {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: stretch;
    flex-shrink: 0;
}

.action-buttons-left .action-btn,
.action-buttons-left .dropdown-container,
.action-buttons-left .dropdown-container .action-btn {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 10px 20px;
    box-sizing: border-box;
}

.action-buttons-right {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: stretch;
    flex-shrink: 0;
}

.action-buttons-right .action-btn {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    box-sizing: border-box;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--white);
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    box-sizing: border-box;
    white-space: nowrap;
    line-height: 1;
}

.action-btn.teal {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    box-shadow: 0 3px 12px rgba(0, 168, 168, 0.3);
    font-weight: 600;
}

.action-btn.teal:hover {
    box-shadow: 0 5px 18px rgba(0, 168, 168, 0.4);
}

.action-btn.gold {
    background: linear-gradient(135deg, var(--gold-color) 0%, #D4A020 100%);
    color: var(--white);
    box-shadow: 0 3px 12px rgba(230, 197, 71, 0.3);
    font-weight: 600;
}

.action-btn.gold:hover {
    box-shadow: 0 5px 18px rgba(230, 197, 71, 0.4);
}

.action-btn.gray {
    background: #e0e0e0;
    color: #757575;
    cursor: not-allowed;
}

.action-btn.gray:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    cursor: pointer;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: block;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(0, 168, 168, 0.2);
}

.data-table thead th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid var(--dark-teal);
}

.data-table tbody td input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.data-table thead th i {
    margin-right: 5px;
    cursor: pointer;
    opacity: 0.8;
}

.data-table thead th i:hover {
    opacity: 1;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr.table-row-white {
    background: var(--white);
    color: var(--text-color);
}

.data-table tbody tr.table-row-white:hover,
.data-table tbody tr.table-row-white:focus-within {
    background: linear-gradient(135deg, var(--gold-color) 0%, #B8941F 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.data-table tbody tr.table-row-white.row-selected {
    background: linear-gradient(135deg, var(--gold-color) 0%, #B8941F 100%);
    color: var(--white);
}

.data-table tbody td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody td a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.data-table tbody td a:hover {
    color: var(--dark-teal);
    text-decoration: underline;
}

.data-table tbody td a i {
    font-size: 14px;
    opacity: 0.7;
}

.data-table tbody td a:hover i {
    opacity: 1;
}

.table-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
}

.actions-cell {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-icon {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.edit-icon {
    background: var(--primary-color);
    color: var(--white);
}

.edit-icon:hover {
    background: var(--dark-teal);
    transform: scale(1.1);
}

.delete-icon {
    background: #dc3545;
    color: var(--white);
}

.delete-icon:hover {
    background: #c82333;
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 16px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.status-active {
    background: #4CAF50;
    color: var(--white);
}

.status-badge.status-inactive {
    background: #f44336;
    color: var(--white);
}

.status-badge.status-completed {
    background: var(--primary-color);
    color: var(--white);
}

@media (max-width: 768px) {
    .data-page {
        padding: 20px 15px;
    }

    .data-container {
        padding: 20px 15px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    /* إظهار الجدول على الهاتف */
    .table-container {
        display: block !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .data-table {
        width: 100%;
        min-width: 600px;
        font-size: 10px;
        border-collapse: collapse;
    }
    
    .data-table th,
    .data-table td {
        padding: 5px 3px;
        font-size: 10px;
        white-space: nowrap;
    }
    
    .data-table th {
        font-size: 9px;
        font-weight: 600;
        background: var(--dark-teal);
        color: white;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .data-table tbody tr {
        border-bottom: 1px solid var(--border-color);
    }
    
    .data-table tbody tr:hover {
        background: #f8f9fa;
    }
    
    .data-table .table-image {
        width: 25px;
        height: 25px;
    }
    
    .data-table td {
        font-size: 9px;
    }
    
    .data-table td a {
        font-size: 9px;
    }
    
    .data-table td i {
        font-size: 8px;
    }
    
    /* إخفاء البطاقات على الهاتف */
    .students-cards-mobile,
    .teachers-cards-mobile,
    .circles-cards-mobile,
    .parents-cards-mobile {
        display: none !important;
    }

    /* ============================================
       تصميم البطاقات للهاتف
       ============================================ */

    .students-cards-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 10px;
    }

    .student-card-mobile {
        background: var(--white);
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }

    .student-card-mobile:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .student-card-mobile.row-selected {
        border: 2px solid var(--primary-color);
        background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
    }

    .student-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .student-card-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid var(--primary-color);
        flex-shrink: 0;
    }

    .student-card-info {
        flex: 1;
        min-width: 0;
    }

    .student-card-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-color);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .student-card-name a {
        color: var(--primary-color);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: color 0.3s ease;
    }

    .student-card-name a:active {
        color: var(--dark-teal);
    }

    .student-card-name i {
        font-size: 14px;
    }

    .student-card-code {
        font-size: 13px;
        color: var(--gray);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .student-card-code i {
        font-size: 12px;
        color: var(--primary-color);
    }

    .student-card-radio {
        width: 24px;
        height: 24px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .student-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .student-card-detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .student-card-detail-label {
        font-size: 11px;
        color: var(--gray);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .student-card-detail-value {
        font-size: 13px;
        color: var(--text-color);
        font-weight: 500;
        word-break: break-word;
    }

    .student-card-detail-item.full-width {
        grid-column: 1 / -1;
    }
    
    .teacher-card-detail-item.full-width {
        grid-column: 1 / -1;
    }
    
    .circle-card-detail-item.full-width {
        grid-column: 1 / -1;
    }
    
    .parent-card-detail-item.full-width {
        grid-column: 1 / -1;
    }

    .student-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .student-card-action-btn {
        flex: 1;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .student-card-action-btn.whatsapp {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: var(--white);
    }

    .student-card-action-btn.message {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
        color: var(--white);
    }

    .student-card-action-btn:active {
        transform: scale(0.95);
    }

    .student-card-circles {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
    }

    .student-card-circle-badge {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
        color: var(--white);
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
    }

    .no-students-mobile {
        text-align: center;
        padding: 40px 20px;
        color: var(--gray);
    }

    .no-students-mobile i {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    .no-students-mobile p {
        font-size: 16px;
        margin: 0;
    }

    /* تحسينات إضافية */
    .breadcrumb-bar {
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .filter-section {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 10px;
        background: var(--white);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }

    .filter-group label {
        font-size: 13px;
        margin-bottom: 6px;
        font-weight: 600;
    }

    .filter-select,
    .filter-group input[type="text"] {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 8px;
    }

    .search-btn {
        padding: 12px 16px;
        min-width: 50px;
        min-height: 44px;
        border-radius: 8px;
        font-size: 16px;
    }

    /* ============================================
       بطاقات المعلمين للهاتف
       ============================================ */

    .teachers-cards-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 10px;
    }

    .teacher-card-mobile {
        background: var(--white);
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }

    .teacher-card-mobile:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .teacher-card-mobile.row-selected {
        border: 2px solid var(--primary-color);
        background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
    }

    .teacher-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .teacher-card-avatar {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid var(--primary-color);
        flex-shrink: 0;
    }

    .teacher-card-info {
        flex: 1;
        min-width: 0;
    }

    .teacher-card-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-color);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .teacher-card-name a {
        color: var(--primary-color);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: color 0.3s ease;
    }

    .teacher-card-name a:active {
        color: var(--dark-teal);
    }

    .teacher-card-code {
        font-size: 13px;
        color: var(--gray);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .teacher-card-radio {
        width: 24px;
        height: 24px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .teacher-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .teacher-card-detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .teacher-card-detail-label {
        font-size: 11px;
        color: var(--gray);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .teacher-card-detail-value {
        font-size: 13px;
        color: var(--text-color);
        font-weight: 500;
        word-break: break-word;
    }

    .teacher-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .teacher-card-action-btn {
        flex: 1;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .teacher-card-action-btn.whatsapp {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: var(--white);
    }

    .teacher-card-action-btn.message {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
        color: var(--white);
    }

    .no-teachers-mobile {
        text-align: center;
        padding: 40px 20px;
        color: var(--gray);
    }

    .no-teachers-mobile i {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    /* ============================================
       بطاقات الحلقات للهاتف
       ============================================ */

    .circles-cards-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 10px;
    }

    .circle-card-mobile {
        background: var(--white);
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }

    .circle-card-mobile:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .circle-card-mobile.row-selected {
        border: 2px solid var(--primary-color);
        background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
    }

    .circle-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .circle-card-info {
        flex: 1;
        min-width: 0;
    }

    .circle-card-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-color);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .circle-card-name a {
        color: var(--primary-color);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: color 0.3s ease;
    }

    .circle-card-level {
        font-size: 13px;
        color: var(--gray);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .circle-card-radio {
        width: 24px;
        height: 24px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .circle-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .circle-card-detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .circle-card-detail-label {
        font-size: 11px;
        color: var(--gray);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .circle-card-detail-value {
        font-size: 13px;
        color: var(--text-color);
        font-weight: 500;
        word-break: break-word;
    }

    .circle-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .circle-card-action-btn {
        flex: 1;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
        color: var(--white);
    }

    .no-circles-mobile {
        text-align: center;
        padding: 40px 20px;
        color: var(--gray);
    }

    .no-circles-mobile i {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    /* ============================================
       بطاقات أولياء الأمور للهاتف
       ============================================ */

    .parents-cards-mobile {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 10px;
    }

    .parent-card-mobile {
        background: var(--white);
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }

    .parent-card-mobile:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }

    .parent-card-mobile.row-selected {
        border: 2px solid var(--primary-color);
        background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
    }

    .parent-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .parent-card-info {
        flex: 1;
        min-width: 0;
    }

    .parent-card-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-color);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .parent-card-relation {
        font-size: 13px;
        color: var(--gray);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .parent-card-radio {
        width: 24px;
        height: 24px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .parent-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px;
    }

    .parent-card-detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .parent-card-detail-label {
        font-size: 11px;
        color: var(--gray);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .parent-card-detail-value {
        font-size: 13px;
        color: var(--text-color);
        font-weight: 500;
        word-break: break-word;
    }

    .parent-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color);
    }

    .parent-card-action-btn {
        flex: 1;
        padding: 8px 12px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .parent-card-action-btn.whatsapp {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: var(--white);
    }

    .no-parents-mobile {
        text-align: center;
        padding: 40px 20px;
        color: var(--gray);
    }

    .no-parents-mobile i {
        font-size: 48px;
        margin-bottom: 15px;
        opacity: 0.5;
    }

    /* تحسين ترتيب الأزرار على الهاتف */
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons-left,
    .action-buttons-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .action-buttons-left .action-btn,
    .action-buttons-right .action-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 13px;
        padding: 10px 12px;
    }

    .action-buttons-left .action-btn i,
    .action-buttons-right .action-btn i {
        font-size: 14px;
    }
}

/* ============================================
   بطاقات الهاتف - CSS عام (يطبق على جميع الشاشات)
   ============================================ */

/* بطاقات المعلمين */
.teachers-cards-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.teacher-card-mobile {
    background: var(--white);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.teacher-card-mobile:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.teacher-card-mobile.row-selected {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
}

.teacher-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.teacher-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

.teacher-card-info {
    flex: 1;
    min-width: 0;
}

.teacher-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.teacher-card-name a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.teacher-card-name a:active,
.teacher-card-name a:hover {
    color: var(--dark-teal);
}

.teacher-card-code {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.teacher-card-code i {
    font-size: 12px;
    color: var(--primary-color);
}

.teacher-card-radio {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.teacher-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.teacher-card-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.teacher-card-detail-item.full-width {
    grid-column: 1 / -1;
}

.teacher-card-detail-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.teacher-card-detail-value {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
}

.teacher-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.teacher-card-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.teacher-card-action-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--white);
}

.teacher-card-action-btn.message {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
}

.teacher-card-action-btn:active {
    transform: scale(0.95);
}

.no-teachers-mobile {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.no-teachers-mobile i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-teachers-mobile p {
    font-size: 16px;
    margin: 0;
}

/* بطاقات الحلقات */
.circles-cards-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.circle-card-mobile {
    background: var(--white);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.circle-card-mobile:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.circle-card-mobile.row-selected {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
}

.circle-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.circle-card-info {
    flex: 1;
    min-width: 0;
}

.circle-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.circle-card-name a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.circle-card-name a:active,
.circle-card-name a:hover {
    color: var(--dark-teal);
}

.circle-card-level {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.circle-card-level i {
    font-size: 12px;
    color: var(--primary-color);
}

.circle-card-radio {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.circle-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.circle-card-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.circle-card-detail-item.full-width {
    grid-column: 1 / -1;
}

.circle-card-detail-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circle-card-detail-value {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
}

.circle-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.circle-card-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
}

.circle-card-action-btn:active {
    transform: scale(0.95);
}

.no-circles-mobile {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.no-circles-mobile i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-circles-mobile p {
    font-size: 16px;
    margin: 0;
}

/* بطاقات أولياء الأمور */
.parents-cards-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 10px;
}

.parent-card-mobile {
    background: var(--white);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.parent-card-mobile:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.parent-card-mobile.row-selected {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 139, 139, 0.05) 0%, rgba(0, 102, 102, 0.05) 100%);
}

.parent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.parent-card-info {
    flex: 1;
    min-width: 0;
}

.parent-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-card-name i {
    font-size: 14px;
    color: var(--primary-color);
}

.parent-card-relation {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.parent-card-relation i {
    font-size: 12px;
    color: var(--primary-color);
}

.parent-card-radio {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.parent-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.parent-card-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.parent-card-detail-item.full-width {
    grid-column: 1 / -1;
}

.parent-card-detail-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parent-card-detail-value {
    font-size: 13px;
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
}

.parent-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.parent-card-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.parent-card-action-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--white);
}

.parent-card-action-btn:active {
    transform: scale(0.95);
}

.no-parents-mobile {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.no-parents-mobile i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-parents-mobile p {
    font-size: 16px;
    margin: 0;
}

/* ============================================
   تحسين جدول الحضور والغياب للهاتف
   ============================================ */

@media (max-width: 768px) {
    .attendance-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .attendance-table {
        min-width: 600px;
    }
    
    .attendance-table thead th:first-child {
        position: sticky;
        right: 0;
        background: var(--primary-color);
        z-index: 10;
        min-width: 120px;
    }
    
    .attendance-table tbody td:first-child {
        position: sticky;
        right: 0;
        background: var(--white);
        z-index: 5;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
        min-width: 120px;
    }
    
    .attendance-table tbody tr:hover td:first-child {
        background: #f8f9fa;
    }
}

@media (max-width: 480px) {
    .attendance-table-wrapper {
        margin: 0 -8px;
        padding: 0 8px;
    }
    
    .attendance-table {
        min-width: 550px;
    }
    
    .attendance-table thead th:first-child {
        min-width: 100px;
    }
    
    .attendance-table tbody td:first-child {
        min-width: 100px;
    }
}

/* ============================================
   Modals
   ============================================ */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    direction: rtl;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-form-group label {
    color: var(--text-color);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-form-group label i {
    color: var(--primary-color);
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    transition: all 0.3s ease;
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.modal-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.modal-btn-secondary {
    background: var(--light-gray);
    color: var(--text-color);
}

.modal-btn-secondary:hover {
    background: var(--gray);
    color: var(--white);
}

.modal-btn-danger {
    background: #dc3545;
    color: var(--white);
}

.modal-btn-danger:hover {
    background: #c82333;
}

.add-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        max-height: 95vh;
    }

    .modal-form-row {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Grade System Settings
   ============================================ */

.grade-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 120px;
}

.form-row .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

.form-row .form-group input[type="number"],
.form-row .form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-row .form-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.add-grade-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.add-grade-btn:hover {
    background: var(--dark-teal);
    transform: translateY(-2px);
}

.remove-grade-btn {
    background: #F44336;
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-grade-btn:hover {
    background: #D32F2F;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
}

/* ============================================
   Dark Mode (الوضع الليلي)
   ============================================ */

html.dark-mode,
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .header {
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

body.dark-mode .header-left {
    background: #2d2d2d;
}

body.dark-mode .header-right {
    background: #1a4d4d;
}

body.dark-mode .logout-btn {
    color: #4db6ac;
}

body.dark-mode .logout-btn:hover {
    color: #26a69a;
}

body.dark-mode .icon-btn {
    color: #e0e0e0;
}

body.dark-mode .icon-btn:hover {
    color: #4db6ac;
}

body.dark-mode .icon-badge,
body.dark-mode .nav-badge {
    background: #4db6ac;
    color: #1a1a1a;
}

body.dark-mode .sidebar {
    background: #2d2d2d;
    border-right: 1px solid #404040;
}

body.dark-mode .sidebar-header {
    border-bottom: 1px solid #404040;
}

body.dark-mode .settings-icon {
    color: #4db6ac;
}

body.dark-mode .sidebar-toggle-btn {
    background: #4db6ac;
    color: #ffffff;
}

body.dark-mode .sidebar-toggle-btn:hover {
    background: #26a69a;
}

body.dark-mode .user-name {
    color: #e0e0e0;
}

body.dark-mode .user-role {
    color: #4db6ac;
}

body.dark-mode .nav-link {
    color: #e0e0e0;
}

body.dark-mode .nav-link:hover {
    background: #3d3d3d;
    color: #4db6ac;
}

body.dark-mode .nav-item.active .nav-link {
    background: #1a4d4d;
    color: #ffffff;
}

body.dark-mode .section-title {
    color: #b0b0b0;
}

body.dark-mode .main-content {
    background: #1a1a1a;
}

body.dark-mode .dashboard-card {
    background: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .dashboard-card:hover {
    border-color: #4db6ac;
}

body.dark-mode .dashboard-card.gold {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
    color: #ffffff;
}

body.dark-mode .data-page,
body.dark-mode .data-container,
body.dark-mode .settings-page,
body.dark-mode .settings-container,
body.dark-mode .attendance-page,
body.dark-mode .attendance-form-container,
body.dark-mode .memorization-page,
body.dark-mode .memorization-form-container {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .filter-section,
body.dark-mode .filter-form {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .filter-group input,
body.dark-mode .filter-group select {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .data-table {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .data-table thead {
    background: linear-gradient(135deg, #008B8B 0%, #006666 100%);
}

body.dark-mode .data-table tbody tr {
    border-bottom: 1px solid #404040;
}

body.dark-mode .data-table tbody tr:hover,
body.dark-mode .data-table tbody tr:focus-within,
body.dark-mode .data-table tbody tr.row-selected {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
    color: #ffffff;
}

body.dark-mode .action-btn {
    background: #3d3d3d;
    color: #e0e0e0;
    border: 1px solid #404040;
}

body.dark-mode .action-btn:hover:not(:disabled) {
    background: #4db6ac;
    color: #ffffff;
}

body.dark-mode .action-btn.gold {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
    color: #ffffff;
}

body.dark-mode .modal {
    background: #2d2d2d;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, #008B8B 0%, #006666 100%);
}

body.dark-mode .modal-form-group input,
body.dark-mode .modal-form-group select,
body.dark-mode .modal-form-group textarea {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .modal-form-group input:focus,
body.dark-mode .modal-form-group select:focus,
body.dark-mode .modal-form-group textarea:focus {
    border-color: #4db6ac;
    outline: none;
}

body.dark-mode .breadcrumb-bar {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
}

body.dark-mode .attendance-table {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .attendance-table thead {
    background: linear-gradient(135deg, #008B8B 0%, #006666 100%);
}

body.dark-mode .attendance-table tbody tr {
    border-bottom: 1px solid #404040;
}

body.dark-mode .memorization-section,
body.dark-mode .general-data-section {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
}

body.dark-mode .memorization-item {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .memorization-item select,
body.dark-mode .memorization-item input {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .settings-section {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .settings-section h2 {
    color: #e0e0e0;
}

body.dark-mode .color-input-wrapper input[type="text"],
body.dark-mode .color-input-wrapper input[type="color"] {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .grade-item {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .grade-item input {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .main-footer {
    background: #1a4d4d;
    border-top: 1px solid #404040;
}

body.dark-mode .page-loader {
    background: rgba(26, 26, 26, 0.95);
}

body.dark-mode .flash-message {
    border: 1px solid #404040;
}

body.dark-mode .flash-success {
    background: #1b5e20;
    color: #c8e6c9;
    border-color: #2e7d32;
}

body.dark-mode .flash-error {
    background: #b71c1c;
    color: #ffcdd2;
    border-color: #c62828;
}

body.dark-mode .flash-info {
    background: #01579b;
    color: #b3e5fc;
    border-color: #0277bd;
}

body.dark-mode .login-page {
    background: linear-gradient(135deg, #1a4d4d 0%, #006666 100%);
}

body.dark-mode .login-box {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .login-header h1 {
    color: #4db6ac;
}

body.dark-mode .form-group input[type="text"],
body.dark-mode .form-group input[type="password"],
body.dark-mode .form-group input[type="email"],
body.dark-mode .form-group input[type="tel"],
body.dark-mode .form-group input[type="date"],
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #1a1a1a;
    border: 1px solid #404040;
    color: #e0e0e0;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #4db6ac;
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.2);
}

body.dark-mode .login-btn {
    background: linear-gradient(135deg, #4db6ac 0%, #26a69a 100%);
}

body.dark-mode .profile-container,
body.dark-mode .profile-page {
    background: #1a1a1a;
}

body.dark-mode .profile-section {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .profile-section h2 {
    color: #4db6ac;
}

/* Sidebar Toggle States */
.sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    transition: width 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.main-container.sidebar-collapsed .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .sidebar.collapsed {
        position: absolute;
        left: -280px;
        z-index: 1000;
    }
}

/* ============================================
   Page Loader
   ============================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-wrapper {
    position: absolute;
    width: 240px;
    height: 240px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: logoPulse 2s ease-in-out infinite;
}

.loader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.9)) 
            drop-shadow(0 0 40px rgba(212, 175, 55, 0.7))
            drop-shadow(0 0 60px rgba(212, 175, 55, 0.5));
    animation: logoGlow 2s ease-in-out infinite;
}

.loader-logo-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border-radius: 50%;
    color: white;
    font-size: 120px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.9), 
                0 0 40px rgba(212, 175, 55, 0.7),
                0 0 60px rgba(212, 175, 55, 0.5);
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8)) 
                drop-shadow(0 0 40px rgba(212, 175, 55, 0.6))
                drop-shadow(0 0 60px rgba(212, 175, 55, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(212, 175, 55, 1)) 
                drop-shadow(0 0 60px rgba(212, 175, 55, 0.8))
                drop-shadow(0 0 90px rgba(212, 175, 55, 0.6));
    }
}

.loader-dots {
    position: relative;
    width: 200px;
    height: 200px;
    animation: rotateDots 2s linear infinite;
}

.loader-dots .dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.9);
    left: 50%;
    top: 50%;
    margin-left: -5px;
    margin-top: -5px;
    transform-origin: 5px 100px;
    animation: dotPulse 1.5s ease-in-out infinite;
}

/* Position dots in a circle around the logo - 8 dots evenly spaced */
.loader-dots .dot-1 {
    transform: rotate(0deg) translateY(-100px);
    animation-delay: 0s;
}

.loader-dots .dot-2 {
    transform: rotate(45deg) translateY(-100px);
    animation-delay: 0.1875s;
}

.loader-dots .dot-3 {
    transform: rotate(90deg) translateY(-100px);
    animation-delay: 0.375s;
}

.loader-dots .dot-4 {
    transform: rotate(135deg) translateY(-100px);
    animation-delay: 0.5625s;
}

.loader-dots .dot-5 {
    transform: rotate(180deg) translateY(-100px);
    animation-delay: 0.75s;
}

.loader-dots .dot-6 {
    transform: rotate(225deg) translateY(-100px);
    animation-delay: 0.9375s;
}

.loader-dots .dot-7 {
    transform: rotate(270deg) translateY(-100px);
    animation-delay: 1.125s;
}

.loader-dots .dot-8 {
    transform: rotate(315deg) translateY(-100px);
    animation-delay: 1.3125s;
}

@keyframes rotateDots {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Responsive Loader */
@media (max-width: 768px) {
    .loader-logo-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .loader-logo-icon {
        font-size: 90px;
    }
}

@media (max-width: 480px) {
    .loader-logo-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .loader-logo-icon {
        font-size: 75px;
    }
}

/* إصلاح الأيقونات Font Awesome في جميع الصفحات */
i[class^="fas"],
i[class^="far"],
i[class^="fab"],
i[class^="fal"],
.fas,
.far,
.fab,
.fal {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    display: inline-block;
}

/* للأيقونات في البطاقات */
.dashboard-card i,
.report-card i,
.statistics-card i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* للأيقونات في القوائم */
.nav-link i,
.sidebar i,
.header i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* للأيقونات في الأزرار */
.action-btn i,
button i,
.btn i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* ============================================
   تحسينات التصميم المتجاوب الشاملة
   ============================================ */

/* تحسينات عامة للشاشات الصغيرة */
@media (max-width: 480px) {
    /* تحسين padding العام */
    .data-page,
    .attendance-page,
    .teacher-attendance-page,
    .employee-attendance-page,
    .memorization-page {
        padding: 10px !important;
    }
    
    .data-container,
    .attendance-form-container,
    .memorization-form-container {
        padding: 15px !important;
        border-radius: 10px;
    }
    
    /* تحسين البطاقات في لوحة القيادة */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .dashboard-card {
        min-height: 120px;
        padding: 15px !important;
    }
    
    .card-icon {
        font-size: 36px !important;
        margin-bottom: 10px;
    }
    
    .card-content h3 {
        font-size: 16px !important;
    }
    
    .card-number {
        font-size: 24px !important;
    }
    
    /* تحسين الجداول على الهواتف */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .data-table {
        font-size: 9px !important;
    }
    
    .data-table th,
    .data-table td {
        padding: 4px 2px !important;
        font-size: 9px !important;
    }
    
    .data-table th {
        font-size: 8px !important;
    }
    
    .data-table td {
        font-size: 8px !important;
    }
    
    .data-table td a {
        font-size: 8px !important;
    }
    
    .data-table td i {
        font-size: 7px !important;
    }
    
    .data-table .table-image {
        width: 20px !important;
        height: 20px !important;
    }
    
    .data-table,
    .attendance-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .data-table thead th,
    .attendance-table thead th {
        padding: 8px 6px;
        font-size: 11px;
        white-space: nowrap;
    }
    
    .data-table tbody td,
    .attendance-table tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .table-image {
        width: 35px;
        height: 35px;
    }
    
    /* تحسين الأزرار على الهواتف */
    .action-btn,
    .action-btn.teal,
    .action-btn.gold {
        padding: 12px 15px;
        font-size: 13px;
        min-height: 44px; /* للسهولة في النقر */
        touch-action: manipulation;
    }
    
    .action-buttons-left,
    .action-buttons-right {
        width: 100%;
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    /* تحسين النماذج على الهواتف */
    .filter-section {
        padding: 15px !important;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
        min-width: 100%;
    }
    
    .filter-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-select,
    .filter-group input[type="text"],
    .filter-group input[type="date"],
    .filter-group select {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* لمنع التكبير التلقائي على iOS */
        min-height: 44px;
    }
    
    .search-btn {
        width: 100%;
        padding: 12px;
        min-height: 44px;
    }
    
    /* تحسين النماذج (Modals) على الهواتف */
    .modal {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        margin: 10px;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-form-group {
        width: 100%;
    }
    
    .modal-form-group input,
    .modal-form-group select,
    .modal-form-group textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* لمنع التكبير التلقائي على iOS */
        min-height: 44px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px;
        min-height: 44px;
        justify-content: center;
    }
    
    /* تحسين صفحات الحضور والمواظبة على الهواتف */
    .attendance-header,
    .attendance-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    
    .attendance-header .teacher-column,
    .attendance-header .employee-column,
    .teacher-name,
    .employee-name {
        width: 100%;
        flex: 1;
        padding: 0;
        border: none;
        text-align: right;
        margin-bottom: 10px;
    }
    
    .attendance-header .status-columns,
    .attendance-controls {
        width: 100%;
        flex: 1;
        padding: 0;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .status-column {
        min-width: auto;
        flex: 1;
        min-width: 60px;
    }
    
    .status-options {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
        width: 100%;
    }
    
    .status-option {
        flex: 1;
        min-width: 60px;
    }
    
    .status-option label {
        font-size: 12px;
        padding: 8px;
    }
    
    .status-option input[type="radio"] {
        width: 16px;
        height: 16px;
    }
    
    .hours-input {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        min-height: 44px;
    }
    
    /* تحسين صفحات التقارير على الهواتف */
    .report-container {
        padding: 10px !important;
    }
    
    .report-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .report-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .report-actions .action-btn {
        width: 100%;
    }
    
    /* تحسين breadcrumb على الهواتف */
    .breadcrumb-bar {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    /* تحسين صفحة الإحصاءات على الهواتف */
    .chart-container {
        padding: 15px;
        margin-top: 15px;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 10px;
    }
    
    /* تحسين صفحة الحفظ والمراجعة على الهواتف */
    .memorization-section,
    .general-data-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .memorization-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .memorization-item select,
    .memorization-item input {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        min-height: 44px;
    }
    
    /* تحسين صفحة بطاقات الطلاب على الهواتف */
    .student-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .student-card {
        padding: 15px;
    }
    
    /* تحسين صفحة الإعدادات على الهواتف */
    .settings-section {
        padding: 15px !important;
    }
    
    .color-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
        min-width: 100%;
    }
    
    /* تحسين الهيدر على الهواتف */
    .header {
        padding: 8px 10px;
        min-height: 60px;
    }
    
    .header-left {
        padding: 5px 8px;
        gap: 5px;
    }
    
    .header-right {
        padding: 5px 8px;
    }
    
    .logo {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .logo-text {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        text-align: center;
        min-width: 0;
        padding: 0 5px;
    }
    
    .logo-text h1 {
        font-size: 14px;
        font-weight: 700;
        margin: 0;
        color: var(--white);
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logo-text p {
        font-size: 10px;
        margin: 0;
        color: var(--white);
        opacity: 0.9;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .logout-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .logout-btn span {
        display: none;
    }
    
    .icon-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* تحسين السايدبار على الهواتف */
    .sidebar {
        width: 100%;
        max-width: 280px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .user-profile {
        padding: 10px;
    }
    
    .profile-image {
        width: 60px;
        height: 60px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .user-role {
        font-size: 12px;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .nav-link i {
        font-size: 16px;
        width: 20px;
    }
    
    /* تحسين المحتوى الرئيسي على الهواتف */
    .main-content {
        padding: 10px;
    }
    
    .main-container-wrapper {
        padding: 0;
    }
}

/* تحسينات للشاشات المتوسطة (الأجهزة اللوحية) */
@media (min-width: 481px) and (max-width: 768px) {
    /* تحسين padding */
    .data-page,
    .attendance-page,
    .teacher-attendance-page,
    .employee-attendance-page,
    .memorization-page {
        padding: 15px;
    }
    
    .data-container,
    .attendance-form-container {
        padding: 20px;
    }
    
    /* تحسين البطاقات */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* تحسين الجداول */
    .data-table,
    .attendance-table {
        font-size: 13px;
    }
    
    .data-table thead th,
    .attendance-table thead th {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .data-table tbody td,
    .attendance-table tbody td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* تحسين النماذج */
    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-group {
        min-width: 150px;
        flex: 1;
    }
    
    /* تحسين صفحات الحضور */
    .attendance-header .status-columns,
    .attendance-controls {
        gap: 15px;
    }
    
    .status-column {
        min-width: 65px;
    }
    
    /* تحسين النماذج */
    .modal {
        width: 90%;
        max-width: 600px;
    }
    
    .modal-form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* تحسينات للشاشات الكبيرة (أكبر من 768px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .data-table,
    .attendance-table {
        font-size: 14px;
    }
}

/* تحسينات خاصة للأجهزة الصغيرة جداً */
@media (max-width: 360px) {
    .dashboard-card {
        min-height: 100px;
        padding: 12px;
    }
    
    .card-icon {
        font-size: 32px;
    }
    
    .card-content h3 {
        font-size: 14px;
    }
    
    .data-table,
    .attendance-table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .data-table thead th,
    .attendance-table thead th {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .data-table tbody td,
    .attendance-table tbody td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    .action-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .modal {
        width: 98%;
        margin: 5px;
    }
}

/* تحسينات للاتجاه الرأسي على الهواتف */
@media (max-width: 768px) and (orientation: portrait) {
    .attendance-header,
    .attendance-row {
        flex-direction: column;
    }
    
    .attendance-header .teacher-column,
    .attendance-header .employee-column,
    .teacher-name,
    .employee-name {
        width: 100%;
        border: none;
        padding: 0 0 10px 0;
    }
    
    .attendance-header .status-columns,
    .attendance-controls {
        width: 100%;
        padding: 0;
    }
}

/* تحسينات للاتجاه الأفقي على الهواتف */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal {
        max-height: 85vh;
    }
    
    .attendance-header,
    .attendance-row {
        flex-direction: row;
    }
    
    .attendance-header .teacher-column,
    .attendance-header .employee-column,
    .teacher-name,
    .employee-name {
        width: 50%;
        border-left: 1px solid var(--border-color);
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .attendance-header .status-columns,
    .attendance-controls {
        width: 50%;
        padding-left: 15px;
    }
}

/* تحسينات للوصول (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* تحسينات للأجهزة التي تدعم اللمس */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .modal-btn,
    .search-btn,
    button {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .data-table tbody tr,
    .attendance-table tbody tr,
    .attendance-row {
        min-height: 44px;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }
}

/* تحسينات للطباعة */
@media print {
    .header,
    .sidebar,
    .action-buttons,
    .filter-section,
    .modal-overlay {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .data-table,
    .attendance-table {
        font-size: 10px;
    }
    
    .data-table thead th,
    .attendance-table thead th {
        padding: 5px;
        font-size: 9px;
    }
    
    .data-table tbody td,
    .attendance-table tbody td {
        padding: 5px;
        font-size: 10px;
    }
}

/* ============================================
   Dropdown Menu
   ============================================ */

.dropdown-container {
    position: relative;
    display: inline-flex;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    align-items: stretch;
    vertical-align: middle;
}

.dropdown-container .action-btn {
    height: 100%;
    min-height: 40px;
    max-height: 40px;
    white-space: nowrap;
    padding: 10px 20px;
    box-sizing: border-box;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: auto;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1000;
    display: none;
    margin-top: 0;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.columns-menu {
    min-width: 250px;
    max-height: 400px;
    right: 0;
    left: auto;
    position: absolute;
    top: calc(100% + 5px);
}

.columns-list {
    padding: 10px 0;
}

.column-toggle-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.column-toggle-item:last-child {
    border-bottom: none;
}

.column-toggle-item:hover {
    background-color: var(--light-gray);
}

.column-toggle-item input[type="checkbox"] {
    margin-left: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.column-toggle-item span {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
}

/* ============================================
   Table Pagination
   ============================================ */

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    border-radius: 0 0 8px 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    display: flex;
    align-items: center;
}

.pagination-text {
    color: var(--text-color);
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 10px;
}

.pagination-number {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background: var(--light-gray);
    border-color: var(--primary-color);
}

.pagination-number.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 8px 5px;
    color: var(--text-color);
    font-size: 14px;
}

/* Dark Mode Support */
body.dark-mode .dropdown-menu {
    background: var(--dark-gray);
    border-color: #555;
}

body.dark-mode .dropdown-item {
    color: var(--white);
    border-bottom-color: #555;
}

body.dark-mode .dropdown-item:hover {
    background-color: #444;
    color: var(--light-teal);
}

body.dark-mode .column-toggle-item {
    border-bottom-color: #555;
}

body.dark-mode .column-toggle-item:hover {
    background-color: #444;
}

body.dark-mode .column-toggle-item span {
    color: var(--white);
}

body.dark-mode .table-pagination {
    background: var(--dark-gray);
    border-top-color: #555;
}

body.dark-mode .pagination-text {
    color: var(--white);
}

body.dark-mode .pagination-btn,
body.dark-mode .pagination-number {
    background: #444;
    border-color: #555;
    color: var(--white);
}

body.dark-mode .pagination-btn:hover:not(:disabled),
body.dark-mode .pagination-number:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.dark-mode .pagination-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

body.dark-mode .pagination-ellipsis {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .table-pagination {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-info {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .pagination-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-numbers {
        margin: 10px 0;
    }
}

/* ============================================
   تصميم إسلامي احترافي للصفحة الرئيسية
   ============================================ */

/* Top Bar */
.top-bar {
    background: var(--dark-teal);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
    direction: rtl;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.contact-info {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 13px;
}

.contact-item:hover {
    color: var(--gold-color);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 14px;
    flex-shrink: 0;
}

.contact-text {
    font-size: inherit;
}

.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Hide social icons on mobile */
@media (max-width: 768px) {
    .social-icons {
        display: none !important;
    }
    
    .top-bar-content {
        justify-content: center;
        gap: 15px;
    }
    
    .contact-info {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
    
    .contact-item {
        font-size: 12px;
        gap: 6px;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    .contact-item:hover {
        background: rgba(255, 255, 255, 0.12);
    }
    
    .top-bar {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .contact-info {
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
        width: 100%;
    }
    
    .contact-item {
        flex: 1;
        justify-content: center;
        font-size: 11px;
        padding: 5px 0;
    }
    
    .contact-item .contact-text {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.social-icons a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a,
.social-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a i,
.social-link i {
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.social-icons a:hover,
.social-link:hover {
    background: var(--gold-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    direction: rtl;
    border-bottom: 3px solid var(--gold-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: 30px;
    min-height: 78px;
    height: 78px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    order: 1;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle:hover span {
    background: var(--gold-color);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-shrink: 0;
    min-width: fit-content;
    margin-right: 30px;
    max-width: 300px;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 75px;
    width: auto;
    max-height: 75px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
    max-width: 250px;
    display: block;
    margin: 0;
}

/* Responsive logo sizes */
@media (max-width: 1200px) {
    .logo-img {
        height: 70px;
        max-height: 70px;
        max-width: 220px;
    }
}

@media (max-width: 992px) {
    .logo-img {
        height: 135px;
        max-height: 135px;
        max-width: 280px;
    }
}

/* iPad and Tablet sizes */
@media (min-width: 768px) and (max-width: 1024px) {
    .logo-img {
        height: 135px;
        max-height: 135px;
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .navbar {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
    }
    
    .nav-content {
        padding: 0 20px;
        min-height: 78px;
        height: 78px;
        gap: 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 1;
        padding: 10px;
        background: var(--white);
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .logo {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .logo-link {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .logo-img {
        height: 135px;
        max-height: 135px;
        max-width: 280px;
        width: auto;
        display: block;
        margin: 0;
        transform: none;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-buttons {
        display: none;
    }
}

/* Logo full width on mobile */
@media (max-width: 480px) {
    .navbar {
        padding: 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
    
    .nav-content {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        padding: 0 15px;
        min-height: 78px;
        height: 78px;
    }
    
    .mobile-menu-toggle {
        order: 1;
        padding: 10px;
        margin: 0;
        flex-shrink: 0;
        background: var(--white);
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 3px;
        background: var(--primary-color);
    }
    
    .logo {
        order: 2;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
        padding: 0;
        max-width: none;
    }
    
    .logo-link {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .logo-img {
        height: 115px !important;
        max-height: 115px !important;
        max-width: 250px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        display: none;
    }
}

/* للأبعاد الأصغر من 480px - نفس حجم 480-768 */
@media (max-width: 479px) {
    .logo-img {
        height: 40px !important;
        max-height: 40px !important;
        max-width: 120px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .nav-buttons {
        order: 4;
        width: 100%;
        display: none;
    }
    
    .top-bar {
        padding: 10px 0;
        background: var(--dark-teal);
    }
    
    .top-bar-content {
        gap: 10px;
    }
    
    .contact-info {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .contact-item {
        flex: 1;
        font-size: 11px;
        padding: 6px 8px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    .contact-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .contact-item .contact-text {
        font-size: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    
    .contact-item i {
        font-size: 11px;
        flex-shrink: 0;
    }
}

/* للأبعاد الأصغر من 480px - نفس حجم 480-768 */
@media (max-width: 479px) {
    .logo-img {
        height: 105px !important;
        max-height: 105px !important;
        max-width: 230px !important;
        width: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Hide logo text when logo image exists */
.logo-link:has(.logo-img) .logo-text {
    display: none;
}

.logo-link:has(.logo-img) .logo-icon {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 5px;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 20px;
    left: 20px;
    height: 3px;
    background: var(--gold-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(0, 139, 139, 0.05);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    transform: scaleX(1);
}

.nav-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.btn-login,
.btn-register {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 168, 168, 0.25);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--primary-color) 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 168, 0.4);
    border-color: var(--dark-teal);
}

.btn-register {
    background: var(--gold-color);
    color: var(--white);
    border-color: var(--gold-color);
}

.btn-register:hover {
    background: #B8941F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-logout:hover {
    background: linear-gradient(135deg, #C82333 0%, #DC3545 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5) !important;
}

@media (max-width: 768px) {
    .btn-login,
    .btn-register {
        padding: 10px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .btn-login,
    .btn-register {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Sidebar */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    overflow-y: auto;
    border-left: 1px solid rgba(0, 139, 139, 0.1);
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 14px 18px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    margin-bottom: 0;
}

.sidebar-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-logo-img {
    max-width: 200px;
    max-height: 110px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

/* Hide sidebar logo text when logo image exists */
.sidebar-logo-container:has(.sidebar-logo-img) .sidebar-logo-text {
    display: none;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sidebar-nav {
    padding: 0 0 16px;
}

.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-links li {
    margin: 0;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 15px;
    padding: 16px 25px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 3px solid transparent;
    direction: rtl;
    position: relative;
}

.sidebar-links a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gold-color);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.sidebar-links a i {
    width: 22px;
    height: 22px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    order: 2;
    transition: transform 0.3s ease;
}

.sidebar-links a span {
    order: 1;
    flex: 1;
    text-align: right;
}

.sidebar-links a:hover {
    background: linear-gradient(90deg, rgba(0, 139, 139, 0.08) 0%, rgba(0, 139, 139, 0.05) 100%);
    color: var(--primary-color);
    transform: translateX(-3px);
    padding-right: 28px;
}

.sidebar-links a:hover::before {
    height: 60%;
}

.sidebar-links a:hover i {
    transform: scale(1.1);
}

.sidebar-links a.active {
    background: linear-gradient(90deg, var(--primary-color) 0%, rgba(0, 139, 139, 0.95) 100%);
    color: var(--white);
    border-right-color: var(--gold-color);
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.25);
    transform: translateX(-3px);
}

.sidebar-links a.active::before {
    height: 100%;
    background: var(--gold-color);
}

.sidebar-links a.active i {
    color: var(--white);
    transform: scale(1.15);
}

.sidebar-buttons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 2px solid var(--border-color);
}

.sidebar-buttons .btn-login,
.sidebar-buttons .btn-register {
    width: 100%;
    justify-content: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    overflow: hidden;
    direction: rtl;
    padding: 100px 0 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.hero-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.05) 35px, rgba(255,255,255,.05) 70px),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M20,20 Q40,10 60,20 T100,20" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="1"/><path d="M10,50 Q30,40 50,50 T90,50" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="1"/><path d="M20,80 Q40,70 60,80 T100,80" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="1"/></svg>');
    background-size: 100% 100%, 200px 200px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 25px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
}

.title-line {
    display: block;
}

.title-line.highlight {
    color: var(--gold-color);
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-color) 0%, #D4A020 100%);
    color: var(--white);
    border-color: var(--gold-color);
    box-shadow: 0 4px 15px rgba(230, 197, 71, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D4A020 0%, #C4901A 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 197, 71, 0.5);
    border-color: #D4A020;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
}

.waves {
    position: relative;
    width: 100%;
    height: 100%;
    margin-bottom: -7px;
    min-height: 100px;
    max-height: 100px;
}

/* Wave Animation */
.wave-parallax > use {
    animation: wave-move 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.wave-parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.wave-parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.wave-parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.wave-parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes wave-move {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/* Wave Animation for wave-layers (about.php & courses.php) */
.wave-layers > use {
    animation: wave-move 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.wave-layers > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.wave-layers > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.wave-layers > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.wave-layers > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

/* Knowledge Section */
.knowledge-section {
    padding: 80px 0;
    background: var(--white);
    direction: rtl;
}

.knowledge-section .section-title,
.features-section .section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center !important;
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 168, 168, 0.15);
    display: block;
    width: 100%;
    padding: 0;
    direction: rtl;
}

.knowledge-section .section-title::before,
.features-section .section-title::before {
    display: none;
}

.section-subtitle {
    text-align: center;
    color: #333333;
    font-size: 18px;
    margin-bottom: 50px;
    font-weight: 500;
}

.knowledge-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.verse-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: all 0.3s ease;
    border: 2.5px solid #D0D0D0;
}

.verse-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--gold-color);
    border-width: 3px;
}

.verse-card.large-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 6px 25px rgba(0, 168, 168, 0.3);
}

.card-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold-color) 0%, #D4A020 100%);
    border-radius: 15px 0 0 15px;
    box-shadow: 0 0 10px rgba(230, 197, 71, 0.4);
}

.verse-text {
    font-size: 22px;
    line-height: 2;
    text-align: center;
    font-family: 'Amiri', serif;
    margin-bottom: 15px;
    font-weight: 400;
}

.verse-start,
.verse-end {
    font-size: 32px;
    color: var(--gold-color);
    font-weight: 700;
}

.large-card .verse-start,
.large-card .verse-end {
    color: var(--gold-color);
}

.verse-source {
    text-align: center;
    font-size: 14px;
    color: #666666;
    font-style: italic;
    margin: 0;
}

.large-card .verse-source {
    color: rgba(255, 255, 255, 0.9);
}

.hadith-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: start;
    width: 100%;
}

.hadith-cards .verse-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #F8F8F8 0%, var(--white) 100%);
    direction: rtl;
}

.features-section .section-title {
    text-align: center !important;
    display: block;
    width: 100%;
    padding: 0;
    direction: rtl;
}

.features-section .section-title::before {
    display: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2.5px solid #D5D5D5;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 168, 168, 0.3);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 45px rgba(0, 168, 168, 0.4);
    border-color: var(--gold-color);
    border-width: 3px;
    background: #F8F8F8;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    box-shadow: 0 4px 15px rgba(0, 168, 168, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--white);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gold-color);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 168, 168, 0.1);
}

.feature-card p {
    color: #444444;
    line-height: 1.8;
    font-size: 15px;
    font-weight: 500;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #006666 0%, #008b8b 50%, #004d4d 100%);
    color: var(--white);
    padding: 70px 0 30px;
    direction: rtl;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0, 139, 139, 0.3);
    margin-top: 60px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 139, 139, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 139, 139, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: footerGlow 10s ease-in-out infinite alternate;
}

@keyframes footerGlow {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 139, 139, 0.5) 20%, 
        #00b3b3 50%, 
        rgba(0, 139, 139, 0.5) 80%, 
        transparent 100%);
    pointer-events: none;
    z-index: 0;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.5);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

@media (max-width: 1200px) {
    .footer-content {
        gap: 40px;
        padding: 0 25px;
    }
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
    
    .footer-column:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 0 20px;
    }
    
    .footer-column {
        text-align: center;
    }
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.15) drop-shadow(0 4px 12px rgba(0, 139, 139, 0.4));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin-bottom: 15px;
    border-radius: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 139, 139, 0.2);
}

.footer-logo-img:hover {
    transform: scale(1.1) translateY(-5px);
    filter: brightness(1.3) contrast(1.2) drop-shadow(0 8px 20px rgba(0, 230, 230, 0.6));
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 230, 230, 0.4);
}

.footer-logo-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 139, 139, 0.25);
    border-radius: 12px;
    color: #00e6e6;
    font-size: 26px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
    transition: all 0.4s ease;
}

.footer-logo-icon:hover {
    background: rgba(0, 139, 139, 0.4);
    color: #00ffff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 230, 230, 0.5);
}

/* Hide footer logo text when logo image exists */
.footer-logo-section:has(.footer-logo-img) h3 {
    display: none;
}

.footer-column h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #00e6e6;
    position: relative;
    padding-bottom: 15px;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    text-shadow: 0 2px 8px rgba(0, 230, 230, 0.3);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #00e6e6, rgba(0, 139, 139, 0.8), transparent);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 230, 230, 0.5);
}

.footer-column:hover h3 {
    color: #00ffff;
    transform: translateX(-3px);
    text-shadow: 0 2px 12px rgba(0, 255, 255, 0.5);
}

.footer-column:hover h3::after {
    width: 80px;
    box-shadow: 0 2px 12px rgba(0, 230, 230, 0.7);
}

.footer-column p {
    line-height: 1.9;
    opacity: 0.95;
    margin-bottom: 25px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.footer-column:hover p {
    opacity: 1;
    color: rgba(255, 255, 255, 1);
}

.footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-social a,
.footer-social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(0, 139, 139, 0.4);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.25);
}

.footer-social a::before,
.footer-social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #008b8b;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.footer-social a:hover::before,
.footer-social-link:hover::before {
    width: 100%;
    height: 100%;
}

.footer-social a i,
.footer-social-link i {
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-size: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* Force icon display */
.footer-social a i.fab,
.footer-social-link i.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

.footer-social a i.fas,
.footer-social-link i.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.footer-social a:hover,
.footer-social-link:hover {
    border-color: #00e6e6;
    transform: translateY(-6px) scale(1.15) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 139, 139, 0.6);
    background: rgba(0, 139, 139, 0.3);
}

.footer-social a:hover i,
.footer-social-link:hover i {
    color: var(--white);
    transform: scale(1.1);
}

/* Specific colors for each social media icon */
.footer-social a[aria-label="Telegram"]:hover,
.footer-social-link[aria-label="Telegram"]:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.footer-social a[aria-label="YouTube"]:hover,
.footer-social-link[aria-label="YouTube"]:hover {
    background: #FF0000;
    border-color: #FF0000;
}

.footer-social a[aria-label="Twitter"]:hover,
.footer-social-link[aria-label="Twitter"]:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.footer-social a[aria-label="Facebook"]:hover,
.footer-social-link[aria-label="Facebook"]:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.footer-social a[aria-label="Instagram"]:hover,
.footer-social-link[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #bc1888;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    font-weight: 500;
}

.footer-links a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 3px;
    background: #00e6e6;
    transition: width 0.4s ease;
    border-radius: 3px;
}

.footer-links a:hover {
    color: #00ffff;
    transform: translateX(-8px);
    background: rgba(0, 139, 139, 0.2);
    padding-right: 18px;
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.footer-links a:hover::before {
    width: 4px;
}

.footer-links a i {
    font-size: 11px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-links a:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.footer-contact li:hover {
    color: rgba(255, 255, 255, 1);
    transform: translateX(-6px);
    background: rgba(0, 139, 139, 0.2);
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.footer-contact li i {
    width: 22px;
    text-align: center;
    color: #00e6e6;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.4s ease;
    text-shadow: 0 2px 6px rgba(0, 230, 230, 0.4);
}

.footer-contact li:hover i {
    transform: scale(1.3) rotate(-8deg);
    color: #00ffff;
    text-shadow: 0 2px 12px rgba(0, 255, 255, 0.6);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid rgba(0, 139, 139, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.15);
    margin-top: 15px;
    padding-bottom: 10px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 139, 139, 0.6) 20%, 
        #00e6e6 50%, 
        rgba(0, 139, 139, 0.6) 80%, 
        transparent 100%);
    box-shadow: 0 2px 10px rgba(0, 230, 230, 0.5);
}

.footer-bottom p {
    margin: 0;
    line-height: 1.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Responsive Footer - Enhanced */
/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .footer {
        padding: 60px 0 25px;
    }
    
    .footer-content {
        gap: 40px;
    }
}

/* Tablet and Medium Screens */
@media (max-width: 992px) {
    .footer {
        padding: 55px 0 25px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
    }
    
    .footer-column:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-logo-section {
        align-items: center;
    }
    
    .footer-logo-img {
        max-width: 180px;
    }
    
    .footer-column p {
        text-align: center;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-social {
        justify-content: center;
        gap: 12px;
    }
    
    .footer-column h3 {
        font-size: 20px;
    }
}

/* Mobile and Small Tablets */
@media (max-width: 768px) {
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 0 20px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-logo-section {
        align-items: center;
        margin-bottom: 25px;
    }
    
    .footer-logo-img {
        max-width: 160px;
        margin: 0 auto 15px;
    }
    
    .footer-logo-icon {
        margin: 0 auto 12px;
    }
    
    .footer-column h3 {
        font-size: 20px;
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .footer-column h3::after {
        right: 50%;
        transform: translateX(50%);
        width: 60px;
        height: 3px;
    }
    
    .footer-column p {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 20px;
        text-align: center;
        max-width: 100%;
    }
    
    .footer-social {
        justify-content: center;
        gap: 15px;
        margin-top: 8px;
    }
    
    .footer-social a,
    .footer-social-link {
        width: 45px;
        height: 45px;
    }
    
    .footer-social a i,
    .footer-social-link i {
        font-size: 19px !important;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .footer-links li {
        margin-bottom: 0;
        width: 100%;
        max-width: 280px;
    }
    
    .footer-links a {
        justify-content: center;
        font-size: 15px;
        padding: 10px 0;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    
    .footer-contact li {
        justify-content: center;
        margin-bottom: 0;
        font-size: 14px;
        width: 100%;
        max-width: 320px;
    }
    
    .footer-contact li i {
        width: 22px;
        font-size: 16px;
    }
    
    .footer-bottom {
        padding-top: 25px;
        font-size: 13px;
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .footer-bottom::before {
        width: 120px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .footer {
        padding: 45px 0 20px;
    }
    
    .footer-content {
        gap: 30px;
        padding: 0 15px;
    }
    
    .footer-logo-img {
        max-width: 150px;
    }
    
    .footer-logo-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        background: rgba(0, 139, 139, 0.3);
        color: #00e6e6;
    }
    
    .footer-column h3 {
        font-size: 19px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    
    .footer-column h3::after {
        width: 45px;
        height: 2.5px;
    }
    
    .footer-column p {
        font-size: 13px;
        margin-bottom: 18px;
        line-height: 1.75;
    }
    
    .footer-social {
        gap: 12px;
    }
    
    .footer-social a,
    .footer-social-link {
        width: 42px;
        height: 42px;
    }
    
    .footer-social a i,
    .footer-social-link i {
        font-size: 17px !important;
    }
    
    .footer-links a {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .footer-contact li {
        font-size: 13px;
        gap: 10px;
        padding: 6px 10px;
    }
    
    .footer-contact li i {
        width: 20px;
        font-size: 15px;
    }
    
    .footer-bottom {
        padding-top: 22px;
        font-size: 12px;
        line-height: 1.75;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .footer-bottom::before {
        width: 100px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .footer {
        padding: 25px 0 12px;
    }
    
    .footer-content {
        gap: 25px;
        padding: 0 12px;
    }
    
    .footer-logo-img {
        max-width: 110px;
    }
    
    .footer-column h3 {
        font-size: 15px;
    }
    
    .footer-column p {
        font-size: 11px;
    }
    
    .footer-social a,
    .footer-social-link {
        width: 36px;
        height: 36px;
    }
    
    .footer-social a i,
    .footer-social-link i {
        font-size: 15px !important;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    .footer-contact li {
        font-size: 11px;
    }
    
    .footer-bottom {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .contact-info {
        flex-direction: row;
        gap: 20px;
        width: 100%;
        justify-content: center;
    }
    
    .nav-content {
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 15px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 1;
    }
    
    .logo {
        order: 2;
        flex: 1;
        justify-content: center;
    }
    
    .nav-links {
        display: none;
        order: 3;
        width: 100%;
    }
    
    .nav-buttons {
        display: none;
        order: 4;
        width: 100%;
    }
    
    .btn-login,
    .btn-register {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .hero {
        padding: 60px 0 80px;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .hadith-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .features-section {
        padding: 50px 0;
    }
    
    .knowledge-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .verse-card {
        padding: 25px 20px;
    }
    
    .verse-text {
        font-size: 18px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-logo-section {
        align-items: center;
    }
    
    .footer-logo-img {
        max-width: 150px;
        margin: 0 auto 15px;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 15px;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .footer-contact {
        align-items: center;
    }
    
    .footer-contact li {
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 450px;
        padding: 50px 0 60px;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 1.4;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        gap: 12px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .about-hero,
    .courses-hero {
        min-height: 350px;
        padding: 50px 0 40px;
    }
    
    .about-hero-title,
    .courses-hero-title,
    .teaching-staff-title {
        font-size: 24px;
        line-height: 1.4;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .features-section,
    .knowledge-section {
        padding: 40px 0;
    }
    
    .feature-card {
        padding: 25px 15px;
    }
    
    .verse-card {
        padding: 20px 15px;
    }
    
    .verse-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .contact-section {
        padding: 50px 0;
    }
    
    .contact-content {
        gap: 25px;
    }
    
    .contact-info-panel,
    .contact-form-panel {
        padding: 20px;
    }
    
    .teaching-staff-section {
        padding: 50px 0;
    }
    
    .teaching-staff-grid {
        gap: 20px;
    }
    
    .courses-grid {
        gap: 20px;
    }
}

/* ============================================
   صفحة عن المنصة (About Page)
   ============================================ */

.about-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    overflow: hidden;
    direction: rtl;
    padding: 100px 0 80px;
}

.about-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    animation: float 8s ease-in-out infinite;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 10%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.about-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.about-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 25px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.about-hero-title {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
}

.highlight-gold {
    color: var(--gold-color);
}

.about-hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    line-height: 1.6;
}

.about-hero-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
}

.hero-waves {
    position: relative;
    width: 100%;
    height: 100%;
    margin-bottom: -7px;
    min-height: 100px;
    max-height: 100px;
}

.about-section {
    padding: 80px 0;
    background: var(--white);
    direction: rtl;
}

.about-card {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--gold-color);
}

.about-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.header-with-icon {
    display: flex;
    align-items: center;
    gap: 15px;
}

.about-card-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.about-card-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.about-logo-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light-gray);
    padding: 10px 20px;
    border-radius: 25px;
}

.badge-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.badge-text {
    font-weight: 600;
    color: var(--text-color);
}

.about-card-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.mission-vision-section {
    margin: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title-alt {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--gold-color);
    margin: 0 auto;
    border-radius: 2px;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.mission-card,
.vision-card {
    background: var(--white);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.mission-card:hover,
.vision-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.mv-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.mv-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
}

.mission-icon {
    background: var(--primary-color);
}

.vision-icon {
    background: var(--gold-color);
}

.mv-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.mv-card-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.mv-card-footer {
    margin-top: 20px;
}

.mv-decorative-line {
    width: 60px;
    height: 3px;
    background: var(--gold-color);
    border-radius: 2px;
}

.values-section {
    margin: 60px 0;
}

.section-badge {
    display: inline-block;
    background: var(--gold-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.section-desc {
    font-size: 16px;
    color: var(--gray);
    margin-top: 10px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.value-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.value-card-inner {
    position: relative;
    z-index: 2;
}

.value-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
}

.value-number {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    background: var(--gold-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--gold-color);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
    margin: 0 auto 20px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

/* ============================================
   صفحة الدورات (Courses Page)
   ============================================ */

.courses-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 50%, #006666 100%);
    overflow: hidden;
    direction: rtl;
    padding: 120px 0 100px;
}

.courses-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.courses-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.08;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: float 20s ease-in-out infinite;
}

.hero-shape.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.hero-shape.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 10%;
    animation-delay: 5s;
}

.hero-shape.shape-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    left: -50px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.courses-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.courses-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    padding: 10px 24px;
    border-radius: 30px;
    margin-bottom: 30px;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.courses-badge:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.courses-badge i {
    margin-left: 8px;
    color: var(--gold-color);
}

.courses-hero-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 25px;
    line-height: 1.3;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.courses-hero-title .highlight-gold {
    color: var(--gold-color);
    position: relative;
    display: inline-block;
}

.courses-hero-title .highlight-gold::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    z-index: -1;
}

.courses-hero-subtitle {
    font-size: 19px;
    opacity: 0.98;
    line-height: 1.7;
    margin-bottom: 45px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.courses-search {
    margin-top: 40px;
}

.search-form {
    display: flex;
    gap: 12px;
    max-width: 650px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 8px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    font-size: 18px;
    opacity: 0.7;
}

.search-input {
    width: 100%;
    padding: 16px 55px 16px 25px;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.search-btn {
    padding: 16px 35px;
    background: linear-gradient(135deg, var(--gold-color) 0%, #D4A020 100%);
    color: var(--white);
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.search-btn:hover {
    background: linear-gradient(135deg, #D4A020 0%, #B8941F 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.search-btn:active {
    transform: translateY(-1px);
}

.courses-hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
}

.courses-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    direction: rtl;
    position: relative;
}

.courses-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-color), transparent);
}

.courses-filters {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filter-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-filters {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    color: var(--gold-color);
}

.filter-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-icon {
    font-size: 20px;
}

.filter-text {
    flex: 1;
    font-weight: 600;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 35px;
    width: 100%;
    box-sizing: border-box;
}

.course-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 139, 139, 0.2);
    border-color: var(--gold-color);
}

.course-card:hover::before {
    opacity: 1;
}

.course-image-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: white;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    background: white;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

.course-default-image {
    object-fit: contain;
    padding: 30px;
    background: white;
    max-width: 80%;
    max-height: 80%;
    margin: auto;
}

@media (max-width: 768px) {
    .course-default-image {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .course-default-image {
        padding: 15px;
    }
}

.course-placeholder {
    width: 100%;
    height: 100%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--gray);
}

.course-level-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.course-card:hover .course-level-badge {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.level-مبتدئ,
.level-مبتدئ {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.level-متوسط,
.level-متوسط {
    background: linear-gradient(135deg, var(--gold-color) 0%, #D4A020 100%);
}

.level-متقدم,
.level-متقدم {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.course-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.4;
    transition: color 0.3s ease;
    min-height: 62px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card:hover .course-title {
    color: var(--dark-teal);
}

.course-description {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 22px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.85;
}

.course-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.course-card:hover .meta-item {
    color: var(--dark-teal);
}

.meta-item i {
    color: var(--primary-color);
    width: 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.course-card:hover .meta-item i {
    color: var(--gold-color);
    transform: scale(1.1);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.course-price {
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
}

.price {
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--dark-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-free {
    color: #10b981;
    position: relative;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.course-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.course-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.course-btn:hover::before {
    left: 100%;
}

.course-btn:hover {
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.4);
}

.course-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.course-btn i {
    transition: transform 0.3s ease;
}

.course-btn:hover i {
    transform: translateX(-3px);
}

.no-courses {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.no-courses-icon {
    font-size: 64px;
    color: var(--gray);
    margin-bottom: 20px;
}

.no-courses h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.no-courses p {
    color: var(--text-color);
    margin-bottom: 30px;
}

/* ============================================
   Responsive Design for Courses Page - محسّن للهواتف
   ============================================ */

@media (max-width: 1200px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .courses-hero-title {
        font-size: 42px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .courses-hero {
        min-height: 400px;
        padding: 100px 0 80px;
    }
    
    .courses-hero-title {
        font-size: 36px;
    }
    
    .courses-hero-subtitle {
        font-size: 17px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .course-content {
        padding: 24px;
    }
    
    .search-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 12px;
    }
    
    .search-input {
        border-radius: 15px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
        border-radius: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .courses-hero {
        min-height: auto;
        padding: 60px 0 40px;
    }
    
    .courses-hero-content {
        padding: 0 15px;
    }
    
    .courses-hero-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .courses-hero-subtitle {
        font-size: 15px;
        margin-bottom: 25px;
        line-height: 1.5;
    }
    
    .courses-badge {
        font-size: 13px;
        padding: 8px 16px;
        margin-bottom: 20px;
    }
    
    .courses-section {
        padding: 40px 0;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }
    
    .course-card {
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    
    .course-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .course-image-wrapper {
        height: 180px;
    }
    
    .course-content {
        padding: 20px 18px;
    }
    
    .course-title {
        font-size: 18px;
        min-height: auto;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .course-description {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 16px;
    }
    
    .course-meta {
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .meta-item {
        font-size: 13px;
        gap: 8px;
    }
    
    .meta-item i {
        font-size: 14px;
        width: 16px;
    }
    
    .course-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }
    
    .course-price {
        font-size: 18px;
    }
    
    .price-free {
        font-size: 16px;
        padding: 3px 10px;
    }
    
    .course-btn {
        padding: 10px 18px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .course-btn span {
        display: inline;
    }
    
    .search-form {
        max-width: 100%;
        background: rgba(255, 255, 255, 0.95);
        padding: 8px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .search-input {
        padding: 12px 45px 12px 20px;
        font-size: 15px;
    }
    
    .search-input-wrapper i {
        right: 15px;
        font-size: 16px;
    }
    
    .search-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .hero-shape.shape-1,
    .hero-shape.shape-2,
    .hero-shape.shape-3 {
        display: none;
    }
    
    .courses-hero-wave {
        height: 60px;
    }
    
    .no-courses {
        padding: 40px 15px;
    }
    
    .no-courses-icon {
        font-size: 48px;
    }
    
    .no-courses h3 {
        font-size: 20px;
    }
    
    .no-courses p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .courses-hero {
        padding: 50px 0 30px;
    }
    
    .courses-hero-content {
        padding: 0 10px;
    }
    
    .courses-hero-title {
        font-size: 24px;
        margin-bottom: 12px;
        line-height: 1.2;
    }
    
    .courses-hero-title .highlight-gold {
        display: inline;
    }
    
    .courses-hero-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .courses-badge {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 15px;
    }
    
    .courses-badge i {
        font-size: 14px;
        margin-left: 5px;
    }
    
    .courses-section {
        padding: 30px 0;
    }
    
    .courses-grid {
        gap: 15px;
        padding: 0 5px;
    }
    
    .course-card {
        border-radius: 12px;
    }
    
    .course-image-wrapper {
        height: 160px;
    }
    
    .course-level-badge {
        top: 10px;
        right: 10px;
        padding: 5px 12px;
        font-size: 11px;
        border-radius: 15px;
    }
    
    .course-content {
        padding: 16px 14px;
    }
    
    .course-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .course-description {
        font-size: 13px;
        margin-bottom: 14px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .course-meta {
        gap: 6px;
        margin-bottom: 14px;
        padding-bottom: 14px;
    }
    
    .meta-item {
        font-size: 12px;
    }
    
    .meta-item i {
        font-size: 13px;
    }
    
    .course-footer {
        gap: 10px;
    }
    
    .course-price {
        font-size: 16px;
    }
    
    .price-free {
        font-size: 14px;
        padding: 2px 8px;
    }
    
    .course-btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .course-btn i {
        font-size: 12px;
    }
    
    .search-form {
        padding: 6px;
        gap: 8px;
    }
    
    .search-input {
        padding: 10px 40px 10px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .search-btn i {
        font-size: 14px;
    }
    
    .courses-hero-wave {
        height: 40px;
    }
}

@media (max-width: 360px) {
    .courses-hero-title {
        font-size: 22px;
    }
    
    .courses-hero-subtitle {
        font-size: 13px;
    }
    
    .course-card {
        border-radius: 10px;
    }
    
    .course-image-wrapper {
        height: 140px;
    }
    
    .course-content {
        padding: 14px 12px;
    }
    
    .course-title {
        font-size: 15px;
    }
    
    .course-btn span {
        font-size: 12px;
    }
}

/* Course Modal */
.course-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.course-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--dark-teal);
    transform: rotate(90deg);
}

.course-details-content {
    padding: 40px;
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ef4444;
}

/* ============================================
   صفحة هيئة التدريس (Scholars Page)
   ============================================ */

.teaching-staff-section {
    padding: 80px 0;
    background: var(--light-gray);
    direction: rtl;
}

.teaching-staff-header {
    text-align: center;
    margin-bottom: 60px;
}

.teaching-staff-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: 'Cairo', sans-serif;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: var(--gold-color);
    margin: 0 auto;
    border-radius: 2px;
}

.teaching-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.teaching-staff-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 139, 139, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.teaching-staff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008b8b 0%, #d4af37 50%, #008b8b 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.teaching-staff-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 139, 139, 0.2);
    border-color: #008b8b;
}

.teaching-staff-card:hover::before {
    opacity: 1;
}

.staff-image-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 30px auto 25px;
    background: linear-gradient(135deg, #008b8b 0%, #006666 100%);
    border: 5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.3), 0 0 0 3px rgba(212, 175, 55, 0.2);
    transition: all 0.4s ease;
    position: relative;
}

.teaching-staff-card:hover .staff-image-wrapper {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 139, 139, 0.4), 0 0 0 4px rgba(212, 175, 55, 0.3);
}

.staff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #008b8b;
    color: white;
    font-size: 48px;
}

.staff-content {
    padding: 25px 30px 30px;
    text-align: center;
}

.staff-name-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 139, 139, 0.1);
}

.staff-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #008b8b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.staff-name {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

.staff-specialization {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.staff-specialization i {
    color: #d4af37;
    font-size: 16px;
}

.staff-specialization .specialization-label {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
}

.staff-specialization .specialization-value {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
}

.staff-section {
    margin-bottom: 25px;
}

.staff-section:last-child {
    margin-bottom: 0;
}

.staff-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.staff-section-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.no-scholars {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.no-scholars-icon {
    font-size: 64px;
    color: var(--gray);
    margin-bottom: 20px;
}

.no-scholars h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.no-scholars p {
    color: var(--text-color);
}

/* ============================================
   صفحة اتصل بنا (Contact Page)
   ============================================ */

.contact-section {
    padding: 80px 0;
    background: var(--light-gray);
    direction: rtl;
}

.contact-main-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
}

.contact-intro {
    text-align: center;
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 50px;
}

.contact-message {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.contact-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.contact-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    margin: 0;
    width: 100%;
}

.contact-info-panel,
.contact-form-panel {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.contact-info-panel {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.contact-panel-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.contact-info-item {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.contact-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-info-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 10px;
}

.contact-info-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: var(--text-color);
}

.contact-info-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info-details a:hover {
    color: var(--gold-color);
}

.contact-info-details i {
    color: var(--primary-color);
    font-size: 18px;
}

.contact-social {
    margin-top: 30px;
}

.contact-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.contact-social-icons a,
.contact-social-link {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-social-icons a i,
.contact-social-link i {
    font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-size: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.contact-social-icons a:hover,
.contact-social-link:hover {
    background: var(--gold-color);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.contact-form {
    margin-top: 20px;
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-submit-btn:hover {
    background: var(--dark-teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
}

/* ============================================
   صفحة تسجيل الدخول (Login Page)
   ============================================ */

.login-section {
    padding: 40px 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    direction: rtl;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 139, 139, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-wrapper {
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--white);
    border-radius: 24px;
    padding: 60px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: none;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    width: 100%;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--gold-color) 100%);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Cairo', sans-serif;
}

.login-subtitle {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 40px;
    font-size: 16px;
    opacity: 0.8;
}

.login-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #ef4444;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.login-form .form-group {
    margin-bottom: 28px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.login-form label i {
    color: var(--primary-color);
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

.login-form input {
    width: 100%;
    padding: 15px 48px 15px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8f9fa;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 139, 139, 0.1);
    transform: translateY(-2px);
}

.login-form input:focus + .input-icon,
.login-form input:focus ~ .input-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.login-form input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.password-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0.6;
}

.password-toggle:hover {
    opacity: 1;
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 18px;
}

.login-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.login-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 139, 139, 0.4);
}

.login-submit-btn:active {
    transform: translateY(-1px);
}

.login-submit-btn span,
.login-submit-btn i {
    position: relative;
    z-index: 1;
}

.login-links {
    margin-top: 25px;
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.login-links p {
    color: var(--text-color);
    font-size: 15px;
    margin: 0;
}

.register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.register-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.register-link:hover {
    color: var(--dark-teal);
}

.register-link:hover::after {
    width: 100%;
}

/* Improve rejection and interview notices */
.rejection-notice,
.interview-notice {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Login Page */
@media (max-width: 992px) {
    .login-wrapper {
        max-width: 600px;
    }
    
    .login-card {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .login-section {
        padding: 30px 15px;
        min-height: calc(100vh - 150px);
    }
    
    .login-wrapper {
        max-width: 100%;
    }
    
    .login-card {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .login-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .login-form input {
        padding: 14px 44px 14px 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .input-icon {
        right: 14px;
        font-size: 15px;
    }
    
    .password-toggle {
        left: 14px;
    }
    
    .login-submit-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-form .form-group {
        margin-bottom: 22px;
    }
    
    .login-form input {
        padding: 12px 40px 12px 40px;
    }
}

.register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.register-link:hover {
    color: var(--gold-color);
}

/* Responsive for all pages */
@media (max-width: 1024px) {
    .mission-vision-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .contact-info-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .teaching-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .about-hero-title,
    .courses-hero-title,
    .teaching-staff-title,
    .contact-main-title {
        font-size: 28px;
    }
    
    .about-card,
    .mission-card,
    .vision-card,
    .contact-info-panel,
    .contact-form-panel {
        padding: 25px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .teaching-staff-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .about-hero,
    .courses-hero {
        min-height: 350px;
        padding: 60px 0 50px;
    }
    
    .about-hero-title,
    .courses-hero-title {
        font-size: 24px;
    }
    
    .about-card,
    .mission-card,
    .vision-card,
    .contact-info-panel,
    .contact-form-panel,
    .login-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

/* ============================================
   تصميم خاص للصفحة الرئيسية - الشاشات الكبيرة
   ============================================ */
@media (min-width: 992px) {
    /* Hero Section - Desktop Design */
    .hero {
        min-height: 700px;
        padding: 120px 0 100px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 50%, var(--primary-color) 100%);
        position: relative;
    }
    
    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }
    
    .hero-content {
        max-width: 1000px;
        padding: 0 50px;
    }
    
    .hero-title {
        font-size: 64px;
        margin-bottom: 30px;
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }
    
    .hero-subtitle {
        font-size: 24px;
        margin-bottom: 50px;
        line-height: 1.8;
    }
    
    .hero-buttons {
        gap: 25px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 20px 40px;
        font-size: 18px;
        border-radius: 12px;
    }
    
    /* Knowledge Section - Desktop Design */
    .knowledge-section {
        padding: 100px 0;
        background: linear-gradient(to bottom, var(--white) 0%, #f8f9fa 100%);
    }
    
    .knowledge-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 30px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .verse-card.large-card {
        grid-column: 1 / -1;
        padding: 50px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
        box-shadow: 0 10px 40px rgba(0, 139, 139, 0.3);
    }
    
    .verse-card.large-card .verse-text {
        font-size: 28px;
        line-height: 2;
    }
    
    .hadith-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
        grid-column: 1 / -1;
    }
    
    .verse-card {
        padding: 35px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .verse-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    }
    
    /* Features Section - Desktop Design */
    .features-section {
        padding: 100px 0;
        background: var(--white);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .feature-card {
        padding: 50px 35px;
        border-radius: 20px;
        position: relative;
        overflow: hidden;
    }
    
    .feature-card::after {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
        opacity: 0;
        transition: opacity 0.5s ease;
    }
    
    .feature-card:hover::after {
        opacity: 1;
    }
    
    .feature-icon {
        width: 100px;
        height: 100px;
        font-size: 40px;
        margin-bottom: 30px;
    }
    
    .feature-card h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .feature-card p {
        font-size: 16px;
        line-height: 1.9;
        color: #555555;
    }
    
    /* Footer - Desktop Design */
    .footer {
        padding: 50px 0 25px;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1.5fr 1.5fr;
        gap: 50px;
        max-width: 1400px;
        margin: 0 auto 30px;
    }
    
    .footer-column:first-child {
        padding-right: 30px;
    }
    
    .footer-logo-img {
        max-width: 200px;
        margin-bottom: 18px;
    }
    
    .footer-column p {
        font-size: 14px;
        line-height: 1.75;
        margin-bottom: 20px;
    }
    
    .footer-social {
        gap: 15px;
    }
    
    .footer-social a,
    .footer-social-link {
        width: 44px;
        height: 44px;
    }
    
    .footer-social a i,
    .footer-social-link i {
        font-size: 19px !important;
    }
    
    .footer-column h3 {
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .footer-column h3::after {
        width: 50px;
        height: 2.5px;
    }
    
    .footer-column:hover h3::after {
        width: 60px;
    }
    
    .footer-links li {
        margin-bottom: 10px;
    }
    
    .footer-links a {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .footer-contact li {
        margin-bottom: 14px;
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .footer-contact li i {
        width: 20px;
        font-size: 15px;
    }
    
    .footer-bottom {
        padding-top: 28px;
        font-size: 13px;
    }
    
    .footer-bottom::before {
        width: 80px;
    }
}

/* ============================================
   تصميم خاص للصفحة الرئيسية - الشاشات الصغيرة
   ============================================ */
@media (max-width: 991px) {
    /* Hero Section - Mobile Design */
    .hero {
        min-height: 500px;
        padding: 80px 0 60px;
        background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    }
    
    .hero-content {
        padding: 0 20px;
        text-align: center;
    }
    
    .hero-badge {
        padding: 6px 16px;
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 32px;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
        line-height: 1.6;
        padding: 0 10px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        justify-content: center;
    }
    
    /* Knowledge Section - Mobile Design */
    .knowledge-section {
        padding: 50px 0;
        background: var(--white);
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 10px;
        padding: 0 20px;
    }
    
    .section-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
        padding: 0 20px;
        color: #333333;
        font-weight: 500;
    }
    
    .knowledge-content {
        gap: 20px;
        padding: 0 15px;
    }
    
    .verse-card {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .verse-card.large-card {
        padding: 30px 20px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    }
    
    .verse-card.large-card .verse-text {
        font-size: 20px;
        line-height: 1.9;
    }
    
    .verse-card .verse-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .verse-source {
        font-size: 13px;
        margin-top: 15px;
    }
    
    .hadith-cards {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Features Section - Mobile Design */
    .features-section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 15px;
        color: #333333;
        font-weight: 500;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
        margin-top: 30px;
    }
    
    .feature-card {
        padding: 30px 25px;
        border-radius: 15px;
        text-align: center;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .feature-card h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .feature-card p {
        font-size: 14px;
        line-height: 1.7;
        color: #444444;
        font-weight: 500;
    }
    
    /* Footer - Mobile Design */
    .footer {
        padding: 35px 0 18px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
        margin-bottom: 25px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-logo-section {
        align-items: center;
        margin-bottom: 20px;
    }
    
    .footer-logo-img {
        max-width: 150px;
        margin: 0 auto 12px;
    }
    
    .footer-column p {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 18px;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
        margin-top: 5px;
    }
    
    .footer-social a,
    .footer-social-link {
        width: 40px;
        height: 40px;
    }
    
    .footer-social a i,
    .footer-social-link i {
        font-size: 18px !important;
    }
    
    .footer-column h3 {
        font-size: 17px;
        margin-bottom: 16px;
        text-align: center;
        padding-bottom: 10px;
    }
    
    .footer-column h3::after {
        display: block;
        right: 50%;
        transform: translateX(50%);
        width: 35px;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .footer-links li {
        margin-bottom: 0;
        width: 100%;
    }
    
    .footer-links a {
        justify-content: center;
        font-size: 14px;
        padding: 10px 0;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .footer-contact li {
        justify-content: center;
        margin-bottom: 0;
        font-size: 14px;
        text-align: center;
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-contact li i {
        font-size: 20px;
    }
    
    .footer-bottom {
        padding-top: 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 13px;
        text-align: center;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ============================================
   تحسينات إضافية للشاشات المتوسطة
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        min-height: 550px;
        padding: 100px 0 80px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .knowledge-content {
        display: flex;
        flex-direction: column;
    }
    
    .verse-card.large-card {
        order: -1;
    }
    
    .hadith-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        align-items: start;
    }
}

/* ============================================
   تحسينات إضافية للسايدبار
   ============================================ */

/* تأثيرات بصرية إضافية للسايدبار */
.sidebar {
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--gold-color) 100%);
    z-index: 1;
}

/* تحسين أيقونة الإعدادات */
.settings-icon {
    position: relative;
    overflow: hidden;
}

.settings-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.settings-icon:hover::after {
    width: 100%;
    height: 100%;
}

/* تحسين صورة الملف الشخصي */
.profile-image {
    position: relative;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--gold-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image:hover::after {
    opacity: 1;
}

/* تحسين الروابط النشطة */
.nav-item.active .nav-link {
    position: relative;
}

.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold-color);
    border-radius: 0 10px 10px 0;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* تأثيرات hover محسّنة */
.nav-link {
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-50%) skewX(-20deg);
    transition: right 0.5s ease;
}

.nav-link:hover::after {
    right: 100%;
}

/* تحسين العناوين */
.section-title {
    position: relative;
    padding-right: 25px;
}

.section-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--gold-color);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* تحسين scrollbar للسايدبار على الهواتف */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
        max-width: 260px;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .nav-link i,
    .nav-link ion-icon {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .user-role {
        font-size: 13px;
    }
}

/* تحسينات للوضع الليلي */
body.dark-mode .sidebar {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    border-left-color: rgba(77, 182, 172, 0.2);
}

body.dark-mode .sidebar-header {
    background: linear-gradient(135deg, rgba(77, 182, 172, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-bottom-color: rgba(77, 182, 172, 0.2);
}

body.dark-mode .nav-link:hover {
    background: linear-gradient(90deg, rgba(77, 182, 172, 0.15) 0%, rgba(77, 182, 172, 0.08) 100%);
}

body.dark-mode .nav-item.active .nav-link {
    background: linear-gradient(90deg, #1a4d4d 0%, rgba(26, 77, 77, 0.95) 100%);
    box-shadow: 0 4px 15px rgba(77, 182, 172, 0.3);
}

body.dark-mode .section-title {
    color: #4db6ac;
}

body.dark-mode .section-title::before {
    background: linear-gradient(90deg, transparent 0%, rgba(77, 182, 172, 0.3) 100%);
}

body.dark-mode .section-title::after {
    background: #4db6ac;
    box-shadow: 0 0 8px rgba(77, 182, 172, 0.6);
}

/* ============================================
   تصميم احترافي لعرض تفاصيل الدورة في نفس الصفحة
   ============================================ */

.course-details-section {
    padding: 40px 0 80px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.back-to-courses-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-to-courses-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 139, 139, 0.3);
}

.back-to-courses-btn i {
    transition: transform 0.3s ease;
}

.back-to-courses-btn:hover i {
    transform: translateX(-3px);
}

.course-details-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-details-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    padding: 50px 40px;
    color: var(--white);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.course-details-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.details-image-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.details-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.details-placeholder {
    width: 100%;
    height: 250px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: rgba(255, 255, 255, 0.5);
}

.details-image.course-default-image {
    object-fit: contain;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.details-level {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.details-header-content {
    position: relative;
    z-index: 1;
}

.details-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.details-scholar {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.details-scholar i {
    font-size: 20px;
}

.details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.details-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.details-meta .meta-item i {
    font-size: 18px;
}

.course-details-body {
    padding: 50px 40px;
}

.details-section {
    margin-bottom: 50px;
}

.details-section:last-child {
    margin-bottom: 0;
}

.details-section .section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--gold-color);
    position: relative;
}

.details-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-color) 0%, transparent 100%);
}

.details-section .section-title i {
    color: var(--gold-color);
    font-size: 22px;
}

.details-description {
    font-size: 17px;
    line-height: 2;
    color: var(--text-color);
    text-align: justify;
}

/* تصميم المواد الدراسية */
.subjects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.subject-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subject-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--gold-color) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.subject-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.15);
    border-color: var(--primary-color);
}

.subject-item:hover::before {
    transform: scaleY(1);
}

.subject-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
}

.subject-content {
    flex: 1;
}

.subject-content h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subject-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0 0 15px 0;
}

.subject-scholar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.scholar-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 139, 139, 0.2);
}

.scholar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scholar-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.scholar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scholar-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
}

.scholar-name {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 700;
}

/* تصميم جدول الدروس */
.lessons-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.day-lessons {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.day-lessons:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 139, 139, 0.1);
    transform: translateY(-3px);
}

.day-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.day-title i {
    color: var(--gold-color);
    font-size: 18px;
}

.lessons-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lesson-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lesson-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.lesson-item:hover {
    border-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.1);
}

.lesson-item:hover::before {
    transform: scaleY(1);
}

.lesson-time {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 139, 139, 0.2);
}

.lesson-time i {
    font-size: 16px;
}

.lesson-info {
    flex: 1;
}

.lesson-info h5 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.lesson-subject {
    display: inline-block;
    background: rgba(0, 139, 139, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
}

.loading-spinner {
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 18px;
    color: var(--text-light);
    margin-top: 15px;
}

.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    margin: 20px 0;
    border: 2px solid #fca5a5;
}

.error-message i {
    margin-left: 8px;
    font-size: 20px;
}

/* Responsive Design - محسّن للهواتف */
@media (max-width: 992px) {
    .course-details-section {
        padding: 30px 0 60px;
    }
    
    .back-to-courses-btn {
        margin: 0 15px 20px;
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .course-details-header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .details-image-wrapper {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .details-image {
        height: 200px;
    }
    
    .details-title {
        font-size: 26px;
        text-align: center;
    }
    
    .details-scholar {
        margin: 0 auto 15px;
        justify-content: center;
        font-size: 15px;
        padding: 10px 18px;
    }
    
    .details-meta {
        justify-content: center;
        gap: 12px;
    }
    
    .details-meta .meta-item {
        font-size: 14px;
        padding: 8px 14px;
    }
    
    .course-details-body {
        padding: 35px 20px;
    }
    
    .subjects-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .lessons-schedule {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .course-details-section {
        padding: 20px 0 40px;
    }
    
    .back-to-courses-btn {
        margin: 0 10px 15px;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .back-to-courses-btn i {
        font-size: 14px;
    }
    
    .course-details-content {
        border-radius: 12px;
        margin: 0 10px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    }
    
    .course-details-header {
        padding: 25px 15px;
        gap: 15px;
    }
    
    .details-image-wrapper {
        max-width: 300px;
        border-radius: 12px;
    }
    
    .details-image {
        height: 180px;
    }
    
    .details-level {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 15px;
    }
    
    .details-title {
        font-size: 22px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .details-scholar {
        font-size: 14px;
        padding: 8px 16px;
        margin-bottom: 12px;
    }
    
    .details-scholar i {
        font-size: 16px;
    }
    
    .details-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .details-meta .meta-item {
        font-size: 13px;
        padding: 7px 12px;
        border-radius: 15px;
    }
    
    .details-meta .meta-item i {
        font-size: 15px;
    }
    
    .course-details-body {
        padding: 25px 15px;
    }
    
    .details-section {
        margin-bottom: 30px;
    }
    
    .details-section .section-title {
        font-size: 18px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .details-section .section-title i {
        font-size: 18px;
    }
    
    .details-description {
        font-size: 15px;
        line-height: 1.8;
        text-align: justify;
    }
    
    .subjects-list {
        gap: 15px;
    }
    
    .subject-item {
        padding: 20px;
        border-radius: 12px;
        gap: 15px;
    }
    
    .subject-number {
        width: 45px;
        height: 45px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .subject-content h4 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .subject-content p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .subject-scholar {
        margin-top: 12px;
        padding-top: 12px;
        gap: 10px;
    }
    
    .scholar-avatar {
        width: 40px;
        height: 40px;
    }
    
    .scholar-name {
        font-size: 14px;
    }
    
    .lessons-schedule {
        gap: 15px;
    }
    
    .day-lessons {
        padding: 20px;
        border-radius: 12px;
    }
    
    .day-title {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .day-title i {
        font-size: 16px;
    }
    
    .lessons-list {
        gap: 12px;
    }
    
    .lesson-item {
        padding: 15px;
        border-radius: 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .lesson-time {
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 13px;
        min-width: auto;
    }
    
    .lesson-time i {
        font-size: 14px;
    }
    
    .lesson-info h5 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .lesson-subject {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 12px;
    }
    
    .loading-spinner {
        padding: 60px 15px;
    }
    
    .loading-spinner i {
        font-size: 36px;
    }
    
    .loading-spinner p {
        font-size: 16px;
    }
    
    .error-message {
        margin: 15px;
        font-size: 14px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .course-details-section {
        padding: 15px 0 30px;
    }
    
    .back-to-courses-btn {
        margin: 0 8px 12px;
        padding: 7px 14px;
        font-size: 12px;
        gap: 6px;
    }
    
    .course-details-content {
        border-radius: 10px;
        margin: 0 8px;
    }
    
    .course-details-header {
        padding: 20px 12px;
    }
    
    .details-image-wrapper {
        max-width: 250px;
        border-radius: 10px;
    }
    
    .details-image {
        height: 150px;
    }
    
    .details-level {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .details-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .details-scholar {
        font-size: 13px;
        padding: 6px 14px;
        gap: 8px;
    }
    
    .details-scholar i {
        font-size: 14px;
    }
    
    .details-meta {
        gap: 8px;
    }
    
    .details-meta .meta-item {
        font-size: 12px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .details-meta .meta-item i {
        font-size: 13px;
    }
    
    .course-details-body {
        padding: 20px 12px;
    }
    
    .details-section {
        margin-bottom: 25px;
    }
    
    .details-section .section-title {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        gap: 8px;
    }
    
    .details-section .section-title i {
        font-size: 16px;
    }
    
    .details-description {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .subject-item {
        padding: 15px;
        border-radius: 10px;
        gap: 12px;
    }
    
    .subject-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 8px;
    }
    
    .subject-content h4 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .subject-content p {
        font-size: 13px;
    }
    
    .scholar-avatar {
        width: 35px;
        height: 35px;
        border-width: 2px;
    }
    
    .scholar-avatar-placeholder {
        font-size: 16px;
    }
    
    .scholar-label {
        font-size: 11px;
    }
    
    .scholar-name {
        font-size: 13px;
    }
    
    .day-lessons {
        padding: 15px;
        border-radius: 10px;
    }
    
    .day-title {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        gap: 6px;
    }
    
    .day-title i {
        font-size: 14px;
    }
    
    .lesson-item {
        padding: 12px;
        border-radius: 8px;
        gap: 8px;
    }
    
    .lesson-time {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .lesson-time i {
        font-size: 12px;
    }
    
    .lesson-info h5 {
        font-size: 14px;
    }
    
    .lesson-subject {
        font-size: 11px;
        padding: 3px 8px;
        border-radius: 10px;
    }
    
    .loading-spinner {
        padding: 50px 10px;
    }
    
    .loading-spinner i {
        font-size: 32px;
    }
    
    .loading-spinner p {
        font-size: 14px;
    }
    
    .error-message {
        margin: 10px;
        font-size: 13px;
        padding: 12px;
        border-radius: 8px;
    }
    
    .error-message i {
        font-size: 16px;
        margin-left: 6px;
    }
}

@media (max-width: 360px) {
    .details-title {
        font-size: 18px;
    }
    
    .details-image-wrapper {
        max-width: 220px;
    }
    
    .details-image {
        height: 130px;
    }
    
    .subject-item {
        padding: 12px;
    }
    
    .subject-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .subject-content h4 {
        font-size: 15px;
    }
    
    .day-lessons {
        padding: 12px;
    }
    
    .lesson-item {
        padding: 10px;
    }
}

