/* ==========================================
   COURSES LISTING PAGE STYLES (PIXEL PERFECT)
   ========================================== */

/* Hero Banner */
.courses-hero-section {
    width: 100%;
    padding: 40px 5% 60px;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
    position: relative;
}

.courses-hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 40px;
    align-items: center;
}

.hero-content-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb i {
    font-size: 10px;
    color: #94a3b8;
}

.breadcrumb .active {
    color: #0046ad;
    font-weight: 700;
}

.courses-hero-title {
    font-size: 44px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.15;
}

.courses-hero-title span {
    color: #0046ad;
}

.courses-hero-subtitle {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.5;
    max-width: 580px;
    margin: 0;
}

.hero-stats-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.stat-pill {
    background: #ffffff;
    border-radius: 16px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-pill i {
    color: #0046ad;
    font-size: 18px;
}

.stat-pill div {
    display: flex;
    flex-direction: column;
}

.stat-pill strong {
    font-size: 14px;
    color: #111827;
}

.stat-pill span {
    font-size: 11px;
    color: #64748b;
}

/* Hero Image Right Column */
.hero-image-col {
    position: relative;
}

/* --- HERO IMAGE CAROUSEL (NO SHADOW, NO FLOATING TEXT) --- */
.hero-img-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: none !important;
    /* Shadow removed */
    background: #f1f5f9;
}

.hero-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

/* Dots Indicator */
.hero-slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-slider-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-slider-dots .dot.active {
    background: #0046ad;
    width: 22px;
    border-radius: 10px;
}

.floating-doodle {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(0, 70, 173, 0.7);
    backdrop-filter: blur(8px);
    padding: 12px 18px;
    border-radius: 16px;
    line-height: 1.3;
}

/* Main Search Box Overlap */
.courses-search-container {
    max-width: 1280px;
    margin: 30px auto 0;
}

.courses-search-wrapper {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 12px 35px rgba(0, 70, 173, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 18px;
    border: 1px solid #e2e8f0;
}

.search-input-box i {
    color: #0046ad;
    font-size: 16px;
}

.search-input-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.search-filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-select {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    outline: none;
    cursor: pointer;
}

.courses-search-btn {
    background: #0046ad;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* ==========================================
   DESKTOP MAIN LISTING GRID & SIDEBAR
   ========================================== */
.courses-listing-section {
    width: 100%;
    padding: 30px 5% 80px;
    background: #ffffff;
}

.courses-listing-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* Hide Mobile Elements on Desktop */
.mobile-filter-bar,
.apply-mobile-filters-btn {
    display: none !important;
}

/* Sidebar Filters (280px Fixed) */
.sidebar-filters {
    width: 280px;
    min-width: 280px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.clear-all-btn {
    background: none;
    border: none;
    color: #0046ad;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.close-sidebar-btn {
    display: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid #f8fafc;
    padding-bottom: 16px;
}

.filter-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.filter-title i {
    font-size: 12px;
    color: #94a3b8;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-item input {
    accent-color: #0046ad;
    width: 16px;
    height: 16px;
}

.show-more-btn {
    background: none;
    border: none;
    color: #0046ad;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    padding: 0;
    cursor: pointer;
}

/* Right Main Column */
.courses-grid-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.results-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-sort-bar span {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.sort-select {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    outline: none;
}

/* Horizontal Cards Stack (Desktop View) */
.courses-list-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.course-horizontal-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    display: flex;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-horizontal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 70, 173, 0.08);
}

.card-thumb-box {
    width: 240px;
    min-width: 240px;
    position: relative;
}

.campus-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-pill-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.country-pill-badge img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.card-content-box {
    padding: 20px 24px;
    display: flex;
    gap: 24px;
    flex: 1;
    align-items: center;
}

.course-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-main-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 0;
}

.uni-brand-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uni-mini-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #f1f5f9;
    padding: 2px;
}

.uni-name-location {
    display: flex;
    flex-direction: column;
}

.uni-name-location strong {
    font-size: 13px;
    color: #1e293b;
}

.uni-name-location span {
    font-size: 11px;
    color: #64748b;
}

.course-desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

.subject-tags-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sub-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.extra-tag {
    background: #e0ebff;
    color: #0046ad;
}

/* Right Meta Sidebar on Card */
.course-meta-sidebar {
    width: 180px;
    min-width: 180px;
    border-left: 1px solid #f1f5f9;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #334155;
    font-weight: 600;
}

.meta-item i {
    color: #0046ad;
    font-size: 14px;
    width: 16px;
}

.meta-item strong {
    display: block;
    font-size: 13px;
    color: #111827;
}

.meta-item small {
    display: block;
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}

.arrow-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef4ff;
    color: #0046ad;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.course-horizontal-card:hover .arrow-action-btn {
    background: #0046ad;
    color: #ffffff;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.page-num,
.page-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-num.active,
.page-num:hover {
    background: #0046ad;
    color: #ffffff;
    border-color: #0046ad;
}

.page-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ==========================================
   MOBILE RESPONSIVE (MAX-WIDTH: 992PX)
   ========================================== */
@media (max-width: 992px) {
    .courses-hero-container {
        grid-template-columns: 1fr;
    }

    .hero-image-col {
        display: none;
    }

    .search-filters-row {
        flex-wrap: wrap;
    }

    .search-select {
        flex: 1 1 calc(50% - 6px);
    }

    .courses-search-btn {
        width: 100%;
        justify-content: center;
    }

    .courses-listing-container {
        flex-direction: column;
    }

    /* Show Mobile Filter Bar */
    .mobile-filter-bar {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        background: #ffffff;
        padding: 14px;
        border-radius: 16px;
        border: 1px solid #e2e8f0;
    }

    .mobile-filter-btn {
        background: #eef4ff;
        color: #0046ad;
        border: none;
        padding: 10px;
        border-radius: 30px;
        font-weight: 700;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .mobile-filter-dropdowns {
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }

    .mobile-quick-select {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 6px 12px;
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-sort {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .desktop-only-card,
    .desktop-only-flex,
    .desktop-only-select {
        display: none !important;
    }

    /* Stacked Vertical Mobile Cards */
    .course-horizontal-card {
        flex-direction: column;
    }

    .card-thumb-box {
        width: 100%;
        height: 160px;
    }

    .card-content-box {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .course-meta-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #f1f5f9;
        padding-left: 0;
        padding-top: 12px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .arrow-action-btn {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    /* Mobile Filter Bottom Sheet Drawer */
    .sidebar-filters {
        position: fixed;
        inset: 0;
        z-index: 10000;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        overflow-y: auto;
        display: none;
    }

    .sidebar-filters.open {
        display: flex;
    }

    .close-sidebar-btn {
        display: block;
        background: #f1f5f9;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 14px;
    }

    .apply-mobile-filters-btn {
        display: flex !important;
        background: #0046ad;
        color: #ffffff;
        border: none;
        padding: 14px;
        border-radius: 40px;
        font-weight: 700;
        font-size: 14px;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
    }
}