/* Update the root color variables (around line 1-20) */
:root {
    --primary-color: #610b8a;
    /* Professional purple */
    --secondary-color: #4A148C;
    /* Medium slate blue - lighter purple */
    --accent-color: #e74c3c;
    /* Keeping your accent color */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --gradient-primary: linear-gradient(135deg, #4A148C, #7B1FA2);
    /* Deep purple gradient */
    --gradient-secondary: linear-gradient(135deg, #e74c3c, #c0392b);
    --bg-light: #ffffff;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.15);
    --container-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition-speed: 0.3s;
    overflow-x: hidden;
}

/* ===== Unified Attractive Button Styles (purple gradient, pill) ===== */
:root {
    --btn-grad-start: #7c3aed;
    --btn-grad-mid: #8b5cf6;
    --btn-grad-end: #c084fc;
    --btn-grad-start-hover: #6d28d9;
    --btn-grad-end-hover: #a855f7;
}

html,
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    min-width: 0;
    /* allow mobile widths */
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
    /* background-image: url('Pictures/explore.jpg') */
    overflow-y: auto !important;
}

body {
    background-size: fill;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: block;
    min-height: 100vh;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Inter:wght@400&family=DM+Sans:wght@400&display=swap');


h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    /* Bold */
}

body,
p,
span,
a,
li {
    font-family: 'Inter', sans-serif;
    /* Default to Inter */
    font-weight: 400;
    /* Regular */
}

/* Optional: Fallback to DM Sans if Inter is unavailable */
body,
p,
span,
a,
li {
    font-family: 'Inter', 'DM Sans', sans-serif;
}

#navigateHome {
    text-decoration: none;
    /* Removes underline */
    /* color: #0064E1; */

    color: var(--primary-color);
    /* Keeps the default text color */
    display: inline-block;
    /* Prevents underline from appearing due to inline element */
}

#navigateHome:visited,
#navigateHome:hover,
#navigateHome:focus {
    text-decoration: none;
    /* Ensures no underline on visit, hover, or focus */
    /* color: #0045bc; */
    color: rgb(215, 215, 215);
    /* Ensures color stays consistent */
}

#navigateHome h1 {
    margin: 0;
}

/* Company Name */
.Companyname {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 0.8rem;
    margin: 0;
    box-shadow: var(--shadow);
}

.company-logo img {
    width: 100x;
    height: 100px;
    border-radius: 50%;
    margin-right: 0.5rem;

}


.Companyname h1 {
    color: white;
    font-size: 2rem;
    letter-spacing: 2px;
}

.company-logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Header Navigation */
.Header-bar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 100;
    width: 100%;
}

.Header {
    /* background: linear-gradient(to right, #004aad, #007bff); */
    background: white;
    /* box-shadow: 0 4px 18px -4px rgba(60, 60, 120, 0.15); */
    color: white;
    padding: 0px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10000;
    position: sticky;
    top: 0;
    width: 100%;
    box-sizing: border-box;

}

.company-logo {
    flex-shrink: 0;
}

.Header-nav {
    margin-left: auto;
    margin-right: 100px;
    /* Push the navigation to the right */
    display: flex;
    justify-content: flex-end;
    /* Align items to the right */
    align-items: center;
}

.Header-nav ul {
    display: flex;
    gap: 20px;
    /* Add spacing between navigation items */
    list-style: none;
    margin: 0;
    padding: 0;
}

.Header-nav ul li {
    position: relative;
}

.Header-nav ul li a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 300;
    color: #000000;
    text-decoration: none;
    padding: 6px 0;
    display: inline-block;
    transition: color 0.2s;
    position: relative;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.Header-nav ul li a::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 4px;
    background: #791da0;
    border-radius: 2px;
    transition: width 0.25s cubic-bezier(.4, 0, .2, 1);
}


.Header-nav ul li a:hover::after,
.Header-nav ul li a.active::after {
    width: 100%;
}

.location-select select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease;
}

.location-select select:hover {
    border-color: #007bff;
}

.location-select {
    flex-shrink: 0;
}

.search-box {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.4rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.search-box button {
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.header-icons {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 0.8rem;
}

.likes-btn,
.profile-btn {
    font-size: 1rem;
    color: rgb(255, 255, 255);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;

}

.likes-btn a {
    color: inherit;
    text-decoration: none;
    display: inline-block;

}

.likes-btn a:hover {
    color: #ff4d6d;
    /* Change to your preferred hover color */
}

/* Profile dropdown styles */
.profile-btn {
    position: relative;

}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    margin-top: 10px;
}

.profile-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.profile-dropdown a:hover {
    background-color: #f5f5f5;
}

.login-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
}

#signOutButton {
    border-top: 1px solid #f0f0f0;
}

.likes-btn:hover,
.profile-btn:hover {
    color: var(--primary-color);
}

.likes-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.profile-btn a {
    color: inherit;
    text-decoration: none;
}

.likes-btn i,
.profile-btn i,
.announcement-btn i {
    color: black;
}




.main-container {
    max-width: 1550px;
    /* or your preferred max width */
    margin: 0 auto;
    /* centers the container horizontally */
    padding: 0;
    /* optional: adds space on the sides for small screens */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    left: 0;
    /* centers child elements horizontally if they are flex items */
}

.filters {
    width: 250px;
    background: #f8f9fa;
    flex-shrink: 0;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.filter-section label {
    display: block;
    margin: 0.5rem 0;
    color: #666;
}

.fee-slider {
    width: 100%;
    margin: 10px 0;
}

.fee-display {
    text-align: center;
    margin-bottom: 10px;
    color: #3498db;
    font-weight: bold;
}

.range-values {
    display: flex;
    justify-content: space-between;

    color: #666;
    font-size: 0.9rem;
}

.college-listings {
    flex: 1;
    min-width: 0;
}

.sorting-header {
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    max-width: 1400px;
}

.sorting-header select {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: white;
}

.universities-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.university-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;

}

.university-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.grid-view .university-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    /* Reduced from 500px */
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.8rem;
}

.grid-view .university-card img {
    width: 100%;
    height: 160px;
    /* Reduced from 200px */
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.grid-view .university-info {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-view .quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.grid-view .quick-info span {
    font-size: 0.75rem;
    padding: 0.25rem;
    background: #ffffff;
    border-radius: 4px;
    text-align: center;
    color: #2c3e50;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.grid-view .action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.5rem 0.8rem 0.8rem;
}

.grid-view .apply-btn,
.grid-view .tour-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
}

.grid-view .tour-btn i {
    margin-right: 0.3rem;
    font-size: 0.8rem;
}


/* Reduce card height for grid view cards */
.grid-view .university-card,
.custom-university-card {
    height: 340px;
    /* or your preferred height, e.g., 320px */
    min-height: unset;
    max-height: 360px;
}

@media (max-width: 1200px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}

.universities-list.grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    /* Increased gap between cards */
    padding: 2rem;
    /* Increased padding around the grid */
    margin: 0 auto;
    max-width: var(--container-width);
}

.grid-view .university-card {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    /* Reduced from 500px */
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    /* Added bottom margin */
}

/* Adjust container padding to maintain layout balance */
.college-listings {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    /* Added padding to the container */
}

/* Improve card hover effect with spacing */
.grid-view .university-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}





.universities-list {
    min-height: 900px;
    /* Fixed height to prevent layout shift */
    position: relative;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
}

.pagination button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.pagination span {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}


.filter-section.dropdown {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1.2rem;
    background: var(--bg-white);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.filter-section.dropdown:hover {
    box-shadow: var(--shadow-md);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(to right, rgba(52, 152, 219, 0.05), rgba(52, 152, 219, 0.1));
}

.dropdown-header:hover {
    background: linear-gradient(to right, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.15));
}

.dropdown-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dropdown-header i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
    font-size: 1rem;
}

.dropdown-content {
    display: none;
    padding: 1.2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--bg-white);
    transform-origin: top;
    transition: all 0.3s ease;
}

.filter-section.dropdown.active {
    border-color: var(--primary-color);
}

.filter-section.dropdown.active .dropdown-content {
    display: block;
    animation: dropdownOpen 0.3s ease forwards;
}

.filter-section.dropdown.active .dropdown-header {
    background: linear-gradient(to right, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.2));
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

.filter-section.dropdown.active .dropdown-header i {
    transform: rotate(180deg);
    color: var(--secondary-color);
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.8rem 0;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown-content label:hover {
    color: var(--text-primary);
    background: rgba(52, 152, 219, 0.05);
    transform: translateX(4px);
}

.dropdown-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Animation for dropdown */
@keyframes dropdownOpen {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fee slider customization */
.dropdown-content .fee-slider {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    appearance: none;
    outline: none;
}

.dropdown-content .fee-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-content .fee-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

/* Select customization */
.dropdown-content select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.dropdown-content select:hover,
.dropdown-content select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}





.dropdown-content label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin-right: 8px;
}

.dropdown-content label {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-content label:hover {
    background: rgba(52, 152, 219, 0.1);
    padding-left: 15px;
}

.dropdown-content label:active {
    background: rgba(52, 152, 219, 0.2);
}

/* Update grid layout to show 3 cards per row */

/* Make cards smaller */
.grid-view .university-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    /* Reduced from 500px */
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.8rem;
}

/* Adjust image size */
.grid-view .university-card img {
    width: 100%;
    height: 200px;
    /* Reduced from 200px */
    object-fit: fill;
    border-radius: 12px 12px 0 0;
}

/* Adjust content padding */
.grid-view .university-info {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Make text elements smaller */
.grid-view .university-info h3 {
    font-size: 1rem;
    margin: 0 0 0.3rem 0;
}

.grid-view .location,
.grid-view .ranking {
    font-size: 0.8rem;
    margin: 0.2rem 0;
}

/* Adjust quick info section */
.grid-view .quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.grid-view .quick-info span {
    font-size: 0.75rem;
    padding: 0.5rem;
}

/* Adjust buttons */
.grid-view .action-buttons {
    padding: 0.5rem 0.8rem 0.8rem;
    gap: 0.5rem;
}

.grid-view .apply-btn,
.grid-view .tour-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}





/* Modern Card Styling */
.grid-view .university-card {
    display: flex;
    flex-direction: column;
    min-height: 450px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.grid-view .university-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.grid-view .university-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.grid-view .university-card:hover img {
    transform: scale(1.05);
}

/* Content Styling */
.grid-view .university-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.grid-view .university-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
}

.grid-view .location {
    font-size: 0.9rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.grid-view .ranking {
    font-size: 0.9rem;
    color: #3498db;
    font-weight: 500;
}

/* Quick Info Section */
.grid-view .quick-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin: 0.5rem 0;
}

.grid-view .quick-info span {
    font-size: 0.8rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #2c3e50;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Action Buttons */
.grid-view .action-buttons {
    padding: 0.8rem;
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.grid-view .apply-btn,
.grid-view .tour-btn {
    flex: 1;
    padding: 0.8rem;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.grid-view .apply-btn {
    background: var(--primary-color);
    color: white;
}

.grid-view .tour-btn {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.grid-view .apply-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.grid-view .tour-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}


@media (max-width: 1200px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}


.university-name-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    text-align: center;
}





/* Add this to your study.css file */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    width: 100%;
}

.no-results i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.no-results h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-secondary);
}










/* Card Container */
.grid-view .university-card {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    width: 90%;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Image Styling */
.grid-view .university-card img {
    width: 100%;
    height: 160px;
    object-fit: fill;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Content Area */
.grid-view .university-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Quick Info Grid */
.grid-view .quick-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.grid-view .quick-info span {
    font-size: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

/* Action Buttons */
.grid-view .action-buttons {
    padding: 0.8rem;
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}





/* Like Button Container */
.like-button-container {
    position: absolute;
    top: 12px;
    right: 12px;
    /* top-right as requested */
    z-index: 5;
}

.like-btn {
    background: #f3f4f6;
    /* dimmed by default */
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.like-btn i {
    color: #9ca3af;
    /* neutral gray when not liked */
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.like-btn:hover {
    transform: scale(1.06);
    background: #f9fafb;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.like-btn.liked i {
    animation: likeEffect 0.3s ease;
    color: #ff4757;
    /* red when liked */
}

/* Liked state: brighter chip with a gentle red-tinted glow */
.like-btn.liked {
    background: #fff1f2;
    /* soft rose */
    border-color: #fecdd3;
    /* light rose border */
    box-shadow: 0 8px 22px -10px rgba(244, 63, 94, 0.45);
}

.like-btn.liked:hover {
    background: #ffe4e6;
    /* slightly brighter on hover */
}

/* Ensure cards never overflow the viewport width */
.universities-list {
    padding: 0 16px;
    /* small outside space */
    box-sizing: border-box;
}

.universities-list .u-card,
.universities-list .university-card {
    width: 100% !important;
    max-width: 97% !important;
    box-sizing: border-box;
}

/* Make sure the card has proper positioning */
/* Ensure both legacy .university-card and new .u-card can host absolute children */
.grid-view .university-card,
.u-card {
    position: relative;
}

@keyframes likeEffect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.mock-data-indicator {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 5px solid #ffeeba;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.mock-data-indicator i {
    margin-right: 8px;
    color: #e0a800;
}

.api-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin: 20px 0;
}

.retry-btn {
    background-color: #3a7bd5;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
}

.retry-btn:hover {
    background-color: #2a5db0;
}


.university-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    /* Adjust as needed */
    overflow: hidden;
    background-color: #f0f0f0;
}

.university-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    z-index: 2;
}

/* Universal image container styles (both views) */
.university-image-container {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

/* Grid view specific image container */
.grid-view .university-image-container {
    width: 100%;
    height: 180px;
    border-radius: 12px 12px 0 0;
}

/* List view specific image container */
.list-view .university-image-container {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    margin-right: 20px;
}

/* Universal image styles (both views) */
.university-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Image hover effect */
.university-card:hover .university-image {
    transform: scale(1.05);
}

/* Image text overlay (fallback when image fails) */
.image-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 10px;
    z-index: 2;
}

/* Grid view text overlay */
.grid-view .image-text-overlay {
    font-size: 1.2rem;
    font-weight: bold;
}

/* List view text overlay */
.list-view .image-text-overlay {
    font-size: 1rem;
    font-weight: 600;
}



/* Make university name font color black in cards and fallback */
.university-info h3 {
    color: #000000 !important;
}


.university-name-fallback {
    color: #ffffff !important;

}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.2);
}

.close-modal {
    color: #333;
    font-weight: bold;
    cursor: pointer;
}



.custom-university-card {
    border: 1.5px solid #e3e6f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(80, 80, 160, 0.06);
    padding: 20px 22px 18px 22px;
    margin: 18px 0;
    max-width: 370px;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 1.08rem;
    min-height: 420px;
}

.uni-card-header {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-bottom: 4px;
}

.uni-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #e3e6f0;
    background: #f8f9fb;
}

.uni-name-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3a5a;
    text-decoration: underline;
    margin-bottom: 2px;
    display: inline-block;
}

.uni-degree {
    font-size: 0.98rem;
    color: #6b7280;
    margin-bottom: 2px;
}

.uni-major {
    font-size: 1.02rem;
    color: #3b3b6d;
    font-weight: 500;
}

.uni-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.uni-tag {
    font-size: 0.85rem;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: #5b5b8c;
    border: 1px solid #e3e6f0;
}

.uni-tag.demand {
    background: #eafaf3;
    color: #1e9c5a;
    border-color: #b6e7d2;
}

.uni-tag.popular {
    background: #f3eafd;
    color: #8b3aed;
    border-color: #e0d0fa;
}

.uni-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 0 0;
    font-size: 0.97rem;
}

.uni-info-table td {
    padding: 3px 0;
    border: none;
    color: #3b3b6d;
}

.uni-info-table td:first-child {
    color: #7b7b9c;
    width: 44%;
    font-weight: 500;
}

.uni-success-prediction {
    margin: 10px 0 0 0;
}

.prediction-title {
    font-size: 0.97rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.prediction-row {
    display: flex;
    gap: 18px;
}

.prediction-label {
    font-size: 0.93rem;
    color: #7b7b9c;
    margin-bottom: 2px;
}

.prediction-badge {
    display: inline-block;
    font-size: 0.92rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 1px;
}

.prediction-badge.very-high {
    background: #eafaf3;
    color: #1e9c5a;
}

.prediction-badge.high {
    background: #eaf6fa;
    color: #1e7c9c;
}

.uni-apply-btn {
    margin-top: 14px;
    width: 100%;
    background: #f7f8fa;
    color: #3b3b6d;
    border: 1.5px solid #bdbdf7;
    border-radius: 12px;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.uni-apply-btn:hover {
    background: #7b3aed;
    color: #fff;
}

.uni-courses {
    margin-top: 8px;
    font-size: 0.97rem;
}

.uni-courses ul {
    margin: 2px 0 8px 18px;
    padding: 0;
}

.uni-courses li {
    margin-bottom: 2px;
}

.uni-logo,
.uni-logo-fallback {
    width: 54px;
    height: 54px;
}






/* Make card height auto and allow it to grow with content */
.custom-university-card,
.grid-view .university-card {
    min-height: 420px;
    height: auto !important;
    max-height: none;
    width: 100%;
    /* Remove fixed height and allow content to define size */
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(80, 80, 160, 0.06);
    font-family: 'Segoe UI', Arial, sans-serif;
    gap: 12px;
    font-size: 1.08rem;
}

/* Let .uni-info-table and other content expand card naturally */
.uni-info-table {
    font-size: 0.97rem;
    width: 100%;
}

/* Responsive: allow cards to grow as needed */
@media (max-width: 1200px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}

/* Modern Filter Bar Styling */
.filter-container {

    margin-top: 30px;
    padding: 0;
}

/* Search and Main Filters Row */
.main-filters {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(200px, 1fr) minmax(200px, 1fr);
    gap: 15px;
    margin: 20px;
}

/* Search Bar Styling */
.search-bar {
    position: relative;
    height: 48px;
}

.search-bar input {
    width: 100%;
    height: 100%;
    padding: 0 40px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
}

.search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

.search-bar .clear-button {
    position: absolute;
    left: 110%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Dropdown Styling */
.filter-dropdown {
    position: relative;
    height: 48px;
}

.filter-dropdown select {
    width: 100%;
    height: 100%;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    font-family: 'Inter', 'DM Sans', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

/* Institution dropdown: match the clean input style */
.main-filters .filter-dropdown select#institution-filter {
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.01em;
}

/* Remove duplicate pseudo-arrow; we render a single chevron via background-image below */
.filter-dropdown::after {
    content: none;
}

.filter-dropdown .dot-indicator {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #0066ff;
}

/* Secondary Filters Row */
.secondary-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px;
}

.filter-button {
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.filter-button::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #777;
}

.all-filters-btn {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color);
    font-size: 14px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Active Filters Row */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
}

.filter-pill {
    height: 32px;
    padding: 0 10px 0 15px;
    background-color: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pill .remove-filter {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-all {
    background: none;
    border: none;
    color: #0066ff;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

/* University Grid - 4 per row */


/* Responsive adjustments */
@media (max-width: 1200px) {
    .main-filters {
        grid-template-columns: 1fr 1fr;
    }

    .universities-list.grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .main-filters {
        grid-template-columns: 1fr;
    }

    .universities-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}





/* Dynamic filter components */
.filter-dropdown-menu {
    position: absolute;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.dropdown-options {
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.dropdown-option:hover {
    background-color: #f5f7fa;
}

.dropdown-apply-btn {
    width: calc(100% - 32px);
    margin: 12px 16px;
    padding: 8px 0;
    background-color: #8f34da;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.all-filters-modal {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

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

}

.modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    max-height: 60vh;

}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.filter-section {
    margin-bottom: 24px;
}

.all-filters-modal .filter-section-collapsible {
    margin-bottom: 14px;
    border: 1px solid #eceff5;
    border-left: 4px solid #d4d4d8;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.all-filters-modal .filter-section-toggle {
    width: 100%;
    border: none;
    background: #f8fafc;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.all-filters-modal .filter-section-title {
    font-weight: 600;
    color: #1f2937;
}

.all-filters-modal .filter-section-meta {
    font-size: 12px;
    color: #6b7280;
}

.all-filters-modal .filter-section-caret {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
}

.all-filters-modal .filter-section-collapsible.is-open .filter-section-caret {
    color: #7c2bc0;
}

.all-filters-modal .filter-section-collapsible.is-open .filter-section-caret::before {
    content: '-';
}

.all-filters-modal .filter-section-collapsible.is-open .filter-section-caret {
    font-size: 0;
}

.all-filters-modal .filter-section-collapsible .filter-section-content {
    padding: 10px 14px 14px;
    background: #ffffff;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="country"] {
    border-left-color: #2563eb;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="country"] .filter-section-toggle {
    background: #eff6ff;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="destination"] {
    border-left-color: #0891b2;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="destination"] .filter-section-toggle {
    background: #ecfeff;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="institution"] {
    border-left-color: #7c3aed;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="institution"] .filter-section-toggle {
    background: #f5f3ff;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="programLevel"] {
    border-left-color: #ea580c;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="programLevel"] .filter-section-toggle {
    background: #fff7ed;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="fieldOfStudy"] {
    border-left-color: #059669;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="fieldOfStudy"] .filter-section-toggle {
    background: #ecfdf5;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="intakes"] {
    border-left-color: #db2777;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="intakes"] .filter-section-toggle {
    background: #fdf2f8;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="programTag"] {
    border-left-color: #16a34a;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="programTag"] .filter-section-toggle {
    background: #f0fdf4;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="budgetRange"] {
    border-left-color: #b45309;
}

.all-filters-modal .filter-section-collapsible[data-filter-section="budgetRange"] .filter-section-toggle {
    background: #fffbeb;
}

.filter-section h4 {
    margin-bottom: 12px;
    color: #333;
}

.filter-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.filter-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.modal-apply-btn {
    background: #b34ae0;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.modal-reset-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
}

/* Display/hide dot indicator */
.dot-indicator {
    display: none;
}












/* Filter section at top */
.filter-container {
    padding: 0px;
    border-radius: 8px;
    margin: 10;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
}

/* Main filters row with search and dropdowns */
.main-filters {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(200px, 1fr) minmax(200px, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* Search bar styling */
.search-bar {
    position: relative;
    height: 40px;
    width: 80%;
}

.search-bar input {
    width: 100%;
    height: 100%;
    padding: 0 40px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 15px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.clear-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
}

/* Dropdown styling */
.filter-dropdown {
    position: relative;
}

.filter-dropdown select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
    /* room for the chevron */
}

.dot-indicator {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #0d6efd;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    right: 30px;
    display: none;
}

/* Secondary filters row */
.secondary-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-button {
    height: 36px;
    padding: 0 15px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.filter-button::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #555;
    margin-left: 8px;
}

.all-filters-btn {
    height: 36px;
    padding: 0 15px;
    background-color: #7c2bc0;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Active filters row */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-pill {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 100px;
    padding: 5px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-filter {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px;
}

.clear-all {
    color: var(--secondary-color);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

/* University section */
.university-section {
    width: 100%;
    margin: 20px auto;
    /* reduce large outer margins */
    padding: 0 16px;
    /* small space on the outside */
}

.sorting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0px;

}

.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}

.view-btn.active {
    background: #7c2bc0;
    color: white;
    border-color: #7c2bc0;
}

.sorting-header select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 34px;
    /* room for chevron */
}

/* University grid - 4 per row */


/* University card styling */
.university-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.university-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.university-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c2bc0;
}

.university-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
}

.university-program {
    font-size: 14px;
    color: #495057;
    margin-bottom: 12px;
}

.university-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
    flex: 1;
}

.info-row {
    display: flex;
}

.info-label {
    color: #6c757d;
    width: 80px;
    font-size: 13px;
}

.info-value {
    color: #212529;
    font-weight: 500;
    font-size: 13px;
}

.view-details-btn {
    width: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #a855f7 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    /* pill */
    padding: 12px 0;
    /* bigger tap area */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.5);
    transition: background 0.22s ease, transform 0.12s ease, box-shadow 0.22s ease;
}

.view-details-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(139, 92, 246, 0.6);
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 0%, #9333ea 100%);
}

.view-details-btn:active {
    transform: translateY(0);
}

.view-details-btn i {
    font-size: 14px;
}

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

.pagination button {
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .main-filters {
        grid-template-columns: 1fr 1fr;
    }

    .universities-list.grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .main-filters {
        grid-template-columns: 1fr;
    }

    .universities-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .universities-list.grid-view {
        grid-template-columns: 1fr;
    }
}





/* Change the All Filters modal header blue gradient */
.all-filters-modal .modal-header {
    background: linear-gradient(to right, #7c2bc0, #9b59b6);
    /* Purple gradient */
    color: white;
    border-radius: 8px 8px 0 0;
}

.all-filters-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.all-filters-modal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
}

.all-filters-modal .modal-close:hover {
    opacity: 1;
}














.university-card {
    max-width: 300px;
    max-height: 350px;
    padding: 40px;
    font-size: 1rem;
    right: 40px;

}

.universities-list.grid-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 90px;
    /* or your preferred spacing */
    padding: 0;
    margin: 0;
    max-width: 1400px;
}


.university-name {
    font-size: 1.08rem;
    font: bold;
}

.university-program {
    font-size: 1.08rem;
}











/* Study Page Hero Section - Unique Class Names */
.study-hero-section {
    background: linear-gradient(135deg, #e8e4f3 0%, #f0edf7 100%);
    color: #333;
    padding: 20px 20px 60px;
    text-align: center;
    position: relative;
    overflow: visible;
    margin: 0;
    width: 100%;
    min-height: 500px;
    box-sizing: border-box;
    /* prevent horizontal overflow from padding */
}

.study-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto 10px;
}

.study-hero-title {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #2c3e50;
    background: linear-gradient(135deg, #7c2bc0, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.study-hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 0;
}

.study-hero-programs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.study-program-item {
    background: white;
    border-radius: 16px;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(124, 43, 192, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(124, 43, 192, 0.1);
    text-align: left;
    position: relative;
}

.study-program-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(124, 43, 192, 0.15);
}

.study-program-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #7c2bc0, #9b59b6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.study-program-icon i {
    color: white;
    font-size: 20px;
}

.study-program-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #7c2bc0;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.study-program-desc {
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.study-program-detail {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Responsive Design for Study Hero Section */
@media (max-width: 1024px) {
    .study-hero-programs {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .study-hero-section {
        padding: 32px 16px 40px;
        /* side gap similar to list section */
        box-sizing: border-box;
    }

    .study-hero-title {
        font-size: 2.2rem;
    }

    .study-hero-subtitle {
        font-size: 1.1rem;
    }

    .study-hero-programs {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 8px;
        /* add inner side gap so cards don't touch edges */
        box-sizing: border-box;
    }

    .study-program-item {
        padding: 18px 14px;
        /* slightly tighter for mobile */
    }
}

@media (max-width: 480px) {
    .study-hero-title {
        font-size: 1.8rem;
    }

    .study-hero-subtitle {
        font-size: 1rem;
    }

    .study-program-item {
        padding: 16px 12px;
        /* keep safe gap on very small screens */
        text-align: center;
    }

    .study-program-title {
        font-size: 1rem;
    }

    .study-program-desc {
        font-size: 0.9rem;
    }

    .study-program-detail {
        font-size: 0.8rem;
    }
}

.university-card:hover {
    box-shadow: 0 8px 32px 0 rgba(124, 43, 192, 0.15);
    border-color: #7c2bc0;
    transform: translateY(-6px) scale(1.01);
}

.view-details-btn:hover {
    background: #5a1a8a;
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 43, 192, 0.15);
}



/* Decrease font size for university cards */
.university-card {
    font-size: 0.60rem;
    font-weight: bold;
}

.university-card .university-name {
    font-size: 1rem;
}

.university-card .degree-type-block,
.university-card .course-block,
.university-program {
    font-size: 0.80em;

}

.university-card .info-label,
.university-card .info-value {
    font-size: 0.80em;

}

.university-card .view-details-btn {
    font-size: 0.80em;
    padding: 7px 0;
}

/* === Unified Compact University Card (v2) === */
:root {
    --uc-radius: 18px;
    --uc-bg: #ffffff;
    --uc-border: #e3e6ef;
    --uc-border-accent: #c8b4ec;
    --uc-shadow: 0 4px 14px -2px rgba(32, 18, 53, .08);
    --uc-shadow-hover: 0 10px 32px -4px rgba(32, 18, 53, .18);
    --uc-primary: #7c2bc0;
    --uc-primary-soft: #f4ecff;
    --uc-ink: #261732;
    --uc-ink-sub: #443651;
    --uc-muted: #80748e;
    --uc-pill-bg: #f4ecff;
    --uc-pill-border: #e4d5f8;
    --uc-focus: #6519a6;
    --uc-trans: 0.22s cubic-bezier(.4, .2, .2, 1);
    --uc-font: 'Inter', 'Segoe UI', system-ui, Arial, sans-serif;
}

.universities-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
    padding: 10px 12px 40px;
}

.university-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--uc-bg);
    border: 1px solid var(--uc-border);
    border-radius: var(--uc-radius);
    padding: 18px 18px 16px;
    font-family: var(--uc-font);
    box-shadow: var(--uc-shadow);
    transition: var(--uc-trans);
    overflow: hidden;
    isolation: isolate;
}

.university-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(140deg, rgba(124, 43, 192, .12), rgba(124, 43, 192, 0) 55%);
    opacity: 0;
    transition: var(--uc-trans);
    pointer-events: none;
}

.university-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c2bc0, #c28bff 60%, #7c2bc0);
    opacity: .0;
    transition: var(--uc-trans);
}

.university-card:hover {
    transform: translateY(-4px);
    border-color: var(--uc-border-accent);
    box-shadow: var(--uc-shadow-hover);
}

.university-card:hover::before {
    opacity: 1;
}

.university-card:hover::after {
    opacity: 1;
}

.university-card:focus-within {
    outline: 2px solid var(--uc-focus);
    outline-offset: 3px;
}

/* Header */
.uc-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.uc-logo,
.uc-logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--uc-primary-soft);
    border: 1px solid #dbcdee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--uc-primary);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.uc-logo.hidden {
    display: none;
}

.uc-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uc-name {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    letter-spacing: -0.25px;
    line-height: 1.15;
    color: var(--uc-ink);
}

.uc-degree {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--uc-primary);
    margin-top: 2px;
}

.uc-course {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--uc-ink-sub);
    letter-spacing: .2px;
}

/* Meta */
.uc-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.uc-meta-row {
    display: flex;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.25;
    align-items: flex-start;
}

.uc-meta-row .uc-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--uc-primary);
    margin-top: 1px;
    flex-shrink: 0;
}

.uc-labelwrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.uc-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--uc-muted);
}

.uc-val {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--uc-ink-sub);
}

.uc-val.muted {
    font-weight: 500;
    color: #6d617b;
}

/* Tagline */
.uc-tagline {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #756685;
    margin-top: 2px;
    max-height: 3.9em;
    overflow: hidden;
    position: relative;
}

.uc-tagline::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40%;
    height: 1.3em;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--uc-bg));
}

/* Tags */
.uc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0;
}

.uc-tag {
    background: var(--uc-pill-bg);
    border: 1px solid var(--uc-pill-border);
    padding: 3px 8px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 999px;
    color: var(--uc-primary);
    line-height: 1;
}

.uc-tag:nth-child(odd) {
    background: #efe6ff;
}

/* Actions */
.uc-actions {
    margin-top: 2px;
}

.uc-btn {
    width: 100%;
    background: #fff;
    border: 1.4px solid var(--uc-primary);
    color: var(--uc-primary);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 0 9px;
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--uc-trans);
}

.uc-btn:hover {
    background: var(--uc-primary-soft);
    border-color: var(--uc-focus);
    transform: translateY(-2px);
}

.uc-btn:active {
    transform: translateY(0);
    background: #ead7ff;
}

@media (max-width:840px) {
    .universities-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))
    }

    .uc-name {
        font-size: 15.5px;
    }

    .uc-course {
        font-size: 13px;
    }
}

/* Add this at the end of your CSS file */

/* Filter Dropdown Menu Styles */
.filter-dropdown-menu {
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown-menu .dropdown-header {
    padding: 12px 16px;
    background: #ffffff;
    /* High-contrast on white */
    color: #1f2937;
    /* Ensure visible dark text */
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.filter-dropdown-menu .dropdown-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-dropdown-menu .dropdown-close:hover {
    color: #666;
}

.filter-dropdown-menu .dropdown-options {
    padding: 8px 0;
}

.filter-dropdown-menu .dropdown-option {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.filter-dropdown-menu .dropdown-option:hover {
    background: #f0f0f0;
}

.filter-dropdown-menu .dropdown-option input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.filter-dropdown-menu .dropdown-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* Filter Button Styles - Make them look clickable */
.filter-button,
.program-level,
.field-of-study,
.program-tag,
.country,
.tuition-range,
.degree-type,
.application-fee,
.duration {
    height: 40px !important;
    padding: 0 16px !important;
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s ease !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
}

/* Make the main Country filter button wider in the top filter row */
.main-filters .filter-dropdown .filter-btn.country {
    width: 100% !important;
}

/* Spacing between icon and text inside filter buttons */
.filter-buttons i,
.filter-button i,
.program-level i,
.field-of-study i,
.program-tag i,
.country i,
.institution i {
    margin-left: 8px;
    font-size: 0.95em;
    vertical-align: middle;
}

/* Layout container for tags with consistent gap */
.filter-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-left: 20px;
}

/* All Filters button styling for horizontal layout */
.all-filters-btn {
    height: 40px !important;
    padding: 0 16px !important;
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    border: none !important;
    border-radius: 9999px !important;
    color: white !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .secondary-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .filter-button,
    .program-level,
    .field-of-study,
    .program-tag,
    .country,
    .tuition-range,
    .degree-type,
    .application-fee,
    .duration,
    .all-filters-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Medium screens - 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .secondary-filters {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
    }

    .all-filters-btn {
        grid-column: span 2 !important;
    }
}

/* Large screens - horizontal row */
@media (min-width: 1025px) {
    .secondary-filters {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}

/* Fix any container that might be forcing vertical layout */
.filters-container,
.filter-controls,
.secondary-filter-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

/* Ensure parent containers don't override */
.secondary-filters button {
    margin: 0 !important;
    display: inline-flex !important;
}




/* Professional Filter Pills Styling */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
    min-height: 20px;
    padding: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f5f0ff 0%, #ede4ff 100%);
    border: 1px solid #c7b5e3;
    border-radius: 25px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #610b8a;
    /* Your primary color */
    box-shadow: 0 2px 4px rgba(97, 11, 138, 0.1);
    transition: all 0.2s ease;
    animation: slideInPill 0.3s ease-out;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-pill:hover {
    background: linear-gradient(135deg, #ede4ff 0%, #e0d1ff 100%);
    border-color: #b39ddb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(97, 11, 138, 0.15);
}


.filter-pill .remove-filter {
    background: rgba(97, 11, 138, 0.1);
    border: none;
    color: #610b8a;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.filter-pill .remove-filter:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    transform: scale(1.1);
}

/* Clear All Button Styling */
.clear-all {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2) !important;
    margin-left: 8px !important;
}

.clear-all:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3) !important;
}

.clear-all:before {
    content: "✕";
    font-size: 11px;
    margin-right: 4px;
}

/* Animation for new pills */
@keyframes slideInPill {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.filter-pill[data-filter-key="programLevel"] {
    background: linear-gradient(135deg, #f5f0ff 0%, #ede4ff 100%);
    border-color: #c7b5e3;
    color: #610b8a;
}

.filter-pill[data-filter-key="programLevel"]:hover {
    background: linear-gradient(135deg, #ede4ff 0%, #e0d1ff 100%);
    border-color: #b39ddb;
}

.filter-pill[data-filter-key="programLevel"] .remove-filter {
    background: rgba(97, 11, 138, 0.1);
    color: #610b8a;
}

/* Field of Study - Royal Blue (Complementary to purple) */
.filter-pill[data-filter-key="fieldOfStudy"] {
    background: linear-gradient(135deg, #e8f2ff 0%, #d6e7ff 100%);
    border-color: #9bb8e8;
    color: #1e3a8a;
}

.filter-pill[data-filter-key="fieldOfStudy"]:hover {
    background: linear-gradient(135deg, #d6e7ff 0%, #c4dcff 100%);
    border-color: #7fa3d8;
}

.filter-pill[data-filter-key="fieldOfStudy"] .remove-filter {
    background: rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

/* Program Tag - Teal (Analogous color) */
.filter-pill[data-filter-key="programTag"] {
    background: linear-gradient(135deg, #e6fffa 0%, #ccfbf1 100%);
    border-color: #5eead4;
    color: #0f766e;
}

.filter-pill[data-filter-key="programTag"]:hover {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    border-color: #2dd4bf;
}

.filter-pill[data-filter-key="programTag"] .remove-filter {
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
}

/* Search - Magenta/Pink (Complementary to your purple) */
.filter-pill[data-filter-key="search"] {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: #f3c4d8;
    color: #be185d;
}

.filter-pill[data-filter-key="search"]:hover {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #f0abcc;
}

.filter-pill[data-filter-key="search"] .remove-filter {
    background: rgba(190, 24, 93, 0.1);
    color: #be185d;
}

/* Destination - Emerald Green (Triadic color) */
.filter-pill[data-filter-key="destination"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
    color: #15803d;
}

.filter-pill[data-filter-key="destination"]:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #bbf7d0 100%);
    border-color: #4ade80;
}

.filter-pill[data-filter-key="destination"] .remove-filter {
    background: rgba(21, 128, 61, 0.1);
    color: #15803d;
}

/* Institution - Orange (Complementary color) */
.filter-pill[data-filter-key="institution"] {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
    color: #c2410c;
}

.filter-pill[data-filter-key="institution"]:hover {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fb923c;
}

.filter-pill[data-filter-key="institution"] .remove-filter {
    background: rgba(194, 65, 12, 0.1);
    color: #c2410c;
}

/* Intakes - Violet (Monochromatic with your primary) */
.filter-pill[data-filter-key="intakes"] {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #c4b5fd;
    color: #7c3aed;
}

.filter-pill[data-filter-key="intakes"]:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #a78bfa;
}

.filter-pill[data-filter-key="intakes"] .remove-filter {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

/* Empty state when no filters */
.active-filters:empty::before {
    content: "";
    display: none;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .active-filters {
        gap: 8px;
        margin: 15px 0;
    }

    .filter-pill {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 150px;
    }

    .filter-pill .remove-filter {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .clear-all {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* Professional spacing for the container */
.active-filters-container {
    margin: 20px 0;
    padding: 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

/* Add subtle background when filters are active */
.active-filters:not(:empty) {
    background: rgba(248, 245, 255, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px dashed rgba(124, 43, 192, 0.2);
}

/* ========== FILTER DROPDOWN MENU STYLES ========== */

/* Main dropdown container */
.filter-dropdown-menu {
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    top: 100%;
    left: 0;
    margin-top: 8px;
    width: 100%;
    min-width: 280px;
    max-width: 480px;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown header */
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #7c2bc0, #9b59b6);
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dropdown-header span {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.dropdown-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.dropdown-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Options container with custom scrollbar */
.dropdown-options {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background: white;
}

/* Custom scrollbar styling */
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
    margin: 4px 0;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c2bc0, #9b59b6);
    border-radius: 10px;
    border: 2px solid #f5f5f5;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6a249e, #8b4aa3);
}

/* For Firefox */
.dropdown-options {
    scrollbar-width: thin;
    scrollbar-color: #7c2bc0 #f5f5f5;
}

/* Individual option item */
.dropdown-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    user-select: none;
}

.dropdown-option:hover {
    background: linear-gradient(135deg, rgba(124, 43, 192, 0.08), rgba(155, 89, 182, 0.08));
    transform: translateX(4px);
}

.dropdown-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #7c2bc0;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    flex-shrink: 0;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.dropdown-option label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50 !important;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.dropdown-option input[type="checkbox"]:checked+label {
    color: #7c2bc0 !important;
    font-weight: 600;
}

/* Hover effect for checked items */
.dropdown-option:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, rgba(124, 43, 192, 0.12), rgba(155, 89, 182, 0.12));
    border-left: 3px solid #7c2bc0;
    padding-left: 13px;
}

/* Empty state */
.dropdown-options:empty::before {
    content: "No options available";
    display: block;
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-dropdown-menu {
        min-width: 240px;
        max-width: 280px;
    }

    .dropdown-options {
        max-height: 280px;
    }

    .dropdown-option {
        padding: 10px 14px;
    }
}

/* ===== Final Mobile Overrides (ensure they win in cascade) ===== */
@media (max-width: 768px) {

    /* Header: stack and make nav scrollable horizontally if needed */
    .Header {
        padding: 8px 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .Header-nav {
        margin: 8px 0 0 0;
        margin-right: 0;
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .Header-nav::-webkit-scrollbar {
        display: none;
    }

    .Header-nav ul {
        gap: 12px;
        padding-bottom: 4px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .Header-nav ul li a {
        font-size: 0.95rem;
    }

    .company-logo h1 {
        font-size: 1.2rem;
    }

    /* Main content paddings and margins */
    .main-container {
        padding: 0 12px;
    }

    .university-section {
        margin: 16px;
        /* gap around the whole section */
    }

    /* Ensure list has side padding so cards don't touch edges */
    .universities-list {
        padding: 0 12px 24px;
        /* left/right gap + bottom spacing */
        box-sizing: border-box;
    }

    .universities-list.list-view {
        padding: 0 12px 24px;
        /* explicit for list view */
        gap: 6px;
        /* compact spacing between items */
    }

    /* Safety: cards must not exceed container width */
    .universities-list .u-card,
    .universities-list .university-card {
        width: 100%;
        box-sizing: border-box;
    }

    /* Filters layout */
    .main-filters {
        grid-template-columns: 1fr;
        margin: 12px 0;
    }

    .search-bar {
        width: 100%;
        height: 44px;
    }

    .search-bar input {
        font-size: 15px;
    }

    .search-bar .clear-button {
        right: 12px;
        left: auto;
    }

    .secondary-filters {
        gap: 8px;
        margin: 12px 0;
    }

    .filter-buttons {
        gap: 10px;
        margin-left: 0;
    }

    .filter-button,
    .program-level,
    .field-of-study,
    .program-tag,
    .country,
    .tuition-range,
    .degree-type,
    .application-fee,
    .duration,
    .all-filters-btn {
        width: 100% !important;
    }

    /* Sorting header */
    .sorting-header {
        padding: 8px 10px;
    }

    /* Hero adjustments */
    .study-hero-section {
        height: auto;
        padding: 32px 16px 40px;
    }

    .study-hero-content {
        margin-bottom: 28px;
    }

    /* University cards grid */
    .universities-list.grid-view {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 8px 8px 24px !important;
        max-width: 100% !important;
    }

    .university-card {
        padding: 14px;
    }

    .grid-view .university-card {
        height: auto;
    }

    .grid-view .university-card img,
    .grid-view .university-image-container {
        height: 160px;
    }
}

/* Additional mobile polish to ensure everything fits nicely */
@media (max-width: 768px) {

    /* Prevent tall list container */
    .universities-list {
        min-height: auto !important;
    }

    /* Ensure cards fill width and read well */
    .university-card {
        max-width: 100% !important;
        max-height: none !important;
        right: auto !important;
    }

    .university-card {
        font-size: 0.95rem !important;
    }

    .university-card .university-name,
    .university-info h3 {
        font-size: 1.1rem !important;
    }

    .university-card .info-label,
    .university-card .info-value,
    .university-program,
    .degree-type-block,
    .course-block {
        font-size: 0.95rem !important;
    }

    /* Cap dropdown to viewport */
    .filter-dropdown-menu {
        max-width: calc(100vw - 32px) !important;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .grid-view .quick-info {
        grid-template-columns: 1fr !important;
    }

    .grid-view .university-card img,
    .grid-view .university-image-container {
        height: 140px;
    }

    .university-card {
        font-size: 0.9rem !important;
    }

    .university-card .university-name,
    .university-info h3 {
        font-size: 1.05rem !important;
    }
}

/* Media elements: prevent overflow on narrow screens */
@media (max-width: 768px) {

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}

/* ===== Category-wise Unique Button Styles (overrides) ===== */
/* Goal: Make each button category visually distinct on the Study page. */

/* 1) Primary CTA: View Details (keep attractive purple gradient pill) */
.view-details-btn {
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.5) !important;
}

.view-details-btn:hover {
    background: linear-gradient(90deg, var(--btn-grad-start-hover) 0%, var(--btn-grad-start) 50%, var(--btn-grad-end-hover) 100%) !important;
}

/* 2) Action buttons on cards: Apply and Tour (distinct from CTA) */
.action-buttons .apply-btn {
    background: #6d28d9 !important;
    /* solid deep purple */
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
}

.action-buttons .apply-btn:hover {
    filter: brightness(1.05);
}

.action-buttons .tour-btn {
    background: var(--secondary-color) !important;
    /* brand secondary */
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
}

.action-buttons .tour-btn:hover {
    filter: brightness(1.05);
}

/* 3) Filter action buttons: Apply, Clear, All Filters (unique, not gradient) */
.apply-filters-btn {
    background: #6d28d9 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
}

.clear-filters-btn {
    background: transparent !important;
    color: #7f8c8d !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
}

.all-filters-btn {
    background: #7c2bc0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
}

/* Search Suggestions: polished look */
.search-bar {
    position: relative;
}

.search-bar .clear-button {
    right: 12px !important;
    left: auto !important;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: none;
    transition: all 0.18s ease;
}

.search-bar .clear-button:hover {
    background: #eef2ff;
    color: #312e81;
    border-color: #c7d2fe;
}

.search-suggestions {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e8eaf2;
    border-radius: 14px;
    box-shadow: 0 20px 44px rgba(31, 41, 55, 0.16);
    overflow-y: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    transform-origin: top center;
    animation: suggestIn 0.16s ease;
}

.search-suggestions::-webkit-scrollbar {
    width: 10px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 2px solid #ffffff;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.suggestions-empty-state {
    padding: 18px 16px;
    text-align: center;
}

.suggestions-empty-title {
    font-size: 14px;
    color: #1f2937;
    font-weight: 700;
}

.suggestions-empty-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.suggestion-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.15s ease, border-left-color 0.15s ease;
    border-left: 3px solid transparent;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.is-selected {
    background: #f8f7ff;
    border-left-color: #610b8a;
}

.suggestion-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: linear-gradient(160deg, #f3e8ff, #e0e7ff);
}

.suggestion-item[data-type="course"] .suggestion-item-icon {
    background: linear-gradient(160deg, #ecfeff, #dbeafe);
}

.suggestion-item[data-type="field"] .suggestion-item-icon {
    background: linear-gradient(160deg, #f0fdf4, #dcfce7);
}

.suggestion-item[data-type="place"] .suggestion-item-icon {
    background: linear-gradient(160deg, #fff7ed, #ffedd5);
}

.suggestion-item-body {
    min-width: 0;
}

.suggestion-item-title {
    font-size: 14px;
    line-height: 1.2;
    color: #111827;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item-type {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
    background: #eef2ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 4px 9px;
    font-weight: 600;
    white-space: nowrap;
}

.suggestion-item[data-type="university"] .suggestion-item-type {
    color: #1e3a8a;
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.suggestion-item[data-type="course"] .suggestion-item-type {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
}

.suggestion-item[data-type="field"] .suggestion-item-type {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.suggestion-item[data-type="place"] .suggestion-item-type {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fed7aa;
}

@keyframes suggestIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .search-suggestions {
        max-height: 300px;
        border-radius: 12px;
    }

    .suggestion-item {
        grid-template-columns: 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .suggestion-item-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        border-radius: 8px;
    }

    .suggestion-item-title {
        font-size: 13px;
    }

    .suggestion-item-subtitle {
        font-size: 11px;
    }
}

/* 4) Filter option chips: outlined by default, filled when selected */
.filter-button,
.program-level,
.field-of-study,
.program-tag,
.country,
.tuition-range,
.degree-type,
.application-fee,
.duration {
    background: #ffffff !important;
    color: #333 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
}

.filter-button.is-selected,
.program-level.is-selected,
.field-of-study.is-selected,
.program-tag.is-selected,
.country.is-selected,
.tuition-range.is-selected,
.degree-type.is-selected,
.application-fee.is-selected,
.duration.is-selected,
.filter-button[aria-pressed="true"],
.program-level[aria-pressed="true"],
.field-of-study[aria-pressed="true"],
.program-tag[aria-pressed="true"],
.country[aria-pressed="true"],
.tuition-range[aria-pressed="true"],
.degree-type[aria-pressed="true"],
.application-fee[aria-pressed="true"],
.duration[aria-pressed="true"] {
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* Ensure icons adapt on chips */
.filter-button i,
.program-level i,
.field-of-study i,
.program-tag i,
.country i,
.tuition-range i,
.degree-type i,
.application-fee i,
.duration i {
    color: #555 !important;
}

.filter-button.is-selected i,
.program-level.is-selected i,
.field-of-study.is-selected i,
.program-tag.is-selected i,
.country.is-selected i,
.tuition-range.is-selected i,
.degree-type.is-selected i,
.application-fee.is-selected i,
.duration.is-selected i,
.filter-button[aria-pressed="true"] i,
.program-level[aria-pressed="true"] i,
.field-of-study[aria-pressed="true"] i,
.program-tag[aria-pressed="true"] i,
.country[aria-pressed="true"] i,
.tuition-range[aria-pressed="true"] i,
.degree-type[aria-pressed="true"] i,
.application-fee[aria-pressed="true"] i,
.duration[aria-pressed="true"] i {
    color: #fff !important;
}

/* Override styling for the main Country selector in the top filter row
   so it looks like a wide input, not a small chip */
.main-filters .filter-dropdown .filter-btn.country {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    height: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 16px !important;
}

.main-filters .filter-dropdown .filter-btn.country i {
    margin-left: auto;
    color: #777777 !important;
}

/* Match Institution button to main Country style in the top row */
.main-filters .filter-dropdown .filter-btn.institution {
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    height: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 16px !important;
    min-width: 450px;
}

.main-filters .filter-dropdown .filter-btn.institution i {
    margin-left: auto;
    color: #777777 !important;
}

/* Hide the dot indicator for the main Country selector to keep it clean */
.main-filters .filter-dropdown .dot-indicator {
    display: none;
}

/* 5) View toggle as segmented control */
.view-toggle {
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 3px;
    background: #fff;
}

.view-toggle .view-btn {
    background: transparent !important;
    color: #333 !important;
    border: none !important;
    border-radius: 9999px !important;
}

.view-toggle .view-btn.active,
.view-toggle .view-btn[aria-pressed="true"] {
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    color: #fff !important;
}

/* 6) Pagination: outlined pills, strong active state */
.pagination button {
    background: #fff !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
}

.pagination button:hover:not(:disabled) {
    background: #f9fafb !important;
}

.pagination button[aria-current="page"],
.pagination button.active {
    background: linear-gradient(90deg, var(--btn-grad-start) 0%, var(--btn-grad-mid) 50%, var(--btn-grad-end) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.pagination button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* 7) Small square icon button (if used outside toggles) */
.view-btn i,
.apply-filters-btn i,
.all-filters-btn i,
.clear-filters-btn i {
    color: inherit !important;
}

/* --- Readability fixes: keep filter chips outlined on hover (no gradient) --- */
.filter-button:hover,
.program-level:hover,
.field-of-study:hover,
.program-tag:hover,
.country:hover,
.tuition-range:hover,
.degree-type:hover,
.application-fee:hover,
.duration:hover {
    background: #f9fafb !important;
    /* light gray */
    color: #111827 !important;
    /* near-black text */
    border-color: #d1d5db !important;
    /* subtle darker border */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
    /* cancel earlier lift */
}

.filter-button:hover i,
.program-level:hover i,
.field-of-study:hover i,
.program-tag:hover i,
.country:hover i,
.tuition-range:hover i,
.degree-type:hover i,
.application-fee:hover i,
.duration:hover i {
    color: #111827 !important;
}

/* Segmented toggle: keep neutral hover unless active */
.view-toggle .view-btn:hover {
    background: transparent !important;
    color: #333 !important;
    box-shadow: none !important;
}






html.cf-no-scroll,
body.cf-no-scroll {
    overflow: hidden;
    height: 100%
}

#course-finder-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 56px 48px 72px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: #111827;
    background:
        radial-gradient(1200px 600px at 100% 0%, rgba(168, 85, 247, .16), rgba(168, 85, 247, 0) 60%),
        radial-gradient(1000px 520px at 0% 100%, rgba(99, 102, 241, .18), rgba(99, 102, 241, 0) 60%),
        #f7f8ff;
}

#course-finder-overlay.hidden {
    display: none
}

/* Progress dots placed inside the card header (top-left) */
.cf-card .cf-progress {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 20px;
    left: 24px;
    opacity: .9
}

.cf-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: .25s
}

.cf-step-dot.active {
    background: #7c3aed;
    box-shadow: 0 0 0 6px rgba(124, 58, 237, .15)
}

/* Two-column layout: form left, illustration right */
.cf-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 36px;
    align-items: start;
    width: min(1120px, 96vw);
    overflow: visible;
    margin: auto;
}

.cf-stage {
    position: relative;
    width: 100%;
    overflow: visible
}

.cf-card {
    width: min(720px, 94vw);
    background: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 32px;
    padding: 64px 52px 46px;
    box-shadow: 0 28px 56px -22px rgba(17, 24, 39, .15);
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 2
}

/* Illustration sits to the side (no overlap) */
.cf-illustration {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 300px;
    position: relative;
    margin-top: 40px;
}

.cf-illu {
    width: 100%;
    max-width: 420px;
    min-height: 300px;
    position: relative;
    isolation: isolate
}

/* Decorative glow behind the illustration */
.cf-illu::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 28px;
    background:
        radial-gradient(120% 100% at 10% 0%, rgba(167, 139, 250, .35), rgba(167, 139, 250, 0) 60%),
        radial-gradient(120% 100% at 100% 100%, rgba(99, 102, 241, .28), rgba(99, 102, 241, 0) 60%);
    filter: blur(10px);
    z-index: 0;
    opacity: .9
}

/* Subtle animated accent orb */
.cf-illu::after {
    content: "";
    position: absolute;
    right: -14px;
    bottom: -16px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 50%, rgba(236, 72, 153, .22), rgba(236, 72, 153, 0) 70%);
    filter: blur(12px);
    z-index: 0;
    animation: cfOrb 8s ease-in-out infinite alternate
}

.cf-illu-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 24px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 42px -16px rgba(15, 23, 42, .28);
    position: relative;
    margin-left: 0;
    z-index: 1;
    transition: transform .28s ease, box-shadow .28s ease
}

.cf-illu:hover .cf-illu-img {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 26px 54px -18px rgba(15, 23, 42, .35)
}

.cf-illu svg {
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: block
}

.cf-card.is-ghost {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.cf-title {
    font-size: 36px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.6px;
    margin: 0;
    color: #0f172a
}

.cf-subtitle {
    margin-top: 6px;
    color: #475569;
    font-size: 16px
}

.cf-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px
}

.cf-field {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.cf-field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #6b7280
}

.cf-field select,
.cf-field input,
.cf-field textarea {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    color: #111827;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    resize: vertical;
    min-height: 54px;
}

.cf-field textarea {
    min-height: 120px
}

.cf-field select:focus,
.cf-field input:focus,
.cf-field textarea:focus {
    outline: 2px solid #6366f1;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .25)
}

.cf-field select option {
    color: #111827;
    background: #ffffff
}

#backlogs {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
    width: 120px
}

.cf-tags-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 6px
}

.cf-tag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #111827;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .04em;
    transition: transform .18s, box-shadow .25s, background .25s, border-color .25s
}

.cf-tag-btn .flag {
    font-size: 16px
}

.cf-tag-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .25)
}

.cf-tag-btn.active {
    background: #eef2ff;
    border-color: #c7d2fe;
    box-shadow: 0 10px 24px -12px rgba(99, 102, 241, .45)
}

.cf-tag-btn[data-val="USA"] {
    border-color: #ff7575
}

.cf-tag-btn[data-val="United Kingdom"] {
    border-color: #9bbcff
}

.cf-tag-btn[data-val="Canada"] {
    border-color: #ffa3a3
}

.cf-tag-btn[data-val="Australia"] {
    border-color: #ffd38c
}

.cf-tag-btn[data-val="Germany"] {
    border-color: #ffc36e
}

.cf-tag-btn[data-val="France"] {
    border-color: #b3a3ff
}

.cf-tag-btn[data-val="Netherlands"] {
    border-color: #ffb380
}

.cf-tag-btn[data-val="Singapore"] {
    border-color: #ffa8c2
}

.cf-tag-btn[data-val="Japan"] {
    border-color: #ffb0b0
}

.cf-tag-btn[data-val="China"] {
    border-color: #ffc0a6
}

.cf-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px
}

.cf-btn {
    background: linear-gradient(90deg, #6d28d9, #8b5cf6, #ec4899);
    background-size: 200% 100%;
    background-position: 0% 50%;
    color: #fff;
    font-weight: 800;
    border: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
    letter-spacing: .2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: .25s;
    box-shadow: 0 14px 32px -12px rgba(109, 40, 217, .45)
}

.cf-btn .arrow {
    transition: transform .25s ease
}

.cf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px -12px rgba(99, 102, 241, .55);
    background-position: 100% 50%
}

.cf-btn:hover .arrow {
    transform: translateX(4px)
}

.cf-btn.secondary {
    background: #f3f4f6;
    box-shadow: none;
    color: #111827
}

.cf-btn.secondary:hover {
    background: #e5e7eb
}

.cf-skip {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 6px 8px
}

.cf-close {
    position: absolute;
    top: 22px;
    right: 28px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 22px;
    cursor: pointer
}

@keyframes cfSlideInRight {
    from {
        opacity: 0;
        transform: translateX(38px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes cfSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-38px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes cfOrb {
    0% {
        transform: translate(0, 0) scale(1)
    }

    50% {
        transform: translate(-6px, 4px) scale(1.08)
    }

    100% {
        transform: translate(-12px, 10px) scale(1.02)
    }
}

.enter-right {
    animation: cfSlideInRight .35s ease both
}

.enter-left {
    animation: cfSlideInLeft .35s ease both
}

@media (prefers-reduced-motion: reduce) {

    .enter-right,
    .enter-left {
        animation-duration: .01ms;
        animation-iteration-count: 1
    }
}

@media(max-width:980px) {
    .cf-layout {
        grid-template-columns: 1fr
    }

    .cf-illustration {
        display: none
    }
}

@media(max-width:620px) {
    .cf-card {
        padding: 30px 26px;
        border-radius: 22px
    }

    .cf-title {
        font-size: 24px
    }

    .cf-fields {
        grid-template-columns: 1fr
    }
}