/* ==========================================
   13. UNIVERSITIES LISTING PAGE STYLES (CLEAN DESKTOP FIX)
   ========================================== */
.uni-hero-section {
    width: 100%;
    padding: 40px 5% 30px;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

.uni-hero-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Breadcrumb */
.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;
}

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

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

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

/* Search Bar & Dropdowns Row */
.uni-search-bar-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 70, 173, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 12px;
    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;
}

.filter-dropdowns-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

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

.uni-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;
    flex-shrink: 0;
}

/* Country Flag Pills */
.country-pills-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.country-pills-scroll::-webkit-scrollbar {
    display: none;
}

.country-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.country-pill img {
    width: 18px;
    height: 13px;
    border-radius: 2px;
}

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

/* ==========================================
   DESKTOP MAIN GRID LAYOUT FIX
   ========================================== */
.uni-listing-section {
    width: 100%;
    padding: 30px 5% 80px;
    background: #ffffff;
}

.uni-listing-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex !important;
    /* Forces Flex Row Layout */
    flex-direction: row !important;
    gap: 32px !important;
    align-items: flex-start !important;
}

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

/* Sidebar Styling Fix */
.sidebar-filters {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex-shrink: 0 !important;
    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);
    position: static !important;
}

.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 !important;
}

.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 Side Content Grid */
.uni-grid-main {
    flex: 1 !important;
    width: calc(100% - 312px) !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.showing-results-text {
    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;
}

/* 3 Columns Card Grid */
.uni-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
}

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

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

.uni-thumb {
    position: relative;
    width: 100%;
    height: 140px;
}

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

.country-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    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-badge img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.uni-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.uni-brand-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.uni-titles {
    flex: 1;
}

.uni-titles h3 {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.uni-titles p {
    font-size: 11px;
    color: #64748b;
    margin: 0;
}

.uni-arrow-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef4ff;
    color: #0046ad;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.uni-card:hover .uni-arrow-link {
    background: #0046ad;
    color: #ffffff;
}

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

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

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

/* 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 ONLY OVERRIDES (MAX-WIDTH: 992PX)
   ========================================== */
@media (max-width: 992px) {
    .uni-hero-title {
        font-size: 28px;
    }

    .filter-dropdowns-row {
        flex-wrap: wrap;
    }

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

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

    .uni-listing-container {
        flex-direction: column !important;
    }

    .uni-grid-main {
        width: 100% !important;
    }

    .mobile-filter-bar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: #ffffff;
        padding: 12px 16px;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        margin-bottom: 12px;
        width: 100%;
    }

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

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

    .uni-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .sidebar-filters {
        position: fixed !important;
        inset: 0 !important;
        z-index: 10000 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        display: none !important;
    }

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

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