/* ==========================================================================
   Sarkari Courses & Video Lectures System - Modern Responsive Styles
   Author: BhartiJosh.com
   ========================================================================== */

/* Main Container & Wrapper */
.sarkari-courses-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    transition: all 0.3s ease;
}

.sarkari-courses-fullpage .sarkari-courses-section {
    border-radius: 20px;
    padding: 28px;
    margin-top: 10px;
}

/* Header Block */
.courses-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
}

.courses-header-left {
    flex: 1 1 500px;
}

.courses-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3e8ff;
    border: 1px solid #d8b4fe;
    color: #7e22ce;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.courses-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9333ea;
    box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.7);
    animation: pulseCourses 2s infinite;
}

@keyframes pulseCourses {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(147, 51, 234, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(147, 51, 234, 0); }
}

.courses-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.courses-title-accent {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.courses-main-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.courses-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.courses-view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* Search Bar */
.courses-search-bar-wrap {
    margin-bottom: 16px;
}

.courses-search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.courses-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}

.courses-search-field {
    width: 100%;
    padding: 12px 40px 12px 42px;
    font-size: 14px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.courses-search-field:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.courses-clear-search-btn {
    position: absolute;
    right: 12px;
    background: #e2e8f0;
    border: none;
    color: #64748b;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
}

/* Two-Tier Filters: Vacancy & State */
.courses-filters-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.courses-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.courses-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    min-width: 145px;
}

.courses-filter-label i {
    color: #2563eb;
    font-size: 13px;
}

.courses-chips-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.courses-chips-scroll::-webkit-scrollbar {
    display: none;
}

.cr-chip {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.cr-chip:hover {
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.cr-vac-chip.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.cr-state-chip.active {
    background: #059669;
    border-color: #047857;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* View Mode Bar */
.courses-view-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.courses-active-indicator {
    font-size: 13px;
    color: #64748b;
}

.courses-active-indicator strong {
    color: #0f172a;
}

.courses-mode-switch {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}

.cr-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cr-mode-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ==========================================================================
   TWO-COLUMN MAIN SHOWCASE
   ========================================================================== */
.courses-two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    transition: all 0.3s ease;
}

.courses-two-column-layout.mode-video {
    grid-template-columns: 1fr;
}
.courses-two-column-layout.mode-video .courses-ebook-column {
    display: none !important;
}

.courses-two-column-layout.mode-ebook {
    grid-template-columns: 1fr;
}
.courses-two-column-layout.mode-ebook .courses-video-column {
    display: none !important;
}

/* Column Wrappers */
.courses-column {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.courses-video-column {
    border-top: 4px solid #ef4444;
}

.courses-ebook-column {
    border-top: 4px solid #2563eb;
}

/* Column Header */
.courses-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed #cbd5e1;
}

.col-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.icon-video {
    background: #fee2e2;
    color: #dc2626;
}

.icon-ebook {
    background: #dbeafe;
    color: #2563eb;
}

.col-heading {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.col-subtext {
    font-size: 12px;
    color: #64748b;
}

.col-count-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.pill-video {
    background: #fee2e2;
    color: #b91c1c;
}

.pill-ebook {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Cards Grid inside Column */
.courses-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Course Card (Universal Base) */
.cr-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.cr-card-item:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* Card Top Badges Row */
.cr-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cr-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.cr-badge-vac {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.cr-badge-state {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.cr-badge-type {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.type-video {
    background: #fee2e2;
    color: #b91c1c;
}

.type-ebook {
    background: #f3e8ff;
    color: #6b21a8;
}

.cr-badge-rating {
    font-size: 11px;
    font-weight: 700;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Title */
.cr-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
}

/* Meta Data Row */
.cr-meta-specs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
}

.cr-meta-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cr-meta-spec-item i {
    color: #2563eb;
    font-size: 12px;
}

/* Syllabus Topics Chips */
.cr-topics-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cr-topic-chip {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Card Action Buttons */
.cr-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    border: none;
    transition: all 0.2s ease;
}

.cr-btn-video-primary {
    background: #dc2626;
    color: #ffffff !important;
}
.cr-btn-video-primary:hover {
    background: #b91c1c;
}

.cr-btn-ebook-primary {
    background: #2563eb;
    color: #ffffff !important;
}
.cr-btn-ebook-primary:hover {
    background: #1d4ed8;
}

.cr-btn-secondary {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}
.cr-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a !important;
}

/* Empty State */
.cr-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
}

.cr-empty-state i {
    font-size: 36px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.cr-empty-state h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.cr-empty-state p {
    font-size: 13px;
    margin: 0;
}

/* ==========================================================================
   POPUP MODAL (VIDEO PLAYER & E-BOOK READER)
   ========================================================================== */
.courses-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.courses-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalScale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.courses-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-badge-video {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.modal-badge-ebook {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.courses-modal-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.courses-modal-close {
    background: #f1f5f9;
    border: none;
    font-size: 24px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.courses-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.courses-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.courses-video-player-frame {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
}

.courses-video-player-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
}

.modal-meta-item .label {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 2px;
}

.modal-meta-item strong {
    color: #0f172a;
}

.modal-description {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.courses-ebook-preview-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
}

.courses-topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-action-btn {
    flex: 1 1 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
}

.modal-action-btn.btn-primary {
    background: #2563eb;
    color: #ffffff !important;
}

.modal-action-btn.btn-secondary {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b !important;
}

/* ==========================================================================
   PAGE-SPECIFIC HERO & FAQ STYLES
   ========================================================================== */
.courses-hero-banner {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 16px;
    padding: 28px 24px;
    color: #ffffff;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.courses-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.courses-hero-heading {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.courses-hero-lead {
    font-size: 14px;
    color: #dbeafe;
    line-height: 1.6;
    max-width: 820px;
    margin: 0 0 18px 0;
}

.courses-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 600;
}

.courses-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* FAQ Section */
.courses-faq-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.faq-main-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-accordion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.faq-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.faq-q {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 6px 0;
}

.faq-a {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   DARK MODE ADAPTATION
   ========================================================================== */
.dark-mode .sarkari-courses-section,
.dark-mode .courses-faq-section,
.dark-mode .courses-column,
.dark-mode .cr-card-item,
.dark-mode .courses-modal-content {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

.dark-mode .courses-main-title,
.dark-mode .col-heading,
.dark-mode .cr-card-title,
.dark-mode .faq-main-title,
.dark-mode .courses-modal-title,
.dark-mode .courses-active-indicator strong,
.dark-mode .modal-meta-item strong {
    color: #f8fafc !important;
}

.dark-mode .courses-main-desc,
.dark-mode .col-subtext,
.dark-mode .faq-a,
.dark-mode .modal-description,
.dark-mode .courses-active-indicator {
    color: #94a3b8 !important;
}

.dark-mode .courses-filters-container,
.dark-mode .cr-meta-specs-row,
.dark-mode .modal-meta-grid,
.dark-mode .courses-ebook-preview-box,
.dark-mode .faq-box,
.dark-mode .cr-empty-state {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-mode .courses-search-field {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

.dark-mode .cr-chip {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.dark-mode .cr-chip:hover {
    color: #ffffff !important;
    border-color: #64748b !important;
}

.dark-mode .cr-vac-chip.active {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.dark-mode .cr-state-chip.active {
    background: #059669 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
}

.dark-mode .courses-filter-label {
    color: #cbd5e1 !important;
}

.dark-mode .courses-mode-switch {
    background: #0f172a !important;
}

.dark-mode .cr-mode-btn {
    color: #94a3b8 !important;
}

.dark-mode .cr-mode-btn.active {
    background: #1e293b !important;
    color: #f8fafc !important;
}

.dark-mode .cr-btn-secondary,
.dark-mode .modal-action-btn.btn-secondary {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.dark-mode .courses-modal-header,
.dark-mode .courses-header-block,
.dark-mode .courses-view-bar,
.dark-mode .courses-column-header {
    border-color: #334155 !important;
}

.dark-mode .courses-modal-close {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */
@media (max-width: 991px) {
    .courses-two-column-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .faq-accordion-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sarkari-courses-section {
        padding: 16px;
        margin: 16px 0;
        border-radius: 12px;
    }
    .courses-main-title {
        font-size: 20px;
    }
    .courses-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .courses-filter-label {
        min-width: auto;
    }
    .cr-card-actions {
        grid-template-columns: 1fr;
    }
    .courses-hero-banner {
        padding: 20px 16px;
    }
    .courses-hero-heading {
        font-size: 22px;
    }
    .courses-trust-row {
        flex-direction: column;
        gap: 8px;
    }
    .modal-actions-bar {
        flex-direction: column;
    }
}
/* ==========================================================================
   HOMEPAGE DIRECT SHOWCASE & ENHANCED MOBILE-FRIENDLY STYLES
   ========================================================================== */

/* Main Section Wrapper on Homepage */
.sarkari-courses-homepage {
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
}

/* Home Stats Summary Chips */
.courses-home-stats-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.home-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.4;
    transition: transform 0.15s ease;
}

.stat-vid {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.stat-bk {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.stat-free {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* Home Action Button */
.courses-header-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Clickable Header on Homepage */
.courses-header-clickable {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.courses-header-clickable:hover {
    opacity: 0.97;
}

.toggle-btn-closed,
.toggle-btn-opened {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.courses-home-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 46px;
    outline: none;
    text-decoration: none !important;
}

.courses-home-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.courses-home-toggle-btn.is-expanded {
    background: linear-gradient(135deg, #475569, #334155);
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.25);
}

.courses-view-all-link-subtle {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.courses-view-all-link-subtle:hover {
    color: #2563eb;
}

/* Direct Shown Body Wrapper */
.courses-collapsible-wrapper {
    animation: fadeInCourses 0.25s ease-out;
    margin-top: 14px;
}

@keyframes fadeInCourses {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State Card Styling */
.cr-empty-state {
    text-align: center;
    padding: 36px 20px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    margin: 4px 0;
}

.cr-empty-state i {
    font-size: 34px;
    display: inline-block;
    margin-bottom: 10px;
}

.cr-empty-state h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.cr-empty-state p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    max-width: 360px;
    margin: 0 auto;
}

/* ==========================================================================
   MOBILE & TABLET DEDICATED RESPONSIVENESS (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Main Section Container */
    .sarkari-courses-section.sarkari-courses-homepage,
    .sarkari-courses-section {
        padding: 18px 14px;
        margin: 18px 0;
        border-radius: 14px;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    }

    /* Header Block Mobile Stacking */
    .sarkari-courses-homepage .courses-header-block,
    .courses-header-block {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .courses-header-left {
        width: 100%;
        flex: 1 1 auto;
    }

    .courses-pill-badge {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }

    .courses-main-title {
        font-size: 20px;
        line-height: 1.35;
        margin-bottom: 6px;
    }

    .courses-main-desc {
        font-size: 13px;
        line-height: 1.5;
        color: #475569;
    }

    .courses-home-stats-hint {
        gap: 6px;
        margin-top: 10px;
    }

    .home-stat-chip {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Action Buttons Full Width on Mobile */
    .courses-header-action {
        width: 100%;
        align-items: stretch;
        margin-top: 4px;
    }

    .courses-view-all-btn,
    /* Clickable Header on Homepage */
.courses-header-clickable {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.courses-header-clickable:hover {
    opacity: 0.97;
}

.toggle-btn-closed,
.toggle-btn-opened {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.courses-home-toggle-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 13.5px;
        padding: 11px 16px;
        min-height: 44px;
        border-radius: 10px;
        box-sizing: border-box;
        touch-action: manipulation;
    }

    /* Search Input Mobile */
    .courses-search-bar-wrap {
        margin-bottom: 14px;
    }

    .courses-search-field {
        font-size: 14px;
        padding: 11px 36px 11px 38px;
        border-radius: 10px;
        min-height: 44px;
        box-sizing: border-box;
        -webkit-appearance: none;
    }

    .courses-search-icon {
        left: 12px;
        font-size: 14px;
    }

    .courses-clear-search-btn {
        right: 10px;
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    /* Filters Container & Horizontal Scrolling Chips */
    .courses-filters-container {
        padding: 12px 14px;
        border-radius: 12px;
        gap: 10px;
        margin-bottom: 14px;
    }

    .courses-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .courses-filter-label {
        min-width: auto;
        font-size: 12px;
        font-weight: 700;
        color: #334155;
    }

    .courses-chips-scroll {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 7px;
        padding: 2px 2px 8px 2px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .courses-chips-scroll::-webkit-scrollbar {
        display: none;
    }

    .cr-chip {
        flex-shrink: 0;
        scroll-snap-align: start;
        min-height: 38px;
        padding: 7px 14px;
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1;
        border-radius: 999px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .cr-chip:active {
        transform: scale(0.96);
    }

    /* View Mode Switcher Mobile */
    .courses-view-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .courses-mode-switch {
        width: 100%;
        display: flex;
        padding: 4px;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .cr-mode-btn {
        flex: 1;
        justify-content: center;
        padding: 9px 6px;
        font-size: 12px;
        font-weight: 700;
        min-height: 40px;
        border-radius: 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .courses-active-indicator {
        text-align: center;
        font-size: 12px;
    }

    /* Column Stacking on Mobile */
    .courses-two-column-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .courses-column {
        padding: 14px;
        border-radius: 12px;
        gap: 12px;
    }

    .courses-column-header {
        padding-bottom: 10px;
    }

    .col-header-left {
        gap: 8px;
    }

    .col-icon-wrap {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        font-size: 14px;
    }

    .col-heading {
        font-size: 15px;
    }

    .col-count-pill {
        font-size: 10.5px;
        padding: 2px 8px;
    }

    /* Empty State Mobile */
    .cr-empty-state {
        padding: 24px 14px;
        border-radius: 10px;
    }

    .cr-empty-state i {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .cr-empty-state h4 {
        font-size: 14.5px;
        margin-bottom: 4px;
    }

    .cr-empty-state p {
        font-size: 12px;
        max-width: 290px;
    }

    /* Course Cards on Mobile */
    .cr-card-item {
        padding: 13px;
        border-radius: 10px;
        gap: 10px;
    }

    .cr-card-title {
        font-size: 14px;
        line-height: 1.4;
    }

    .cr-meta-specs-row {
        gap: 8px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .cr-card-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cr-btn {
        min-height: 42px;
        font-size: 12.5px;
        justify-content: center;
        border-radius: 8px;
        touch-action: manipulation;
    }

    /* Modal Mobile Adjustments */
    .courses-modal-content {
        max-width: 95vw;
        max-height: 90vh;
        border-radius: 14px;
        margin: 8px;
    }

    .courses-modal-header {
        padding: 12px 14px;
    }

    .courses-modal-title {
        font-size: 15px;
        line-height: 1.35;
    }

    .courses-modal-body {
        padding: 14px;
        gap: 12px;
    }

    .modal-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 8px 10px;
        font-size: 11.5px;
    }

    .modal-actions-bar {
        flex-direction: column;
        gap: 8px;
    }

    .modal-action-btn {
        width: 100%;
        min-height: 42px;
        font-size: 13px;
        justify-content: center;
    }
}

/* ==========================================================================
   EXTRA-SMALL MOBILE SCREENS (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .sarkari-courses-section.sarkari-courses-homepage,
    .sarkari-courses-section {
        padding: 14px 10px;
        margin: 14px 0;
        border-radius: 12px;
    }

    .courses-main-title {
        font-size: 18px;
    }

    .courses-home-stats-hint {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .home-stat-chip {
        justify-content: center;
        font-size: 10.5px;
        padding: 5px 6px;
        text-align: center;
    }

    .home-stat-chip.stat-free {
        grid-column: 1 / -1;
    }

    .courses-column {
        padding: 12px 10px;
    }

    .courses-filters-container {
        padding: 10px 10px;
    }
}

/* ==========================================================================
   DARK MODE ADAPTATIONS FOR HOMEPAGE & MOBILE
   ========================================================================== */
.dark-mode .sarkari-courses-homepage {
    background: #1e293b !important;
    border-color: #334155 !important;
}

.dark-mode .courses-home-toggle-btn.is-expanded {
    background: #334155 !important;
    color: #f8fafc !important;
}

.dark-mode .stat-vid {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

.dark-mode .stat-bk {
    background: #172554 !important;
    color: #93c5fd !important;
    border-color: #1e3a8a !important;
}

.dark-mode .stat-free {
    background: #022c22 !important;
    color: #6ee7b7 !important;
    border-color: #064e3b !important;
}

.dark-mode .courses-view-all-link-subtle {
    color: #94a3b8 !important;
}

.dark-mode .courses-view-all-link-subtle:hover {
    color: #60a5fa !important;
}

.dark-mode .cr-empty-state {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark-mode .cr-empty-state h4 {
    color: #f8fafc !important;
}

.dark-mode .cr-empty-state p {
    color: #94a3b8 !important;
}