/* courses.css — page-specific styles layered on top of dashboard.css */

/* --- Course hours chip (shown in card footer) --- */
.cc-hours {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.cc-hours i {
    color: var(--accent-orange, #f39200);
    font-size: 12px;
}

/* --- Price + discount on course cards --- */
.cc-price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.cc-price-new {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary-blue, #002e4e);
    white-space: nowrap;
}

.cc-price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
}

/* Discount badge overlaid on the course thumbnail (top-start corner) */
.cc-image-wrapper {
    position: relative;
}

.cc-discount-wrapper {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
}

.cc-discount-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* --- Inline section loader (reuses .preloader-* classes from home.css) --- */
.courses-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    min-height: 280px;
}

.courses-loader .preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.courses-loader .preloader-logo {
    height: 55px;
    animation: zoomPulse 1.5s infinite ease-in-out alternate;
}

.courses-loader .preloader-spinner {
    width: 42px;
    height: 42px;
    border-width: 4px;
}


/* --- Page sections: each block is a soft white card --- */
.page-section {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef2f7;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-blue, #002e4e);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--accent-orange, #f39200);
    border-radius: 4px;
}

/* --- Department tiles (icon + label) --- */
.departments-pills {
    gap: 8px;
}

.dept-pill {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: var(--text-dark, #1f2937);
    padding: 6px 14px 6px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dept-pill:hover {
    border-color: var(--primary-blue, #002e4e);
    box-shadow: 0 3px 10px rgba(0, 46, 78, 0.08);
}

.dept-pill.active {
    background: var(--primary-blue, #002e4e);
    color: #fff;
    border-color: var(--primary-blue, #002e4e);
    box-shadow: 0 3px 10px rgba(0, 46, 78, 0.15);
}

.dept-pill .dept-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(243, 146, 0, 0.12);
    color: var(--accent-orange, #f39200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.dept-pill.active .dept-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.dept-pill .dept-label {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* --- Category pills --- */
.filter-pill {
    padding: 7px 22px;
    border-radius: 999px;
}

/* Results info inline in the Courses header row */
.section-header .results-info {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .page-section {
        padding: 18px 16px;
        border-radius: 14px;
    }
}

.courses-page-title {
    color: var(--primary-dark, #0f172a);
    font-size: 24px;
    margin-bottom: 8px;
}

.courses-page-subtitle {
    color: #64748b;
    font-size: 16px;
}

/* Category Pills */
.categories-pills {
    background-color: transparent;
}

.filter-pill {
    background-color: transparent;
    border: 1px solid var(--primary-blue, #1a73e8);
    color: var(--primary-blue, #1a73e8);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background-color: var(--primary-blue, #1a73e8);
    color: white;
}

/* Toggle Switch */
.live-toggle-container {
    background-color: transparent;
    padding: 5px 10px;
    border-radius: 50px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--primary-blue, #1a73e8);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

.slider.round {
    border-radius: 34px;
    border: 1px solid #05457A;
}

.slider.round:before {
    border-radius: 50%;
    background-color: #05457A;
}

/* Course Card */
.course-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.course-img-wrapper {
    position: relative;
    height: 160px;
    width: 100%;
}

.course-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge Styling */
.course-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.badge-offline {
    background-color: #fff;
    color: var(--primary-orange, #f59e0b);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-live {
    background-color: #0ea5e9;
    color: white;
    box-shadow: 0 2px 5px rgba(14, 165, 233, 0.3);
}

.course-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-category {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark, #0f172a);
    margin-bottom: 8px;
}

.course-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Instructor Section */
.instructor-info-sec {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 16px;
}

.instructor-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.instructor-details {
    display: flex;
    flex-direction: column;
}

.instructor-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.instructor-title {
    font-size: 12px;
    color: #64748b;
}

/* Stats Section */
.course-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item i {
    font-size: 14px;
}

/* Overrides on top of dashboard.css */
.cc-category {
    background-color: #f0f5ff;
    color: #000000;
    text-align: right;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 700;
    margin: 6px -15px 15px -15px;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-logo {
    height: 50px;
}

.main-nav-collapse {
    margin-inline-start: 60px;
}

.main-nav-list {
    gap: 15px;
}

.nav-action-btns {
    gap: 15px;
}

.live-toggle-label {
    font-size: 14px;
}

#coursesGrid {
    margin-top: 8px;
}

.load-more-btn {
    color: #F4951F;
    background: none;
    border: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.badge-course-offline {
    background-color: #FFF0E4;
    color: #F4951F;
}

.badge-course-live {
    background-color: #E5F4F2;
    color: #028E7C;
}

.badge-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
}

.cc-course-img {
    object-fit: cover;
    height: 160px;
    border-radius: 12px 12px 0 0;
}

.cc-body-flex {
    flex: 1;
}

.cc-teacher-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
