/**
 * Course Cards - No Images Design
 * Optimized for performance by removing image requests
 * Date: 2025-11-21
 */

/* Course Header with Initials/Icon */
.course-header {
    position: relative;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 10px 0 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-icon-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.course-item:hover .course-initials {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Course Tag - repositioned for no-image design */
.course-tag {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(230, 126, 22, 0.95);
    color: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.course-tag i {
    font-size: 10px;
}

/* Course Item - Optimized Layout */
.course-item {
    position: relative;
    background: #ffffff !important;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Course Content - Adjusted Padding */
.course-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border-radius: 0 0 10px 10px;
}

.course-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.course-title a {
    color: #2c3e50 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-title a:hover {
    color: #667eea !important;
}

.course-text {
    flex-grow: 1;
    margin-bottom: 10px;
    color: #6c757d !important;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.course-meta span {
    color: #2c3e50 !important;
}

.course-meta i {
    color: #667eea !important;
}

.course-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

/* Similar Course Cards - Sidebar */
.similar-course-card {
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.similar-course-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.similar-course-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Remove old image-related styles */
.course-img {
    display: none !important;
}

.course-img img {
    display: none !important;
}

.course-img::before {
    display: none !important;
}

.course-img a {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .course-header {
        min-height: 70px;
        padding: 12px;
    }
    
    .course-initials {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .course-content {
        padding: 12px;
    }
    
    .course-title {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .course-header {
        min-height: 60px;
        padding: 10px;
    }
    
    .course-initials {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .course-tag {
        font-size: 10px;
        padding: 3px 10px;
        right: 8px;
        top: 8px;
    }
    
    .similar-course-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 14px;
    }
}

/* Grid Layout Optimization */
.row-cols-lg-5 > .col {
    padding: 0 8px;
}

.row-cols-lg-5 {
    row-gap: 16px;
}

/* Accessibility */
.course-item[role="article"]:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Performance: Prevent layout shift */
.course-item {
    contain: layout style paint;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .course-item {
        background: #1e293b;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .course-title a {
        color: #e2e8f0;
    }
    
    .course-text {
        color: #94a3b8;
    }
    
    .course-meta {
        border-bottom-color: #334155;
    }
    
    .course-bottom {
        border-top-color: #334155;
    }
}
