/* ==========================================================================
   EducationistGuru - Courses Page Modern Design System & Pagination Styling
   ========================================================================== */

/* --- Container & Section Base --- */
.eg-courses-wrapper {
    padding: 20px 0 70px;
    background-color: #f8fafc;
    min-height: 80vh;
}

/* --- Hero Intro Banner & Highlights --- */
.eg-courses-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 35px 35px;
    margin-bottom: 35px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.eg-courses-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 49, 21, 0.22) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.eg-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 49, 21, 0.15);
    color: #ff6b57;
    border: 1px solid rgba(255, 49, 21, 0.35);
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.eg-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
    color: #ffffff;
}

.eg-hero-title span {
    color: #ff3115;
}

.eg-hero-desc {
    color: #cbd5e1;
    font-size: 15px;
    max-width: 760px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.eg-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.eg-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #e2e8f0;
}

.eg-stat-item i {
    color: #ff3115;
    font-size: 16px;
}

/* --- Search & Filter Bar --- */
.eg-search-control-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.eg-search-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr auto;
    gap: 14px;
    align-items: center;
}

@media (max-width: 1199px) {
    .eg-search-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .eg-search-row {
        grid-template-columns: 1fr;
    }
}

.eg-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.eg-search-input-wrap .search-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s;
}

.eg-search-input {
    width: 100%;
    height: 48px;
    padding: 10px 40px 10px 44px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14.5px;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.eg-search-input:focus {
    background: #ffffff;
    border-color: #ff3115;
    box-shadow: 0 0 0 3px rgba(255, 49, 21, 0.12);
}

.eg-search-input:focus + .search-icon {
    color: #ff3115;
}

.eg-search-clear {
    position: absolute;
    right: 12px;
    width: 26px;
    height: 26px;
    background: #e2e8f0;
    color: #64748b;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.eg-search-clear:hover {
    background: #ff3115;
    color: #ffffff;
}

.eg-filter-select {
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.eg-filter-select:focus {
    border-color: #ff3115;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 49, 21, 0.12);
}

.eg-reset-btn {
    height: 48px;
    padding: 0 18px;
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.eg-reset-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* --- Results Telemetry Bar --- */
.eg-telemetry-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.eg-results-count {
    font-size: 14.5px;
    color: #475569;
    font-weight: 500;
}

.eg-results-count strong {
    color: #0f172a;
    font-weight: 700;
}

.eg-active-badge-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.eg-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff1ef;
    color: #ff3115;
    border: 1px solid #ffd3cd;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.eg-filter-chip i {
    cursor: pointer;
    font-size: 11px;
}

.eg-page-indicator {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
}

/* --- Course Card Design --- */
.eg-course-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    position: relative;
}

.eg-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 49, 21, 0.22);
    border-color: rgba(255, 49, 21, 0.3);
}

/* Media Thumbnail */
.eg-card-media {
    position: relative;
    height: 205px;
    overflow: hidden;
    background: #0f172a;
}

.eg-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.eg-course-card:hover .eg-card-media img {
    transform: scale(1.06);
}

.eg-card-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0) 55%);
    pointer-events: none;
}

/* "NEW" Badge - Pulsing & Prominent */
.eg-badge-new {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #ff3115 0%, #d81b04 100%);
    color: #ffffff;
    padding: 5px 14px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 30px;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(255, 49, 21, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: egPulse 2.2s infinite ease-in-out;
}

@keyframes egPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(255, 49, 21, 0.5);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 6px 20px rgba(255, 49, 21, 0.75);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 14px rgba(255, 49, 21, 0.5);
    }
}

/* Faculty Badge (Top Left) */
.eg-badge-faculty {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 68%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Body */
.eg-card-body {
    padding: 20px 22px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eg-course-title {
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 12px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eg-course-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.eg-course-title a:hover {
    color: #ff3115;
}

/* Key Metadata Specs */
.eg-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 14px;
    font-size: 12px;
}

.eg-spec-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.eg-spec-item i {
    color: #ff3115;
    font-size: 13px;
    width: 14px;
    text-align: center;
}

.eg-spec-item strong {
    color: #1e293b;
    font-weight: 600;
}

/* Fee Highlight Banner */
.eg-fee-banner {
    background: #fff5f3;
    border: 1px solid #ffd9d3;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eg-fee-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #991b1b;
    letter-spacing: 0.5px;
}

.eg-fee-amount {
    font-size: 14px;
    font-weight: 800;
    color: #ff3115;
}

/* Course Excerpt / Highlights */
.eg-card-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

/* Card Footer Actions */
.eg-card-footer {
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
    padding: 12px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.eg-btn-details {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    background: #ffffff;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.eg-btn-details:hover {
    border-color: #ff3115;
    color: #ff3115;
    background: #fff5f3;
}

.eg-btn-apply {
    flex: 1;
    height: 38px;
    padding: 0 14px;
    background: #ff3115;
    color: #ffffff !important;
    border: 1.5px solid #ff3115;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 49, 21, 0.25);
    transition: all 0.2s ease;
}

.eg-btn-apply:hover {
    background: #e62208;
    border-color: #e62208;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 49, 21, 0.4);
}

/* --- Pagination Controls --- */
.eg-pagination-section {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.eg-pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    justify-content: center;
}

.eg-page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    text-decoration: none;
    user-select: none;
}

.eg-page-btn:hover:not(:disabled):not(.active) {
    background: #f1f5f9;
    color: #ff3115;
    border-color: #e2e8f0;
}

.eg-page-btn.active {
    background: #ff3115;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(255, 49, 21, 0.35);
    border-color: #ff3115;
}

.eg-page-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.eg-page-ellipsis {
    min-width: 24px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-weight: bold;
    user-select: none;
}

.eg-page-arrow {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.eg-pagination-summary {
    font-size: 13.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.eg-jump-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eg-jump-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: #ffffff;
    color: #334155;
    outline: none;
}

/* --- Empty State --- */
.eg-empty-state {
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    margin: 30px 0;
}

.eg-empty-icon {
    width: 72px;
    height: 72px;
    background: #fff1ef;
    color: #ff3115;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
}

.eg-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.eg-empty-desc {
    font-size: 14.5px;
    color: #64748b;
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

/* --- Quick Apply Modal Styles --- */
.eg-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-bottom: none;
    padding: 20px 24px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.eg-modal-course-badge {
    display: inline-block;
    background: #ff3115;
    color: #fff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.eg-modal-header h5 {
    color: #ffffff;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.eg-modal-body {
    padding: 24px;
}

.eg-form-group {
    margin-bottom: 16px;
}

.eg-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.eg-form-control {
    width: 100%;
    height: 44px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s;
}

.eg-form-control:focus {
    border-color: #ff3115;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 49, 21, 0.12);
}

.eg-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
