.courseware-category {
    margin-bottom: 30px;
}

.courseware-category-title {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.courseware-category-title i.fa-chevron-down {
    font-size: 0.9rem;
    transition: transform 0.3s;
}

.courseware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.courseware-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.courseware-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.courseware-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-placeholder {
    text-align: center;
    padding: 20px;
}

.thumbnail-placeholder i {
    font-size: 2.5rem;
    color: #ccc;
    margin-bottom: 8px;
    display: block;
}

.thumbnail-placeholder span {
    font-size: 0.85rem;
    color: #999;
    display: block;
}

.courseware-info {
    padding: 15px;
}

.courseware-info h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
}
