/* === COURSES LISTING PAGE === */

/* Page Search */
.page-search { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 50px; max-width: 400px; margin: 12px auto 0; }
.page-search input { flex: 1; border: none; background: none; font-size: 0.85rem; outline: none; font-family: 'Inter', sans-serif; color: var(--text); }
.page-search input::placeholder { color: var(--text-light); }

/* Page Hero */
.page-hero { background: #FFFFFF; padding: 24px 0 16px; text-align: center; }
.page-title { font-size: 1.5rem; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.page-subtitle { font-size: 0.85rem; color: var(--text-muted); }
@media (min-width: 1024px) { .page-title { font-size: 2rem; } }

/* Exam Tabs - Primary Filter */
.exam-tabs-section { background: #FFFFFF; padding: 0 0 16px; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
.exam-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.exam-tabs::-webkit-scrollbar { display: none; }
.exam-tab {
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-muted);
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.exam-tab:hover { border-color: var(--primary); color: var(--primary); }
.exam-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Tag Filter - Secondary */
.tag-filter-section { padding: 12px 0; background: var(--bg); }
.tag-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tag-filters::-webkit-scrollbar { display: none; }
.tag-pill {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-muted);
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.tag-pill:hover { border-color: var(--primary); color: var(--primary); }
.tag-pill.active { background: #EFF6FF; color: var(--primary); border-color: var(--primary); }

/* Courses Main */
.courses-main { padding: 24px 0 40px; }

/* Exam Group Section */
.exam-group { margin-bottom: 24px; }
.exam-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s;
}
.exam-group-header:hover { background: #EFF6FF; }
.exam-group-title { font-size: 1rem; font-weight: 800; color: var(--text); margin: 0; }
.exam-group-right { display: flex; align-items: center; gap: 8px; }
.exam-group-count { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; background: white; padding: 3px 8px; border-radius: 50px; border: 1px solid var(--border); }
.exam-group-toggle { font-size: 1rem; color: var(--text-muted); transition: transform 0.2s; }
.exam-group-body { transition: all 0.3s; }

/* Collapsed state */
.exam-group.collapsed .exam-group-body { display: none; }
.exam-group.collapsed .exam-group-toggle { transform: rotate(-90deg); }
.exam-group.collapsed .exam-group-header { margin-bottom: 0; }

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Course Card */
.course-list-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}
.course-list-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.clc-image { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; }
.clc-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.clc-badge { position: absolute; top: 8px; left: 8px; background: var(--red); color: white; padding: 3px 8px; border-radius: 4px; font-size: 0.6rem; font-weight: 700; }
.clc-badge.new { background: var(--green); }

.clc-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.clc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.clc-title { font-size: 0.9rem; font-weight: 700; color: var(--text); }

.clc-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.7rem; color: var(--text-muted); }
.clc-meta span { display: flex; align-items: center; gap: 3px; }

.clc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.clc-tag { padding: 2px 8px; background: #EFF6FF; color: var(--primary); border-radius: 4px; font-size: 0.6rem; font-weight: 600; }

.clc-topics { font-size: 0.7rem; color: var(--text-muted); }
.clc-topics strong { color: var(--text); font-weight: 600; }

.clc-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.clc-price { font-size: 0.9rem; font-weight: 800; color: var(--primary); }
.clc-price-old { font-size: 0.7rem; color: var(--text-muted); text-decoration: line-through; margin-left: 4px; }
.clc-btn { padding: 6px 12px; background: var(--primary); color: white; border-radius: 6px; font-size: 0.7rem; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.clc-btn:hover { background: var(--primary-dark); }

/* No results */
.no-results { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.no-results h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }

/* Desktop */
@media (min-width: 768px) {
    .course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .course-grid { grid-template-columns: repeat(3, 1fr); }
    .exam-group-title { font-size: 1.3rem; }
}
