:root {
    --red: #c8102e;
    --red-dark: #9e0c24;
    --gold: #e8a020;
    --gold-light: #f5c96a;
    --bg: #f7f4ef;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --muted: #666;
    --border: #e8e2d9;
    --shadow: 0 4px 24px rgba(0,0,0,0.09);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.16);
}


/* ── RESULTS COUNT ── */
.results-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 0;
    font-size: 13px;
    color: var(--muted);
}
.results-bar strong {
    color: var(--text);
}

/* ── GRID ── */
.universities-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 64px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
}

/* ── CARD ── */
.uni-card {
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s, opacity 0.3s;
}
.uni-card:hover {
    /* transform: translateY(-5px); */
    box-shadow: var(--shadow-hover);
}
.uni-card.hidden {
    display: none;
}

/* card image */
.card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.uni-card:hover .card-img img {
    transform: scale(1.05);
}
.card-rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(26,10,16,0.85);
    backdrop-filter: blur(6px);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.card-rank-badge .rank-num {
    font-size: 13px;
    font-weight: 700;
}
.card-country-flag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #fff;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* card body */
.card-body {
    padding: 18px 20px 0;
    flex: 1;
}
.card-number {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.card-title {
    font-family: 'GT Walsheim Pro';
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text);
}

/* stats grid */
.card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.stat-item {
    background: #eff5f7;
    border-radius: 8px;
    padding: 10px 12px;
}
.stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}
.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.stat-value.fee {
    color: var(--red-dark);
}
.stat-value.students {
    color: #1a6e3c;
}

/* living costs */
.living-costs {
    border-top: 1px dashed var(--border);
    padding: 12px 0 0px;
    display: flex;
    gap: 16px;
}
.cost-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--muted);
}
.cost-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.cost-icon.accom {
    background: #edf2ff;
}
.cost-icon.food  {
    background: #fff5e6;
}
.cost-item span strong {
    color: var(--text);
    font-weight: 600;
    display: block;
    font-size: 13px;
}

/* CTA */
.card-cta {
    padding: 5px 20px 18px;
    display: flex;
    gap: 10px;
}
.btn-apply {
    flex: 1;
    background: #0d6efd;
    color: #fff;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-apply:hover {
    background: green;
    transform: scale(1.02);
}
.btn-details {
    flex: 1;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-details:hover {
    border-color: var(--red);
    color: var(--red);
}

/* empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: var(--muted);
    font-size: 15px;
    display: none;
}
.empty-state.show {
    display: block;
}

@media (max-width: 600px) {
    .universities-grid {
        padding: 16px 12px 48px;
        gap: 16px;
    }
    .filter-bar {
        gap: 8px;
    }
}


/*CUSTOM POPUP*/
/* OVERLAY */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* FORM BOX */
.popup-form {
    background: #fff;
    width: 92%;
    max-width: 520px;
    padding: 30px;
    border-radius: 14px;
    position: relative;
    animation: popupFade 0.35s ease;
}

/* HEADER */
.popup-header h4 {
    margin-bottom: 5px;
}

.popup-header p {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
}

/* CLOSE */
.popup-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

/* ROW */
.form-row {
    display: flex;
    gap: 10px;
}

/* GROUP */
.form-group {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
}

/* INPUT */
.form-group input {
    width: 100%;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    background: transparent;
}

/* FLOAT LABEL */
.form-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 13px;
    color: #777;
    background: #fff;
    padding: 0 5px;
    transition: 0.2s;
    pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label {
    top: -8px;
    font-size: 11px;
    color: #007bff;
}

/* SELECTED COLLEGE */
.selected-college {
    background: #f1f6ff;
    border: 1px dashed #007bff;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

/* BUTTON */
.submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s;
}

.submit-btn:hover {
    background: #0056b3;
}

/* ANIMATION */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* MOBILE */
@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
    }
}

/* Section spacing */
.edu-region-section {
    padding: 60px 0;
}

/* Card base */
.edu-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
}

/* Hover effect */
.edu-card:hover {
    /* transform: translateY(-10px); */
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Image */
.edu-card__img {
    position: relative;
    height: 230px;
    overflow: hidden;
}

.edu-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.edu-card:hover .edu-card__img img {
    transform: scale(1.1);
}

/* Gradient overlay */
.edu-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

/* Body */
.edu-card__body {
    padding: 25px;
    background: #fff;
}

/* Title */
.edu-card__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.edu-card__title a {
    color: #111;
    text-decoration: none;
}

.edu-card__title a:hover {
    color: #0d6efd;
}

/* Description */
.edu-card__desc {
    font-size: 14.5px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 18px;
}

/* Button */
.edu-card__btn {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #0d6efd;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.edu-card__btn::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: -4px;
    background: #0d6efd;
    transition: 0.3s;
}

.edu-card__btn:hover::after {
    width: 100%;
}

.edu-card__btn:hover {
    letter-spacing: 0.5px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .edu-card__img {
        height: 200px;
    }
}

/*College Listing*/
/* Section */
.college-section {
    padding: 70px 0;
    background: #f8fafc;
}

/* Header */
.college-header {
    text-align: center;
    margin-bottom: 40px;
}

.college-header h2 {
    font-size: 32px;
    font-weight: 700;
}

.college-header p {
    color: #666;
}

/* Grid */
.college-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* Card */
.college-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.4s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;
    height: 100%; /* ensures equal height */
}

.college-card:hover {
    /* transform: translateY(-8px); */
    box-shadow: 0 10px 25px rgb(0 0 0 / 17%);
}

/* Image */
.college-img {
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

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

/* Body */
.college-body {
    padding: 18px;

    display: flex;
    flex-direction: column;
    flex-grow: 1; /* fills space */
}

/* Title */
.college-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 42px; /* keeps alignment for long/short names */
}

/* Place */
.college-body span {
    font-size: 13px;
    color: #777;
    /* margin-bottom: 12px; */
}

/* Push button to bottom */
.enquire-btn {
    margin-top: auto; /* KEY FIX */
    display: inline-block;
    padding: 10px 14px;
    font-size: 13px;
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.3s;
    text-align: center;
    width: 100%;
}

.enquire-btn:hover {
    background: #0b5ed7;
}

/* Modal */
.enquiry-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* Show modal */
.enquiry-modal.active {
    display: flex;
}

/* Modal Box */
.enquiry-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* Close */
.close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
}

/* Form */
.form-group {
    margin-bottom: 12px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

/* Submit */
.submit-btn {
    width: 100%;
    padding: 10px;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Course List Section */
.medical-course-list {
    margin-top: 30px;
}

/* Title */
.course-list-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}
.course-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fill); */
    gap: 10px;
}

.course-item {
    position: relative;
    padding: 14px 16px 14px 42px;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e2a3a;
    white-space: nowrap;
    overflow: hidden;
    /* text-overflow: ellipsis; */
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.course-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #2563eb;
    border-radius: 6px 0 0 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.course-item::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.course-item:hover {
    border-color: #bfcfee;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.course-item:hover::before { opacity: 1; }
.course-item:hover::after  { background: #2563eb; }

/* Form */
.sidebar-form .form-group {
    margin-bottom: 12px;
}

.sidebar-form input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
    background: white;
}

/* Button */
.sidebar-btn {
    width: 100%;
    padding: 10px;
    border: none;
    background: #0d6efd;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.sidebar-btn:hover {
    background: #0b5ed7;
}

.sidebar__enquiry {
    background: #f1f3f3;
    padding: 30px;
    border-radius: 10px;
}