/* Breadcrumb */
    .breadcrumb-section {background: #f8fafc;border-bottom: 1px solid #e2e8f0;}
    .breadcrumb-section .breadcrumb-item a {color: #4b5563;text-decoration: none;font-weight: 500;}
    .breadcrumb-section .breadcrumb-item a:hover {color: #4172ff;}
    .breadcrumb-section .breadcrumb-item.active {color: #1f2937;font-weight: 600;}
    /* Header Section */
    .page-header {padding-top: 2rem;position: relative;overflow: hidden;}
    .page-header::before {content: '';position: absolute;top: 0;left: 0;right: 0;bottom: 0;background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");pointer-events: none;}
    .page-header h1 {font-weight: 800;font-size: 2rem;margin-bottom: 0;position: relative;z-index: 1;text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);}
    .page-header p {position: relative;z-index: 1;}
    /* Introduction */
    .intro-section p {color: #374151;line-height: 1.8;font-size: 1rem;}
    /* Search Section */
    .search-section {margin-top: 0rem;margin-bottom: 0rem;position: relative;z-index: 10;}
    .search-toggle-btn {background: linear-gradient(135deg, #4172ff 0%, #4338ca 100%);border: none;box-shadow: 0 4px 15px rgba(65, 114, 255, 0.3);transition: all 0.3s ease;}
    .search-toggle-btn:hover {transform: translateY(-2px);box-shadow: 0 6px 20px rgba(65, 114, 255, 0.4);background: linear-gradient(135deg, #3562ef 0%, #3730a3 100%);}
    .search-hint-card {background: #ffffff;border-radius: 12px;border-left: 4px solid #4172ff;box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);transition: all 0.2s ease;cursor: pointer;}
    .search-hint-card:hover {transform: translateY(-2px);box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);}
    .search-hint-card .text-primary {color: #4172ff !important;}
    .search-hint-card .text-success {color: #059669 !important;}
    .search-hint-card .text-info {color: #0891b2 !important;}
    .search-form-container {background: #ffffff;border-radius: 16px;box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);}
    .form-select {border: 2px solid #e5e7eb;border-radius: 10px;font-weight: 500;color: #374151;transition: all 0.2s ease;}
    .form-select:focus {border-color: #4172ff;box-shadow: 0 0 0 3px rgba(65, 114, 255, 0.15);}
    .form-floating>label {color: #6b7280;font-weight: 500;}
    .search-submit-btn {background: linear-gradient(135deg, #4172ff 0%, #4338ca 100%);border: none;font-weight: 600;transition: all 0.3s ease;}
    .search-submit-btn:hover {transform: translateY(-2px);box-shadow: 0 4px 15px rgba(65, 114, 255, 0.4);}
    .search-badges .badge {font-weight: 500;padding: 0.5rem 1rem;}
    /* University Card */
    .university-card {position: relative;background: #ffffff;border-radius: 16px;box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);border: 1px solid #f1f5f9;transition: all 0.3s ease;overflow: hidden;}
    /* Rank number badge (top-left corner) */
    .uni-rank-no {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        min-width: 2.75rem;
        height: 2.75rem;
        padding: 0 0.4rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        font-weight: 800;
        line-height: 1;
        color: #ffffff;
        background: linear-gradient(135deg, #4172ff 0%, #4338ca 100%);
        border-bottom-right-radius: 16px;
        box-shadow: 0 4px 10px rgba(65, 114, 255, 0.3);
        letter-spacing: 0.5px;
    }
    .university-card:hover .uni-rank-no {background: linear-gradient(135deg, #4338ca 0%, #4172ff 100%);}
    /* Keep the centered name clear of the corner rank badge at all widths */
    .university-name-header {padding-left: 2rem;}
    @media (max-width: 575.98px) {
        .uni-rank-no {min-width: 2.25rem;height: 2.25rem;font-size: 1rem;}
    }
    .university-card:hover {transform: translateY(-4px);box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);border-color: #e2e8f0;}
    .university-card .card-body {padding: 1.5rem;}
    /* University Name */
    .university-name-header h2 {font-size: 1.25rem;font-weight: 700;margin: 0;color: #111827;}
    .university-name-header h2 a {color: inherit;text-decoration: none;transition: color 0.2s ease;}
    .university-name-header h2 a:hover {color: #4172ff;}
    .university-name-header .badge {background: linear-gradient(135deg, #4172ff 0%, #4338ca 100%);font-weight: 700;font-size: 0.85rem;padding: 0.5rem 0.75rem;}
    .university-logo {width: 50px;height: 50px;object-fit: contain;border-radius: 10px;border: 2px solid #e5e7eb;background: #f9fafb;padding: 4px;}
    .university-logo-placeholder {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #e5e7eb;
    }

    .university-logo-placeholder i {
        color: #4172ff;
        font-size: 1.5rem;
    }

    /* Rankings Section */
    .rankings-section h3 {
        font-size: 0.85rem!important;
        font-weight: 600!important;
        color: #5d5d5d !important;
        letter-spacing: 0.5px!important;
        border-bottom: 1px solid #efeeee !important;
    }

    .ranking-area {
        background-color: #F8FAFC;
        border-radius: 10px;
        color: #4b5563;
        font-weight: 500;
        font-size: 0.875rem;
        box-shadow: 0 0 5px 0 #cccccc;
    }

    .ranking-badge {
        font-size: 0.8rem;
        font-weight: 600;
        padding: 0.5rem 0rem;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: transform 0.2s ease;
        width: 150px;
    }

    .ranking-badge:hover {
        transform: scale(1.05);
    }


    /* Info Section */
    .info-section h3 {
        font-size: 0.85rem!important;
        font-weight: 600!important;
        color: #5d5d5d !important;
        letter-spacing: 0.5px!important;
        border-bottom: 1px solid #efeeee !important;
    }

    .info-item {
        display: flex;
        align-items: center;
        color: #4b5563;
        font-weight: 500;
        font-size: 0.875rem;
    }

    .info-item .icon-wrapper {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 0.75rem;
    }


    /* Stats Cards */
    .stat-card {
        background: #f8fafc;
        border-radius: 10px;
        padding: 0.5rem;
        height: 100%;
        box-shadow: 0 0 3px 0 #cccccc;
    }

    .stat-card .icon-wrapper {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }


    .stat-card small {
        color: #6b7280;
        font-size: 0.75rem;
        letter-spacing: 0.3px;
    }

    .stat-card .stat-value {
        font-weight: 700;
        color: #1f2937;
        font-size: 0.95rem;
    }

    /* Excerpt */
    .university-excerpt {
        color: #4b5563;
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Action Buttons */
    .btn-view-details {
        background: linear-gradient(135deg, #4172ff 0%, #4338ca 100%);
        border: none;
        color: #ffffff;
        font-weight: 400;
        font-size: 0.8rem;
        padding: 0.5rem 0.45rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .btn-view-details:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(65, 114, 255, 0.4);
        color: #ffffff;
    }

    .btn-visit-website {
        background: transparent;
        border: 2px solid #e5e7eb;
        color: #4b5563;
        font-weight: 400;
        border-radius: 8px;
        transition: all 0.2s ease;
        font-size: 0.8rem;
        padding: 0.5rem 0.45rem;
    }

    .btn-visit-website:hover {
        border-color: #4172ff;
        color: #4172ff;
        background: rgba(65, 114, 255, 0.05);
    }

    /* Empty State */
    .empty-state-icon {
        width: 100px;
        height: 100px;
        background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .empty-state-icon i {
        font-size: 2.5rem;
        color: #4172ff;
    }

    /* Layout Settings */
    @media (min-width: 992px) {
        .col-main-65 {
            flex: 0 0 65%;
            max-width: 65%;
        }

        .col-aside-35 {
            flex: 0 0 35%;
            max-width: 35%;
        }
    }

/* ----- Related locations (geo drill-down) ----- */
.related-locations {
    margin: 0rem 0 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e9ecf3;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 25, 140, 0.05);
}

.related-locations-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #eef0f6;
}

.related-locations-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #00198c, #3a0ca3);
}

.related-locations-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.related-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
}

.related-locations-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2b2d42;
    text-decoration: none;
    background: #f7f8fc;
    border: 1px solid #e9ecf3;
    border-radius: 10px;
    transition: all 0.18s ease;
}

.related-locations-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-locations-pill i {
    font-size: 0.7rem;
    color: #9aa2b8;
    transition: transform 0.18s ease, color 0.18s ease;
}

.related-locations-pill:hover {
    color: #fff;
    background: linear-gradient(135deg, #00198c, #3a0ca3);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(58, 12, 163, 0.25);
    transform: translateY(-2px);
}

.related-locations-pill:hover i {
    color: #fff;
    transform: translateX(3px);
}

/* Roll-up (child -> parent) links: no card, pills sized to their full text. */
.related-rollup {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 2rem;
}

.related-rollup-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #00198c;
    text-decoration: none;
    background: #eef1fb;
    border: 1px solid #d7dcf3;
    border-radius: 999px;
    transition: all 0.18s ease;
    box-shadow: 0 0 8px 0 #e0e0e0;
}

.related-rollup-pill i {
    font-size: 0.7rem;
    color: #3a0ca3;
    transition: transform 0.18s ease, color 0.18s ease;
}

.related-rollup-pill:hover {
    color: #fff;
    background: linear-gradient(135deg, #00198c, #3a0ca3);
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(58, 12, 163, 0.25);
    transform: translateY(-2px);
}

.related-rollup-pill:hover i {
    color: #fff;
    transform: translateX(3px);
}

@media (max-width: 575.98px) {
    .related-locations {
        padding: 1.1rem;
    }
    .related-locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 370px) {
        .ranking-area {
            padding: 6px;
        }
}
