/* Courses Tool Styles */
.courses-container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

/* Hero Section */
.courses-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    /* Glassmorphism check */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.courses-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.courses-hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-hero-primary {
    background: #fff;
    color: #0f172a;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Toolbar/Search */
.courses-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    align-items: center;
}

.search-bar-wrapper {
    flex: 1;
    position: relative;
}

.search-bar-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 20px;
    height: 20px;
}

.course-search-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 14px 14px 48px;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.course-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.8);
}

.filter-dropdown {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    min-width: 160px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Categories */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #fff;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}

.category-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
}

.cat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #94a3b8;
    transition: all 0.3s;
}

.category-card:hover .cat-icon {
    background: #3b82f6;
    color: #fff;
}

.category-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.category-card span {
    font-size: 0.8rem;
    color: #64748b;
}

/* Featured Courses */
.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-all-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #fff;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.course-card-new {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card-new:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.course-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    opacity: 0.2;
    z-index: 0;
    border-radius: 20px 20px 0 0;
}

.overlay-purple {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

/* JS */
.overlay-blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

/* React */
.overlay-pink {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

/* Python */

.card-top-badges {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-level {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.bookmark-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.bookmark-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.course-info {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    flex-grow: 1;
}

.course-meta-tags {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #e2e8f0;
    margin-bottom: 24px;
    /* Space between tags and title/instructor */
    margin-top: 40px;
    /* Push down from badges */
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
}

.instructor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.instructor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #334155;
}

.instructor-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #fff;
}

.instructor-details p {
    font-size: 0.85rem;
    color: #94a3b8;
}

.course-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating-row {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 20px;
    align-items: center;
}

.rating-row i {
    width: 14px;
    height: 14px;
}

/* Progress Bar */
.progress-section {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: #fff;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    /* Default blue */
    border-radius: 3px;
    transition: width 1s ease;
}

/* Tags below */
.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.course-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #cbd5e1;
}

/* Action Button */
.btn-course-action {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: auto;
}

.btn-course-action:hover {
    background: #f1f5f9;
}

.btn-course-action i {
    width: 18px;
    height: 18px;
}