*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Inter,sans-serif;
}

body{
    background:#f5f7fb;
}

.container{
    width:92%;
    max-width:1400px;
    margin:20px auto;
}

.top-actions{
    margin-bottom:20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
}

.btn-back {
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #4DA3FF;
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #3A8FE8;
    transform: translateY(-1px);
}

.btn-back:active {
    transform: scale(0.98);
}

.btn-link {
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: #005f91;
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    background: #0077B6;
    transform: translateY(-1px);
}

.btn-link:active {
    transform: scale(0.98);
}

/* Responsive top-action buttons */
.top-actions .btn-back,
.top-actions .btn-link {
    padding: 8px 10px;
    font-size: clamp(13px, 1.2vw, 15px);
    border-radius: 10px;
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.college-section h2 {
    font-size: clamp(18px, 2.5vw, 24px);
    margin: 0 0 14px 0;
    word-break: break-word;
}

/* Card and typography adjustments for small screens */
@media (max-width:768px) {
    .container { width:96%; margin:12px auto; }
    .college-section { padding:16px; border-radius:12px; }
    .college-grid { grid-template-columns:1fr; gap:16px; }
    .college-card { padding:16px; border-radius:12px; box-shadow:0 8px 20px rgba(15,23,42,0.06); height:auto; }
    .college-card h3 { margin-bottom:10px; padding-right:40px; line-height:1.25; white-space:normal; word-break:break-word; overflow-wrap:anywhere; min-height:unset; font-size:16px; }
    .bookmark { right:12px; top:12px; font-size:20px; }
    .score { padding:10px; border-radius:8px; }
    .top-actions .btn-back, .top-actions .btn-link { width:100%; text-align:center; }
}

@media (max-width:480px) {
    .college-card h3 { font-size:15px; }
    .college-section h2 { font-size:18px; }
}

.college-section{
    background:white;
    padding:25px;
    border-radius:18px;
    border:1px solid #e6e6e6;
    margin-top: 10px;
}

.college-section h2 {
    margin-bottom: 20px;
}

.college-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

.college-card {
    position: relative;
    padding: 24px;
    border: 1px solid #e7e7e7;
    border-radius: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.college-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.bookmark{
    position:absolute;
    right:20px;
    top:20px;
    font-size:22px;
    cursor:pointer;
    transition: color 0.2s ease;
}

.bookmark.fa-trash{
    color:#ef4444;
}

.bookmark.fa-trash:hover{
    color:#dc2626;
}

.college-card p i {
    color: #0077B6;
}

.college-card h3 {
    margin-bottom: 15px;
    padding-right: 40px;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-height: unset;
}

.college-card p{
    margin-bottom:12px;
    color:#64748b;
}

.score {
    margin-top: auto; 
    background: #eef9ef;
    padding: 12px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score span{
    color:#16803d;
    font-weight:600;
}

.score strong{
    color:#16803d;
    font-size:18px;
}

@media(max-width:1200px){
    .college-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        align-items: stretch; 
    }
}

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