/* ============================================
   COURSES PAGE STYLES - CLEAN & PROFESSIONAL
   ============================================ */

/* Hero Section - Consistent with Home Page */
.courses-hero {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.courses-hero::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="hero-dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23hero-dots)"/></svg>');
    opacity: 0.3;
}

.courses-hero .container {
    position: relative;
    z-index: 2;
}

.courses-hero h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.courses-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
}

.courses-hero .hero-image {
    text-align: center;
}

.courses-hero .hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Hero Feature Cards - Balanced Size */
.hero-feature-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 160px;
}

.hero-feature-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.98);
}

.hero-feature-card:hover .hero-feature-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.hero-feature-icon {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-feature-text {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Page Header - Simplified */
.page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

/* Stat Items - Clean & Professional */
.stat-item {
    padding: 2rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(220, 53, 69, 0.1);
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray);
    margin: 0;
    font-weight: 500;
}

/* Course Cards - Clean & Professional */
.course-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.12);
}

.course-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

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

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

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.course-badge .badge {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.course-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 1.1rem;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.course-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    height: 4.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.course-stats {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.course-stats small {
    color: var(--gray);
    transition: color 0.2s ease;
    font-weight: 500;
}

.course-stats small strong {
    font-weight: 700;
    color: var(--primary-red);
}

.course-duration {
    margin-bottom: 1.25rem;
    text-align: center;
    padding: 0.75rem;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.course-duration small {
    color: var(--gray);
    font-weight: 500;
}

.course-duration .text-danger {
    color: var(--primary-red) !important;
}

.course-action {
    margin-top: auto;
}

.course-action .btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    border: none;
}

.course-action .btn-primary {
    background: var(--primary-red);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.2);
}

.course-action .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    background: var(--dark-red);
}

.course-action .btn-success {
    background: #28a745;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.2);
}

.course-action .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    background: #218838;
}

/* Simple fade-in animation - Performance Optimized */
.course-card {
    opacity: 0;
    animation: simpleFadeIn 0.4s ease forwards;
}

.course-card:nth-child(1) { animation-delay: 0.1s; }
.course-card:nth-child(2) { animation-delay: 0.15s; }
.course-card:nth-child(3) { animation-delay: 0.2s; }
.course-card:nth-child(4) { animation-delay: 0.25s; }
.course-card:nth-child(5) { animation-delay: 0.3s; }
.course-card:nth-child(6) { animation-delay: 0.35s; }

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

/* Main Content Background */
.py-5.bg-white {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-hero h1 {
        font-size: 2.5rem;
    }
    
    .courses-hero p {
        font-size: 1.1rem;
    }
    
    .hero-feature-card {
        min-width: auto;
        width: 100%;
        padding: 1rem 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-feature-icon {
        font-size: 2rem;
    }
    
    .hero-feature-text {
        font-size: 0.9rem;
    }
    
    .course-card {
        margin-bottom: 2rem;
        height: auto;
        animation: none; /* Disable animation on mobile for performance */
        opacity: 1;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .course-title {
        height: auto;
        -webkit-line-clamp: 2;
    }
    
    .course-description {
        height: auto;
        -webkit-line-clamp: 2;
    }
    
    .course-card:hover {
        transform: translateY(-2px); /* Simpler hover on mobile */
    }
}

@media (max-width: 576px) {
    .courses-hero {
        min-height: 500px;
    }
    
    .courses-hero h1 {
        font-size: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}