/* ========================================
   إصلاح شامل لتصميم University Theme
   ======================================== */

/* 1. إصلاح صورة Banner الكبيرة */
.banner-area.banner-bg-three {
    min-height: auto !important;
    max-height: 600px !important;
    padding: 70px 0 50px !important;
    overflow: hidden;
}

.banner__images-three {
    position: relative;
    max-height: 480px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner__images-three .main-img {
    max-height: 420px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

.banner__images-three .big-shape {
    max-height: 380px !important;
}

.banner__images-three .big-shape img {
    max-height: 380px !important;
    object-fit: contain !important;
}

/* 2. تحسين قسم الكورسات */
.modern-courses-section {
    padding: 70px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title .subtitle {
    display: inline-block;
    color: #5751e1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

/* 3. أزرار الفلترة */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 35px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.filter-tab {
    padding: 9px 16px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    background: #fff;
    color: #5e6278;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: #5751e1;
    color: #5751e1;
    transform: translateY(-1px);
}

.filter-tab.active {
    background: #5751e1;
    border-color: #5751e1;
    color: #fff;
}

.filter-tab .badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

.filter-tab.active .badge {
    background: rgba(255,255,255,0.25);
}

/* 4. Grid الكورسات */
.courses-wrapper {
    position: relative;
    min-height: 350px;
}

.courses-grid {
    display: none !important;
}

.courses-grid.show-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
    animation: fadeInGrid 0.4s ease;
}

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

/* 5. بطاقة الكورس */
.course-box {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(87,81,225,0.14);
}

.course-thumb {
    position: relative;
    height: 185px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.course-box:hover .course-thumb img {
    transform: scale(1.07);
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(87,81,225,0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-box:hover .hover-overlay {
    opacity: 1;
}

.view-btn {
    padding: 7px 18px;
    background: rgba(255,255,255,0.95);
    color: #5751e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #fff;
    transform: scale(1.04);
}

.course-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f4ff;
    color: #5751e1;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    width: fit-content;
}

.course-title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    min-height: 42px;
}

.course-title a {
    color: #1a1a2e;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-title a:hover {
    color: #5751e1;
}

.course-desc {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* 6. زر عرض الكل */
.view-all-wrap {
    text-align: center;
    margin-top: 45px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: #5751e1;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(87,81,225,0.3);
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #4338ca;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(87,81,225,0.4);
}

/* 7. قسم فريق العمل */
.modern-team-section {
    padding: 70px 0;
    background: #fff;
}

.team-slider-wrap {
    position: relative;
    padding: 0 42px;
}

.team-slider {
    overflow: hidden;
}

.team-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(87,81,225,0.14);
}

.team-photo {
    display: block;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.05);
}

.team-details {
    padding: 15px;
    text-align: center;
}

.team-details .name {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.team-details .name a {
    color: #1a1a2e;
    text-decoration: none;
}

.team-details .name a:hover {
    color: #5751e1;
}

.team-details .role {
    display: block;
    color: #5751e1;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 7px;
}

.team-details .bio {
    margin: 0 0 9px 0;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.5;
    min-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 9px 0;
    padding: 7px 0;
    border-top: 1px solid #f1f3f5;
    border-bottom: 1px solid #f1f3f5;
}

.info-row span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
}

.info-row i {
    color: #5751e1;
    font-size: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 9px;
}

.social-links a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #5751e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #5751e1;
    color: #fff;
    transform: translateY(-2px);
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: #5751e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-arrow:hover {
    background: #5751e1;
    color: #fff;
    transform: translateY(-50%) scale(1.06);
}

.prev-arrow {
    left: 0;
}

.next-arrow {
    right: 0;
}

/* Pagination Dots */
.dots-pagination {
    text-align: center;
    margin-top: 25px;
}

.dots-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    opacity: 1;
    margin: 0 3px;
}

.dots-pagination .swiper-pagination-bullet-active {
    width: 20px;
    border-radius: 4px;
    background: #5751e1;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .section-title h2 {
        font-size: 26px;
    }
    
    .courses-grid.show-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .banner-area.banner-bg-three {
        padding: 50px 0 35px !important;
        max-height: 500px !important;
    }
    
    .banner__images-three {
        max-height: 320px !important;
        margin-top: 25px;
    }
    
    .banner__images-three .main-img {
        max-height: 280px !important;
    }
    
    .modern-courses-section,
    .modern-team-section {
        padding: 55px 0;
    }
    
    .section-title h2 {
        font-size: 23px;
    }
    
    .filter-tabs {
        gap: 6px;
        padding: 10px;
    }
    
    .filter-tab {
        padding: 7px 13px;
        font-size: 12px;
    }
    
    .courses-grid.show-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .course-thumb {
        height: 200px;
    }
    
    .course-title {
        font-size: 14px;
        min-height: auto;
    }
    
    .team-slider-wrap {
        padding: 0 36px;
    }
    
    .team-photo {
        height: 200px;
    }
    
    .team-details {
        padding: 13px;
    }
    
    .team-details .bio {
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .banner-area.banner-bg-three {
        padding: 40px 0 30px !important;
    }
    
    .section-title .subtitle {
        font-size: 11px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .filter-tab {
        font-size: 11px;
        padding: 6px 11px;
    }
    
    .filter-tab .badge {
        font-size: 10px;
        padding: 1px 5px;
    }
}

/* ===================================================================
   ALL INSTRUCTORS PAGE - IMPROVEMENTS
   =================================================================== */
.instructor__area .instructor__item {
    transition: all 0.3s ease;
}

.instructor__area .instructor__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.instructor__area .instructor__content .short-bio {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    line-height: 1.6;
}

.instructor__area .instructor__content .designation {
    display: block;
    font-size: 14px;
    color: #5751e1;
    font-weight: 600;
    margin-bottom: 5px;
}

.instructor__area .instructor__content > span {
    display: inline-block;
    font-size: 13px;
    color: #888;
    margin-right: 15px;
}

.instructor__area .instructor__content .avg-rating {
    margin: 10px 0;
    font-size: 14px;
}

.instructor__area .instructor__content .avg-rating i {
    color: #ffc224;
    margin-right: 5px;
}

.instructor__area .alert-info {
    padding: 40px;
    margin: 40px 0;
    font-size: 16px;
}

/* ===================================================================
   INSTRUCTOR DETAILS PAGE - FIX BADGES
   =================================================================== */
.instructor__details-content .badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.instructor__details-content .badges li {
    list-style: none;
}

.instructor__details-content .badges li img {
    max-width: 50px;
    height: auto;
}

