.school-layout {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
}

.school-main {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* School header */

.school-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--background-red);
    padding-bottom: 1rem;
}

.school-header {
    position: relative;                 /* key: anchor for absolute children */
    display: block;                     /* we don't need flex/grid anymore */
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--background-red);
    padding-bottom: 1rem;
    padding-right: 3rem;                /* space so text doesn't run into heart */
}

.school-header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.school-header-fav {
    position: absolute;
    right: 0;                      /* stick to far right */
    top: 50%;                      /* vertically center */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}


.school-name {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.school-address {
    font-size: 0.95rem;
    color: var(--dark-grey);
}

.school-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.school-link-list a {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--light-grey);
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.school-link-list a:hover {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

/* Teams section */

.school-teams {
    margin-top: 2rem;
}

.school-teams-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.team-card {
    display: block;
    background-color: var(--light-grey);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    background-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.team-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.school-teams-empty {
    font-size: 0.95rem;
    color: var(--dark-grey);
    margin-top: 1rem;
}
