
:root{
 --primary:#1e40af;
 --primary-dark:#16358c;
 --text:#1f2937;
 --muted:#6b7280;
 --border:#e5e7eb;
 --bg:#f6f8fc;
 --radius:18px;
 --v1:#eef6ff; --v2:#fff8e8; --v3:#eefcf1; --v4:#f8f2ff;
}

*{margin:0;padding:0;box-sizing:border-box}

body{
    font-family:Inter,sans-serif;
    color:var(--text);
    background:#f7f9fd;
    line-height:1.5;
}

.hidden{display:none}
.container{width:min(1240px,92%);margin:auto}

/* ---------- Landing Header ---------- */

.brand-header{
    background:#fff;
    border-bottom:1px solid var(--border);
    box-shadow:0 4px 18px rgba(0,0,0,.05);
}

.brand-container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 0;
}

.brand-logo{
    width:210px;
    height:auto;
    display:block;
}

.brand-right{
    text-align:right;
}

.brand-caption{
    display:block;
    color:var(--muted);
    font-size:.95rem;
    margin-bottom:6px;
}

.brand-link{
    color:var(--primary);
    text-decoration:none;
    font-weight:700;
    font-size:1.35rem;
}

.brand-link:hover{text-decoration:underline}

/* ---------- Hero ---------- */

.hero{
    position:relative;
    overflow:hidden;
    background:linear-gradient(180deg,#eef5ff,#ffffff);
    padding:70px 0 40px;
    text-align:center;
}

.hero-bg{
    position:absolute;
    width:520px;
    height:520px;
    border-radius:50%;
    background:rgba(30,64,175,.05);
    filter:blur(2px);
}

.hero-left{left:-260px;top:-120px}
.hero-right{right:-260px;top:-120px}

.hero h2{
    position:relative;
    z-index:2;
    font-size:3.4rem;
    font-weight:800;
    color:#102c67;
}

.hero p{
    position:relative;
    z-index:2;
    color:#56657f;
    font-size:1.25rem;
    margin:16px auto 26px;
}

.hero-divider{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin-bottom:50px;
    position:relative;
    z-index:2;
}

.hero-divider span{
    width:82px;
    height:2px;
    background:#2b67d8;
}

.divider-icon{
    color:#2b67d8;
    font-size:1.4rem;
}

/* ---------- Cards ---------- */

.vertical-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:28px;
    padding-bottom:50px;
    position:relative;
    z-index:2;
}

.vertical-card{
    border-radius:22px;
    padding:34px 28px;
    border:1px solid #d9e5fb;
    background:#fff;
    box-shadow:0 12px 32px rgba(20,40,80,.08);
    transition:.25s;
    cursor:pointer;
    min-height:220px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    text-align:center;
}

.vertical-card:nth-child(4n+1){background:var(--v1)}
.vertical-card:nth-child(4n+2){background:var(--v2)}
.vertical-card:nth-child(4n+3){background:var(--v3)}
.vertical-card:nth-child(4n+4){background:var(--v4)}

.vertical-card:hover{
    transform:translateY(-6px);
    box-shadow:0 20px 44px rgba(20,40,80,.12);
}

.vertical-card h3{
    font-size:1.65rem;
    margin-bottom:12px;
    color:#102c67;
}

.vertical-card p{
    color:#55657f;
}

/* ---------- Explorer ---------- */

.topbar{
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:18px 0;
    box-shadow:0 2px 12px rgba(0,0,0,.05);
}

.filter-bar{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:20px;
    margin:20px 0;
}

.filter-group{display:flex;flex-direction:column;gap:8px}
.filter-group label{font-weight:700;color:var(--primary)}
.filter-group input,
.filter-group select{
    width:100%;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:10px;
    font:inherit;
    background:#fff;
}

.results-count{margin-bottom:20px;color:var(--muted)}

.landing-footer{
    text-align:center;
    padding:36px 20px;
    color:#60708a;
    border-top:1px solid var(--border);
    background:#fff;
}

.landing-footer a{
    color:var(--primary);
    text-decoration:none;
    font-weight:700;
}

@media(max-width:900px){
    .brand-container{flex-direction:column;gap:18px}
    .brand-right{text-align:center}
    .hero h2{font-size:2.3rem}
    .filter-bar{grid-template-columns:1fr}
}

@media(max-width:640px){
    .vertical-grid{grid-template-columns:1fr}
    .brand-logo{width:140px !important;max-width:140px !important;}
}



/* ==========================================================
   Explorer Page (Merged Back)
   ========================================================== */

.explorer-header{
    display:flex;
    align-items:center;
    gap:20px;
    margin:30px 0 24px;
}

#backButton{
    background:var(--primary);
    color:#fff;
    border:none;
    padding:12px 18px;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
}

#backButton:hover{
    background:var(--primary-dark);
}

.university-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
    gap:24px;
    padding:20px 0 60px;
}

.university-card{
    position:relative;
    border:1px solid var(--border);
    border-radius:20px;
    padding:26px;
    background:#fff;
    box-shadow:0 10px 28px rgba(15,23,42,.06);
    transition:.25s;
}

.university-card:nth-child(4n+1){background:var(--v1);}
.university-card:nth-child(4n+2){background:var(--v2);}
.university-card:nth-child(4n+3){background:var(--v3);}
.university-card:nth-child(4n+4){background:var(--v4);}

.university-card:hover{
    transform:translateY(-5px);
    box-shadow:0 18px 36px rgba(0,0,0,.08);
}

.serial-number{
    width:58px;
    height:58px;
    border-radius:50%;
    background:#fff;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:var(--primary);
    font-weight:800;
    margin-bottom:18px;
}

.serial-number small{
    font-size:.65rem;
    color:var(--muted);
    text-transform:uppercase;
}

.university-name{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:1.55rem;
    font-weight:700;
    line-height:1.3;
    margin-bottom:10px;
}

.logo-badge{
    width:42px;
    height:42px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    flex-shrink:0;
}

.location{margin-bottom:12px;}

.type,.band{
    display:inline-block;
    margin:4px 6px 8px 0;
    padding:7px 12px;
    border-radius:999px;
    font-size:.9rem;
}

.type{background:#e8efff;color:#18419c;}
.band{background:#edf9ef;color:#2e7d32;}

.university-card hr{
    border:none;
    border-top:1px solid #d8dee8;
    margin:16px 0;
}

.course-heading{
    color:var(--primary);
    font-weight:700;
    margin-bottom:12px;
}

.course-list{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.course-chip{
    background:#fff;
    border:1px solid #d7e2f2;
    border-radius:999px;
    padding:6px 10px;
    font-size:.88rem;
}

.website-link{
    margin-top:18px;
    padding-top:16px;
    border-top:1px solid #d8dee8;
}

.website-link a{
    display:inline-block;
    background:var(--primary);
    color:#fff;
    text-decoration:none;
    padding:10px 16px;
    border-radius:10px;
    font-weight:700;
}

.website-link a:hover{
    background:var(--primary-dark);
}

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

    .explorer-header{
        flex-direction:column;
        align-items:flex-start;
    }
}


/* Force logo sizing */
header.brand-header img.brand-logo,
.brand-header .brand-logo{
    width:160px !important;
    max-width:160px !important;
    height:auto !important;
}

@media (max-width:640px){
    header.brand-header img.brand-logo,
    .brand-header .brand-logo{
        width:140px !important;
        max-width:140px !important;
    }
}
