/* ============================================
   COURSE CARD STYLES
   ============================================ */

.category-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-size: 2.5rem;
    color: #106E3F;
    margin-bottom: 12px;
    line-height: 1.4;
    text-align: center;
}

.card-desc, .short-desc {
    color: #666;
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.btn-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3498db;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-cat:hover {
    background: #2980b9;
    color: #fff;
    text-decoration: none;
    gap: 12px;
}

.btn-cat svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ============================================
   COURSE CARDS GRID
   ============================================ */

.course-cards-wrapper,
.all-courses-wrapper {
    margin-top: 20px;
}

.course-cards-wrapper .category-card,
.all-courses-wrapper .category-card {
    margin-bottom: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .card-img {
        height: 180px;
    }
    
    .card-content h3 {
        font-size: 1.25rem;
    }
    
    .card-desc {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .btn-cat {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .card-img {
        height: 160px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .card-content h3 {
        font-size: 1.1rem;
    }
}

/* ============================================
   COURSE CATEGORIES LIST
   ============================================ */

.course-categories {
    margin: 20px 0;
}

.course-categories .list-group-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.course-categories .list-group-item:hover {
    border-left-color: #3498db;
    background: #f8f9fa;
}

.course-categories .list-group-item a {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.course-categories .list-group-item a:hover {
    color: #3498db;
}

.course-categories .badge {
    background: #3498db;
    padding: 5px 10px;
    border-radius: 12px;
}

/* ============================================
   LOADING STATE (Optional)
   ============================================ */

.category-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.category-card.loading .card-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
