/* ===== صفحة الملف الشخصي للمدرب ===== */

.teacher-profile-header { 
    background: linear-gradient(135deg, #8E1751, #BD3A77); 
    color: white; 
    border-radius: 2rem; 
    padding: 3rem 2rem; 
    margin-bottom: 3rem; 
    position: relative; 
    overflow: hidden; 
}

.teacher-profile-header::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>'); 
    opacity: 0.3; 
}

.teacher-avatar { 
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    border: 5px solid rgba(255,255,255,0.3); 
    object-fit: cover; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.2); 
    position: relative; 
    z-index: 2; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.teacher-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.teacher-info { 
    position: relative; 
    z-index: 2; 
}

.teacher-name { 
    font-size: 2.5rem; 
    font-weight: 700; 
    margin-bottom: 0.5rem; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
}

.teacher-specialty { 
    font-size: 1.2rem; 
    opacity: 0.9; 
    margin-bottom: 1rem; 
    font-weight: 400;
}

.teacher-rating { 
    margin-bottom: 1rem; 
}

.rating-stars { 
    font-size: 1.2rem; 
    display: inline-block;
}

.rating-stars .fas.fa-star, 
.rating-stars .fas.fa-star-half-alt { 
    color: #ffc107 !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.rating-stars .far.fa-star { 
    color: rgba(255,255,255,0.5) !important; 
}

.teacher-stats { 
    background: transparent; 
    border-radius: 0; 
    padding: 0; 
    backdrop-filter: none; 
    border: none; 
    transition: none;
    box-shadow: none;
}

.teacher-stats:hover {
    transform: none;
    box-shadow: none;
}

.stat-item { 
    text-align: center; 
    transition: none;
}

.stat-item:hover {
    transform: none;
}

.stat-number { 
    font-size: 3rem; 
    font-weight: 800; 
    display: block; 
    text-shadow: none;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-label { 
    font-size: 1.3rem; 
    opacity: 1; 
    font-weight: 600;
    color: white;
    text-shadow: none;
}

/* ===== أقسام الدورات ===== */

.courses-section { 
    background: #fff; 
    border-radius: 2rem; 
    box-shadow: 0 4px 32px rgba(142,23,81,0.10); 
    padding: 2rem; 
    margin-bottom: 2rem; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courses-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(142,23,81,0.15);
}

.section-title { 
    color: #8E1751; 
    font-size: 1.8rem; 
    font-weight: 700; 
    margin-bottom: 1.5rem; 
    position: relative; 
    padding-bottom: 0.5rem; 
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    right: 0; 
    width: 60px; 
    height: 3px; 
    background: linear-gradient(135deg, #8E1751, #BD3A77); 
    border-radius: 2px; 
}

.section-title i {
    color: #BD3A77;
    font-size: 1.5rem;
}

/* ===== بطاقات الدورات ===== */

/* ===== تحسينات بطاقات الدورات ===== */
.course-card {
    border-radius: 18px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 4px 18px rgba(142,23,81,0.10);
    position: relative;
}

.course-card:hover {
    box-shadow: 0 10px 32px rgba(142,23,81,0.13), 0 2px 8px rgba(142,23,81,0.07);
    transform: translateY(-7px) scale(1.02);
}

.course-img-wrapper {
    height: 210px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.course-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.3s;
}

.course-card:hover .course-img-wrapper img {
    transform: scale(1.06);
}

.course-status {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 0.3em 0.8em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.status-current {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.status-past {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #8E1751;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.4;
}

.course-details {
    flex: 1;
    margin-bottom: 1rem;
}

.course-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
}

.course-details i {
    width: 16px;
    margin-left: 0.5rem;
    color: #8E1751;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.course-price { 
    font-weight: 600; 
    color: #8E1751; 
    font-size: 1rem; 
}

.course-price small {
    font-size: 0.8rem;
    font-weight: 400;
    margin-right: 0.5rem;
}

.course-price del {
    color: #999;
    text-decoration: line-through;
}

.course-meta .btn {
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.course-meta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142,23,81,0.2);
}

/* ===== زر العودة ===== */

.back-btn { 
    background: linear-gradient(135deg, #8E1751, #BD3A77); 
    border: none; 
    border-radius: 2rem; 
    padding: 0.75rem 2rem; 
    color: white; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
    box-shadow: 0 4px 12px rgba(142,23,81,0.2);
}

.back-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(142,23,81,0.3); 
    color: white; 
    text-decoration: none; 
}

.back-btn i {
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-3px);
}

/* ===== رسائل عدم وجود دورات ===== */

.no-courses { 
    text-align: center; 
    padding: 3rem; 
    color: #666; 
}

.no-courses i { 
    font-size: 4rem; 
    color: #ddd; 
    margin-bottom: 1rem; 
    opacity: 0.5;
}

.no-courses h4 {
    color: #8E1751;
    margin-bottom: 0.5rem;
}

.no-courses p {
    color: #888;
    font-size: 1rem;
}

/* ===== التجاوب مع الشاشات الصغيرة ===== */

@media (max-width: 768px) {
    .teacher-profile-header { 
        padding: 2rem 1rem; 
    }
    
    .teacher-name { 
        font-size: 2rem; 
    }
    
    .teacher-avatar { 
        width: 120px; 
        height: 120px; 
    }
    
    .courses-section { 
        padding: 1.5rem; 
    }
    
    .section-title { 
        font-size: 1.5rem; 
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .back-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .teacher-profile-header {
        padding: 1.5rem 1rem;
    }
    
    .teacher-name {
        font-size: 1.8rem;
    }
    
    .teacher-specialty {
        font-size: 1rem;
    }
    
    .teacher-stats {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .courses-section {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .course-content {
        padding: 1rem;
    }
}

/* ===== تأثيرات إضافية ===== */

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #8E1751, #BD3A77);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card:hover::before {
    transform: scaleX(1);
}

.teacher-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    border-radius: 0;
    pointer-events: none;
    display: none;
}

/* ===== تحسينات للأداء ===== */

.course-card,
.teacher-stats,
.back-btn {
    will-change: transform;
}

.teacher-avatar,
.course-img-wrapper img {
    will-change: transform;
}

/* ===== تحسين إمكانية الوصول ===== */

.course-title:focus,
.back-btn:focus {
    outline: 2px solid #8E1751;
    outline-offset: 2px;
}

.teacher-name:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

/* تحسين التخطيط على الشاشات الصغيرة */
@media (max-width: 768px) {
    .course-card {
        min-height: 380px;
    }
    
    .course-img-wrapper {
        height: 180px;
    }
    
    .course-content {
        padding: 1rem;
    }
    
    .course-title {
        font-size: 1.1rem;
    }
    
    .course-details p {
        font-size: 0.85rem;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .course-meta .btn {
        width: 100%;
    }
}