/* =============================================================
   Student Tabs  –  Filter by Course Taxonomy
   ============================================================= */

/* ── Wrapper ─────────────────────────────────────────────── */
.student-tabs-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

/* ── Tab Buttons ─────────────────────────────────────────── */
.student-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    background: #f5f5f5;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.10);
}

.tab-btn.active {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
    box-shadow: 0 4px 12px rgba(0,0,0,.20);
}

.tab-btn.active:hover { background: #222; }

/* count badge */
.tab-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 6px;
    background: rgba(255,255,255,.20);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}

.tab-btn:not(.active) .tab-count {
    background: rgba(0,0,0,.08);
    color: #555;
}

/* ── Mobile Dropdown ─────────────────────────────────────── */
.student-mobile-filter {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}

#course-dropdown {
    width: 100%;
    max-width: 340px;
    padding: 11px 16px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

/* ── Loading Spinner ─────────────────────────────────────── */
.student-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 0;
}

.loader-dot {
    width: 10px;
    height: 10px;
    background: #0a0a0a;
    border-radius: 50%;
    animation: studentBounce .9s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: .18s; }
.loader-dot:nth-child(3) { animation-delay: .36s; }

@keyframes studentBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: .5; }
    40%            { transform: scale(1);   opacity: 1;  }
}

/* ── Student Grid ────────────────────────────────────────── */
.student-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    justify-items: center;
    min-height: 100px;
}

/* empty / error state */
.student-grid p,
.student-error {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    font-size: 15px;
    padding: 40px 0;
}

/* ── Student Card ────────────────────────────────────────── */
.student-card {
    width: 100%;
    max-width: 300px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
    animation: cardFadeIn .35s ease both;
}

.student-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.student-card img {
    width: 200px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: block;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.student-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #111;
}

.student-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.student-card .student-course-tag {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 10px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 60px;
    font-size: 11px;
    font-weight: 500;
}

/* ── Load More ───────────────────────────────────────────── */
.load-more-wrapper {
    text-align: center;
    margin-top: 36px;
}

#load-more-btn {
    padding: 11px 34px;
    background: #0a0a0a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

#load-more-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .student-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .student-tab-buttons  { display: none; }
    .student-mobile-filter { display: block; }
    .student-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 480px) {
    .student-grid { grid-template-columns: 1fr; }
}
