/* Container: sidebar + main content */
.fitness-library-container {
    display: flex;
    gap: 2rem;
    box-sizing: border-box;
    font-family: system-ui, sans-serif;
}
.library-filters {
    width: 250px;
    border: 1px solid #ccc;
    padding: 0.75rem; /* slightly less padding */
    background: #f9f9f9;
    border-radius: 8px;
    height: fit-content;
}
/* Remove extra spacing between filter headings and groups */
.library-filters h3 {
    margin-top: 0;
    margin-bottom: 0.25rem; /* reduce spacing */
    font-size: 1rem;
    color: #333;
}

/* Compact checkbox labels */
.filter-group label,
.nested label {
    display: block;
    margin-bottom: 0.25rem; /* reduce vertical space */
    cursor: pointer;
    font-size: 0.9rem;
}

/* Nested children indentation */
.nested {
    padding-left: 12px; /* slightly less indentation */
    border-left: 1px dashed #ddd;
    margin-bottom: 0.25rem; /* reduce spacing below nested group */
}

/* Equipment dropdown compact styling */
.library-filters select.fitness-filter {
    width: 100%;
    padding: 0.3rem 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border-radius: 4px;
    border: 1px solid #ccc;
}


/* Main content wrapper: count + grid stacked vertically */
.library-main {
    flex: 1;
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: 1rem;
}

/* Count display stays above grid */
#fitness-count {
    font-weight: 500;
    font-size: 1rem;
}

#fitness-count-number {
    font-weight: bold;
    color: #0073aa;
}

/* Grid layout */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: min-content;
    gap: 1rem;
}

/* Video cards */
.library-grid .fitness-video-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.library-grid .fitness-video-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.library-grid .fitness-video-card a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.library-grid .fitness-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .fitness-library-container {
        flex-direction: column;
    }

    .library-filters {
        width: 100%;
        margin-bottom: 1rem;
    }
}


.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.course-card {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
}