/* Color Palette Variables (New) */
:root {
    --primary-blue: #4285F4;
    --dark-blue: #3367D6;
    --light-blue: #e8f0fe;
    --accent-green: #28a745;
    --dark-green: #218838;
    --accent-red: #dc3545;
    --text-dark: #212529;
    --text-medium: #5f6368;
    --text-light: #70757a;
    --border-light: #e0e0e0;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --shadow-strong: rgba(0, 0, 0, 0.2);
}

/* General Body Fix for Overflow */
html, body {
    width: 100%;
    overflow-x: hidden;
}


/* Main Container and General Layout */
.admission-mall-display-container {
    font-family: 'Inter', sans-serif; /* Primary font */
    width: 100%;
    max-width: 1400px; /* Set a max-width for larger screens */
    margin: 0 auto; /* Center the container */
    box-sizing: border-box;
    padding: 20px;
}
.admission-mall-display-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue) 90%); /* Subtle gradient */
    color: var(--white);
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow-light);
}
.admission-mall-display-header h1 {
    color: var(--white); /* White for header text */
    font-size: 48px; /* Larger heading */
    margin-bottom: 18px;
    font-weight: 800; /* Extra bold */
    letter-spacing: -0.03em; /* Tighter letter spacing for impact */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3); /* Text shadow for readability */
}
.admission-mall-display-header p {
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 300; /* Lighter weight for body text */
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

/* Filters Section */
.admission-mall-filters {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 18px var(--shadow-light);
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-end;
    border: 1px solid var(--border-light);
    position: relative; /* For active filter indication */
}
.admission-mall-filters .filter-group {
    flex: 1;
    min-width: 220px;
}
.admission-mall-filters label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600; /* Bolder labels */
    color: var(--text-dark);
    font-size: 16px;
}
.admission-mall-filters input[type="text"],
.admission-mall-filters select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23495057" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 40px;
}
.admission-mall-filters input[type="text"]:focus,
.admission-mall-filters select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}
.admission-mall-filters button {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.35);
    white-space: nowrap;
}
.admission-mall-filters button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.45);
}
.admission-mall-filters button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

/* Combined Apply/Clear Button Styles (Refined Iconography) */
.admission-mall-filters .combined-filter-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background-color: transparent;
    padding: 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: box-shadow 0.3s ease;
    box-shadow: none;
    overflow: hidden;
    border: 1px solid var(--border-light); /* Added border to the combined button */
}
.admission-mall-filters .combined-filter-button:hover {
    box-shadow: 0 4px 12px var(--shadow-light); /* Subtle shadow on hover for the whole button */
}

.admission-mall-filters .combined-filter-button .filter-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 12px 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: var(--white);
    font-size: 20px;
    line-height: 1;
}
.admission-mall-filters .combined-filter-button .filter-icon-wrapper svg {
    width: 24px;
    height: 24px;
    stroke: var(--white); /* Ensure SVG icons are white */
}

.admission-mall-filters .combined-filter-button .filter-icon-wrapper.apply-bg {
    background-color: var(--accent-green);
    border-top-left-radius: 9px; /* Slightly less than parent to ensure inner curve */
    border-bottom-left-radius: 9px;
}
.admission-mall-filters .combined-filter-button .filter-icon-wrapper.clear-bg {
    background-color: var(--accent-red);
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
}

.admission-mall-filters .combined-filter-button .filter-icon-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 1;
}
.admission-mall-filters .combined-filter-button .filter-icon-wrapper:active {
    transform: scale(1);
}

/* New: Specialization Filters Section */
.specialization-filters-container {
    background-color: var(--white);
    padding: 20px 30px; /* Adjusted padding */
    border-radius: 15px;
    box-shadow: 0 6px 18px var(--shadow-light);
    margin-bottom: 40px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease-in-out; /* Smooth show/hide */
}
.specialization-filters-container.hidden {
    opacity: 0;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
    visibility: hidden;
}
.specialization-filters-container .specialization-heading {
    font-size: 20px; /* Slightly smaller heading */
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light); /* Subtle separator */
    padding-bottom: 10px;
}
.specialization-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px; /* Vertical and horizontal gap */
}
.specialization-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.specialization-item input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 5px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.specialization-item input[type="checkbox"]:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.specialization-item input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
}
.specialization-item input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
}
.specialization-item label {
    font-size: 16px;
    color: var(--text-medium);
    cursor: pointer;
    margin-bottom: 0; /* Override default label margin */
    font-weight: normal; /* Reset font-weight from filter-group label */
}
.specialization-item:hover label {
    color: var(--primary-blue);
}
.no-specializations {
    font-style: italic;
    color: var(--text-light);
    text-align: center;
    width: 100%;
    padding: 10px 0;
}


/* College Grid Styles */
#college_list_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    min-height: 350px;
    position: relative;
}
.college-card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--shadow-light);
    overflow: hidden;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out; /* Smooth transition for animations */
    cursor: default;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-light); /* Subtle border */
    opacity: 0; /* Initially hidden for animation */
    transform: translateY(20px); /* Start slightly below */
}

/* Animation initial states */
.college-card.slide-from-left {
    transform: translateX(-50px); /* Start off-screen to the left */
}
.college-card.slide-from-right {
    transform: translateX(50px); /* Start off-screen to the right */
}

/* Animation active state (when visible) */
.college-card.is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0); /* Final position */
}


.college-card:hover {
    transform: translateY(-5px); /* More pronounced lift */
    box-shadow: 0 12px 25px var(--shadow-medium); /* Stronger shadow on hover */
    background-color: var(--background-light); /* Subtle background change on hover */
}
.college-card-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.college-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.college-card-logo-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.college-card-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.college-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.college-card-content h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: capitalize;
}
.college-card-content p {
    font-size: 15px;
    color: var(--text-medium);
    margin-bottom: 10px;
    line-height: 1.6;
}
.college-card-content p strong {
    color: var(--text-dark);
    font-weight: 600;
}
.college-card-location {
    font-size: 14px;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.college-card .card-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.college-card .view-more-btn,
.college-card .apply-now-btn-card {
    align-self: auto;
    margin-top: 0;
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.college-card .view-more-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.35);
}
.college-card .view-more-btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.45);
}
.college-card .view-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.college-card .apply-now-btn-card {
    background-color: var(--accent-green);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.35);
}
.college-card .apply-now-btn-card:hover {
    background-color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.45);
}
.college-card .apply-now-btn-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}


/* Skeleton Loader Styles (with Shimmer effect) */
.college-card.skeleton {
    background-color: #f0f0f0;
    animation: none; /* Remove pulse animation for shimmer */
    pointer-events: none;
    position: relative; /* Needed for shimmer overlay */
    overflow: hidden; /* Ensure shimmer doesn't go outside */
    opacity: 1; /* Skeletons should be visible */
    transform: none; /* Skeletons don't animate in */
}
.college-card.skeleton::after { /* Shimmer overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 20%, rgba(255,255,255,0.5) 60%, rgba(255,255,255,0));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.college-card.skeleton .shimmer {
    background-color: #e0e0e0; /* Base color for shimmer elements */
    border-radius: 4px;
    height: 18px; /* Default height for shimmer lines */
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}
.college-card.skeleton .college-card-image-wrapper {
    background-color: #d0d0d0; /* Darker background for image shimmer */
}
.college-card.skeleton .college-card-image {
    background-color: #e0e0e0; /* Shimmer for image area */
    visibility: visible; /* Make shimmer visible */
}
.college-card.skeleton .college-card-logo-overlay {
    background-color: #c0c0c0;
    box-shadow: none;
}
.college-card.skeleton .college-card-logo {
    visibility: visible; /* Make shimmer visible */
    background-color: #d0d0d0;
    border-radius: 50%; /* Make logo shimmer circular */
    width: 100%;
    height: 100%;
}
.college-card.skeleton h3.shimmer {
    height: 24px;
    width: 80%;
}
.college-card.skeleton p.shimmer {
    height: 18px;
    width: 90%;
}
.college-card.skeleton p.shimmer:nth-of-type(2) {
    width: 70%;
}
.college-card.skeleton .college-card-location.shimmer {
    height: 18px;
    width: 60%;
    margin-top: 15px;
}
.college-card.skeleton .view-more-btn.shimmer,
.college-card.skeleton .apply-now-btn-card.shimmer {
    background-color: #d0d0d0;
    height: 40px;
    width: 120px;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


/* College Detail Page Styles */
#college_detail_view {
    display: none;
}
#college_detail_view .back-button {
    background-color: var(--text-medium);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 100;
}
#college_detail_view .back-button:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(108, 117, 125, 0.4);
}
#college_detail_view .back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.detail-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    /* Removed ::before overlay as it's now part of background-image linear-gradient */
}
.detail-header > * {
    position: relative;
    z-index: 2;
}
.detail-header img.college-logo {
    max-width: 180px;
    max-height: 120px;
    margin-bottom: 20px;
    object-fit: contain;
    background-color: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.detail-header h1 {
    font-size: 48px; /* Larger heading */
    margin-bottom: 15px;
    font-weight: 800; /* Extra bold */
    letter-spacing: -0.03em;
}
.detail-header p {
    font-size: 20px;
    font-weight: 300;
}
.detail-section {
    margin-bottom: 35px;
    padding: 25px; /* Increased padding */
    background-color: var(--white);
    border-radius: 15px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); /* Lighter shadow for sections */
}
.detail-section h3 {
    font-size: 32px; /* Larger heading */
    color: var(--primary-blue); /* Blue accent for headings */
    margin-bottom: 20px;
    border-left: 6px solid var(--primary-blue); /* Thicker accent border */
    padding-left: 20px; /* More space for accent border */
    font-weight: 700;
    letter-spacing: -0.01em;
}
.detail-section p, .detail-section ul {
    font-size: 17px;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 12px;
}
.detail-section ul {
    list-style: none; /* Remove default list style */
    margin-left: 0;
    padding-left: 0;
}
.detail-section ul li {
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex; /* For icon alignment */
    align-items: center;
}
.detail-section ul li::before { /* Custom list item bullet */
    content: '•'; /* Unicode bullet */
    color: var(--primary-blue);
    font-size: 1.2em;
    margin-right: 10px;
    font-weight: bold;
}
.detail-section ul li:hover {
    background-color: var(--light-blue);
}
.detail-contact-info a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
.detail-contact-info a:hover {
    text-decoration: underline;
}

/* New: Key Information Grid Layout */
.key-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 20px;
    margin-top: 15px;
}
.key-info-grid > div {
    background-color: var(--background-light);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.5;
}
.key-info-grid strong {
    color: var(--primary-blue);
    font-weight: 700;
    display: block; /* Make label block for better separation */
    margin-bottom: 5px;
}


/* Course List in Detail Page */
.course-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.course-search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}

.course-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    border-radius: 10px;
    overflow: hidden;
}
.course-list-table th, .course-list-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    color: var(--text-dark);
}
.course-list-table th {
    background-color: var(--light-blue);
    font-weight: 600;
    text-transform: uppercase;
    position: sticky; /* Sticky header */
    top: 0; /* Stick to the top of its scrolling container */
    z-index: 10; /* Ensure it stays above content when scrolling */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow for sticky effect */
}
.course-list-table tbody tr:nth-child(odd) {
    background-color: var(--white);
}
.course-list-table tbody tr:last-child td {
    border-bottom: none;
}
.course-list-table tbody tr:hover {
    background-color: #f0f8ff; /* Lighter blue on hover */
}
.course-list-table .no-courses {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    padding: 30px;
    font-size: 17px;
}
.course-list-table .more-details-btn,
.course-list-table .apply-now-btn-course-table {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.course-list-table .more-details-btn {
    background-color: var(--primary-blue);
    color: var(--white);
}
.course-list-table .more-details-btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.4);
}
.course-list-table .more-details-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(66, 133, 244, 0.2);
}

.course-list-table .apply-now-btn-course-table {
    background-color: var(--accent-green);
    color: var(--white);
    margin-left: 10px;
}
.course-list-table .apply-now-btn-course-table:hover {
    background-color: var(--dark-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}
.course-list-table .apply-now-btn-course-table:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(40, 167, 69, 0.2);
}

.course-list-table .course-table-buttons-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-section .apply-now-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.35);
    margin-top: 25px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}
.detail-section .apply-now-btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.45);
}
.detail-section .apply-now-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}


/* SweetAlert2 Course Modal Custom Styles */
.course-details-modal-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 30px var(--shadow-strong) !important;
}
.course-details-modal-title {
    color: var(--text-dark) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    border-bottom: 0.5px solid var(--border-light) !important;
    padding-bottom: 10px;
}
.course-details-modal-html-container {
    text-align: left !important;
    padding: 0 20px 20px !important;
    color: var(--text-medium) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    max-height: 460px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d1d1 transparent;
}
.course-details-modal-html-container::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}
.course-details-modal-html-container::-webkit-scrollbar-track {
    background: transparent;
}
.course-details-modal-html-container::-webkit-scrollbar-thumb {
    background-color: #d1d1d1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.course-details-modal-html-container::-webkit-scrollbar-button {
    display: none;
}
.course-details-modal-html-container h3 {
    font-size: 21px !important;
    color: var(--primary-blue) !important; /* Blue for sub-headings in modal */
    margin-bottom: 12px !important;
    font-family: 'Inter', sans-serif; /* Keep Inter for consistency */
    border-bottom: 1px dashed var(--border-light);
    padding-bottom: 6px;
    font-weight: 600;
}
.course-details-modal-html-container p {
    margin-bottom: 8px !important;
    font-size: 15px;
    color: var(--text-dark);
    background-color: var(--background-light);
    padding: 6px 10px;
    border-left: 4px solid var(--primary-blue); /* Blue accent for paragraphs */
    border-radius: 4px;
}
.course-details-modal-html-container strong {
    color: var(--dark-blue) !important; /* Darker blue for strong text */
    font-weight: bold;
}


/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95); /* Slightly less transparent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 16px;
    font-size: 24px; /* Larger text */
    color: var(--primary-blue); /* Blue text */
    font-weight: 600;
    text-align: center;
    transition: opacity 0.3s ease;
}
.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary-blue);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.no-colleges-found {
    text-align: center;
    color: var(--text-medium);
    font-size: 20px;
    padding: 60px 0;
    grid-column: 1 / -1;
}
.admission-mall-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 12px;
    flex-wrap: wrap;
}
.admission-mall-pagination button {
    background-color: var(--background-light);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.admission-mall-pagination button:hover:not(:disabled) {
    background-color: var(--light-blue);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.2);
}
.admission-mall-pagination button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}
.admission-mall-pagination button.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.3);
}

/* Back to Top Button */
#back_to_top_btn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
    z-index: 99;
}
#back_to_top_btn:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
#back_to_top_btn.show {
    display: block;
    opacity: 1;
}
#back_to_top_btn.hide {
    opacity: 0;
}


/* TomSelect Custom Styles to match theme */
.ts-wrapper {
    width: 100%;
    font-size: 16px;
}

.ts-control {
    height: 44px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 0 15px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
    display: flex;
    align-items: center;
}

.ts-control.focus,
.ts-control.TomSelect-is-open {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3), 0 2px 8px rgba(0,0,0,0.1);
    outline: none;
}

.ts-control .ts-input {
    padding: 0;
    line-height: 44px;
    flex-grow: 1;
    color: var(--text-dark);
    padding-right: 30px;
}

.ts-control .ts-caret {
    border-color: var(--text-medium) transparent transparent transparent;
    border-width: 6px 4px 0 4px;
    margin-top: 0;
    transform: translateY(-50%);
    right: 15px;
    top: 50%;
    z-index: 3;
}

.ts-dropdown {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 6px 18px var(--shadow-light);
    overflow: hidden;
    margin-top: 5px;
}

.ts-dropdown .dropdown-input {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 15px;
    box-sizing: border-box;
    width: calc(100% - 10px);
    margin: 5px; /* Added margin for input within dropdown */
}
.ts-dropdown .dropdown-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.ts-dropdown .ts-results .ts-option {
    padding: 10px 20px;
    font-size: 16px;
    color: var(--text-dark);
}
.ts-dropdown .ts-results .ts-option.highlight {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}
.ts-dropdown .ts-results .ts-option.selected {
    background-color: #f0f8ff;
    color: var(--text-dark);
}

.ts-control .ts-clear {
    display: none !important;
}


/* Responsive adjustments */
@media (max-width: 992px) { /* Tablet adjustments */
    .admission-mall-display-container {
        padding: 20px;
    }
    .admission-mall-display-header h1 {
        font-size: 36px; /* Slightly reduced for tablet */
    }
    .admission-mall-display-header p {
        font-size: 17px; /* Slightly reduced for tablet */
    }
    .admission-mall-filters {
        padding: 18px; /* Reduced padding */
        gap: 12px; /* Reduced gap */
    }
    .admission-mall-filters input[type="text"],
    .admission-mall-filters select {
        padding: 10px 12px; /* Reduced padding */
        font-size: 15px; /* Reduced font size */
    }
    .admission-mall-filters button {
        padding: 10px 20px; /* Reduced padding */
        font-size: 16px; /* Reduced font size */
    }
    .admission-mall-filters .combined-filter-button .filter-icon-wrapper {
        padding: 10px 0; /* Reduced padding */
    }
    #college_list_grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
        gap: 18px; /* Reduced gap */
    }
    .college-card-image-wrapper {
        height: 160px; /* Reduced image height */
    }
    .college-card-content {
        padding: 15px; /* Reduced padding */
    }
    .college-card-content h3 {
        font-size: 18px; /* Reduced font size */
    }
    .college-card-content p {
        font-size: 13px; /* Reduced font size */
    }
    .college-card .view-more-btn,
    .college-card .apply-now-btn-card {
        padding: 8px 15px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
    }
    .detail-header {
        height: 380px; /* Adjusted header height */
    }
    .detail-header h1 {
        font-size: 34px; /* Reduced font size */
    }
    .detail-header p {
        font-size: 16px; /* Reduced font size */
    }
    .detail-header img.college-logo {
        max-width: 140px; /* Reduced logo size */
        max-height: 90px;
    }
    .detail-section {
        padding: 15px; /* Adjusted padding */
    }
    .detail-section h3 {
        font-size: 26px; /* Reduced font size */
        padding-left: 15px; /* Adjusted padding */
        border-left-width: 5px; /* Adjusted border width */
    }
    .detail-section p, .detail-section ul {
        font-size: 16px; /* Reduced font size */
    }
    .key-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Adjusted min-width */
        gap: 15px;
    }
    .key-info-grid > div {
        padding: 12px; /* Reduced padding */
        font-size: 15px; /* Reduced font size */
    }
    .course-list-table th, .course-list-table td {
        padding: 10px 12px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
    }
    .course-list-table .more-details-btn,
    .course-list-table .apply-now-btn-course-table {
        padding: 6px 10px; /* Reduced padding */
        font-size: 12px; /* Reduced font size */
    }
    #college_detail_view .back-button {
        bottom: 15px; /* Closer to bottom */
        left: 15px; /* Closer to left */
        padding: 8px 18px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
    }
    .ts-control {
        height: 38px; /* Reduced height */
        padding: 0 10px;
    }
    .ts-control .ts-input {
        line-height: 38px;
        padding-right: 15px;
    }
    .ts-control .ts-caret {
        right: 5px;
    }
}

@media (max-width: 768px) { /* Mobile adjustments */
    .admission-mall-display-container {
        padding: 10px; /* Further reduced padding */
        /* margin: 15px auto; <-- Removed this to rely on padding */
    }
    .admission-mall-display-header h1 {
        font-size: 28px; /* Further reduced font size */
        margin-bottom: 10px;
    }
    .admission-mall-display-header p {
        font-size: 15px; /* Further reduced font size */
        margin-bottom: 20px;
    }
    .admission-mall-filters {
        padding: 12px; /* Further reduced padding */
        gap: 10px; /* Further reduced gap */
    }
    .admission-mall-filters label {
        font-size: 14px; /* Reduced label font size */
        margin-bottom: 8px;
    }
    .admission-mall-filters input[type="text"],
    .admission-mall-filters select {
        padding: 8px 10px; /* Further reduced padding */
        font-size: 14px; /* Further reduced font size */
    }
    .admission-mall-filters button {
        padding: 8px 15px; /* Further reduced padding */
        font-size: 15px; /* Further reduced font size */
    }
    .admission-mall-filters .combined-filter-button .filter-icon-wrapper {
        padding: 8px 0; /* Further reduced padding */
        font-size: 18px; /* Slightly smaller icons */
    }
    .admission-mall-filters .combined-filter-button .filter-icon-wrapper svg {
        width: 20px; /* Smaller SVG icons */
        height: 20px;
    }
    #college_list_grid {
        grid-template-columns: 1fr; /* Mobile: 1 column */
        gap: 15px; /* Reduced gap */
    }
    .college-card-image-wrapper {
        height: 140px; /* Further reduced image height */
    }
    .college-card-logo-overlay {
        width: 60px; /* Smaller logo overlay */
        height: 60px;
        top: 10px;
        left: 10px;
        padding: 5px;
    }
    .college-card-content {
        padding: 12px; /* Further reduced padding */
    }
    .college-card-content h3 {
        font-size: 17px; /* Further reduced font size */
        margin-bottom: 8px;
    }
    .college-card-content p {
        font-size: 12px; /* Further reduced font size */
        margin-bottom: 6px;
    }
    .college-card-location {
        font-size: 12px; /* Further reduced font size */
        padding-top: 10px;
    }
    .college-card .card-buttons-row {
        gap: 5px; /* Reduced gap */
    }
    .college-card .view-more-btn,
    .college-card .apply-now-btn-card {
        padding: 6px 8px; /* Further reduced padding */
        font-size: 13px; /* Further reduced font size */
    }

    .detail-header h1 {
        font-size: 28px; /* Further reduced font size */
    }
    .detail-header p {
        font-size: 15px; /* Further reduced font size */
    }
    .detail-header {
        height: 320px; /* Further reduced height */
    }
    .detail-header img.college-logo {
        max-width: 120px; /* Further reduced logo size */
        max-height: 80px;
        top: 15px;
    }
    .detail-section {
        padding: 12px; /* Further reduced padding */
    }
    .detail-section h3 {
        font-size: 20px; /* Further reduced font size */
        padding-left: 12px; /* Further reduced padding */
        border-left-width: 4px; /* Further reduced border width */
    }
    .detail-section p, .detail-section ul {
        font-size: 13px; /* Further reduced font size */
    }
    .key-info-grid {
        gap: 10px; /* Reduced gap */
    }
    .key-info-grid > div {
        padding: 10px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
    }
    .key-info-grid strong {
        margin-bottom: 3px;
    }
    /* Responsive table for courses */
    .course-list-table,
    .course-list-table thead,
    .course-list-table tbody,
    .course-list-table th,
    .course-list-table td,
    .course-list-table tr {
        display: block;
    }
    .course-list-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    .course-list-table tr {
        border: 1px solid var(--border-light);
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
    }
    .course-list-table td {
        border: none;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 45%; /* Adjusted padding for pseudo-element label */
        text-align: right;
        font-size: 13px; /* Further reduced font size */
        min-height: 30px; /* Ensure cells have a minimum height */
        display: flex; /* Use flexbox for alignment */
        align-items: center;
        justify-content: flex-end;
    }
    .course-list-table td:last-child {
        border-bottom: none;
    }
    .course-list-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px; /* Adjusted position */
        width: 40%; /* Adjusted width */
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-dark);
        font-size: 13px; /* Further reduced font size */
    }
    .course-list-table .course-table-buttons-row {
        flex-direction: row;
        justify-content: flex-end; /* Align buttons to the right */
        gap: 5px;
        width: 100%;
    }
    .course-list-table .more-details-btn,
    .course-list-table .apply-now-btn-course-table {
        padding: 5px 7px; /* Further reduced padding */
        font-size: 11px; /* Further reduced font size */
        margin-left: 5px; /* Reduced margin */
    }

    .detail-section .apply-now-btn {
        padding: 8px 15px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
    }

    .course-details-modal-popup {
        width: 90% !important; /* Make modal wider on mobile */
        margin: 10px !important; /* Add some margin */
    }
    .course-details-modal-title {
        font-size: 24px !important; /* Reduced font size */
        padding-bottom: 8px;
    }
    .course-details-modal-html-container {
        padding: 0 15px 15px !important; /* Reduced padding */
        font-size: 14px !important;
    }
    .course-details-modal-html-container h3 {
        font-size: 18px !important; /* Reduced font size */
        margin-bottom: 8px !important;
    }
    .course-details-modal-html-container p {
        font-size: 13px; /* Reduced font size */
        padding: 5px 8px;
    }

    .loading-overlay {
        font-size: 20px; /* Reduced font size */
    }
    .loading-spinner {
        width: 50px; /* Smaller spinner */
        height: 50px;
    }
    .admission-mall-pagination button {
        padding: 8px 15px; /* Reduced padding */
        font-size: 14px; /* Reduced font size */
        gap: 8px;
    }
    #back_to_top_btn {
        width: 45px; /* Smaller button */
        height: 45px;
        font-size: 20px;
        line-height: 45px;
        bottom: 15px;
        right: 15px;
    }
    .ts-control {
        height: 36px; /* Further reduced height */
        padding: 0 8px;
    }
    .ts-control .ts-input {
        line-height: 36px;
        padding-right: 10px;
    }
    .ts-control .ts-caret {
        right: 5px;
    }
    .ts-dropdown .dropdown-input {
        padding: 6px 10px; /* Reduced padding */
        font-size: 14px;
    }
    .ts-dropdown .ts-results .ts-option {
        padding: 8px 15px; /* Reduced padding */
        font-size: 14px;
    }
}
/**
 * =================================================================
 * FAVORITES FEATURE - STYLES
 * =================================================================
 */

/* Favorite Icon Styles */
.favorite-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.favorite-icon:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 1);
}

.favorite-icon svg {
    width: 24px;
    height: 24px;
    fill: #ccc; /* Default empty heart color */
    stroke: #888; /* Border for the empty heart */
    stroke-width: 1.5;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.favorite-icon.is-favorite svg {
    fill: #e91e63; /* Filled heart color */
    stroke: #e91e63; /* Border color for filled heart */
}

/* Favorites Sorter Styles */
.admission-mall-sorter {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background-color: var(--background-light);
    padding: 8px;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.4s ease; /* Add transition for smooth appearance */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    height: auto;
    overflow: hidden;
}

/* New class to hide the sorter */
.admission-mall-sorter.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    height: 0;
}

.sorter-btn {
    padding: 10px 25px;
    border: none;
    background-color: transparent;
    color: var(--text-medium);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sorter-btn.active {
    background-color: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .favorite-icon {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    .favorite-icon svg {
        width: 20px;
        height: 20px;
    }
    .admission-mall-sorter {
        width: 100%;
    }
    .sorter-btn {
        flex-grow: 1;
        text-align: center;
    }
}
