/* EducationGuard — public top-ranking students page */

.eg-tops-page {
    min-height: 100vh;
}

.eg-tops-page .eg-courses-main {
    padding-bottom: 4rem;
}

.eg-tops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
    gap: 1.35rem;
}

.eg-tops-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.6rem 1.2rem 1.4rem;
    border-radius: 1.6rem;
    background: var(--eg-surface);
    border: 1px solid rgba(70, 30, 56, 0.1);
    box-shadow: 0 14px 32px rgba(70, 30, 56, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.eg-tops-card:hover {
    transform: translateY(-4px);
    border-color: rgba(243, 147, 24, 0.4);
    box-shadow: 0 20px 40px rgba(70, 30, 56, 0.12);
}

.eg-tops-portrait {
    width: 10.5rem;
    height: 10.5rem;
    margin-bottom: 1.05rem;
}

.eg-tops-portrait img,
.eg-tops-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    display: block;
    box-shadow: 0 0 0 4px rgba(243, 147, 24, 0.22), 0 10px 22px rgba(70, 30, 56, 0.14);
}

.eg-tops-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--eg-primary), var(--eg-secondary));
    color: #fff;
    font-size: 2.8rem;
    font-weight: 800;
}

.eg-tops-copy h2 {
    margin: 0 0 0.4rem;
    font-family: var(--eg-font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--eg-secondary);
}

.eg-tops-copy p {
    margin: 0;
    color: var(--eg-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.eg-tops-score {
    margin: 0 0 0.25rem !important;
    color: var(--eg-primary);
    font-weight: 800;
    font-size: 1.05rem;
}

.eg-tops-school {
    margin: 0 0 0.35rem !important;
    color: var(--eg-secondary);
    font-weight: 700;
    font-size: 0.9rem;
}

.eg-tops-clear {
    margin-top: 0.75rem;
    padding: 0.7rem 1.35rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--eg-primary), var(--eg-primary-dark));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

html[data-bs-theme="dark"] .eg-tops-card {
    background: linear-gradient(165deg, rgba(40, 28, 36, 0.96), rgba(28, 20, 26, 0.94));
    border-color: rgba(243, 147, 24, 0.18);
}

html[data-bs-theme="dark"] .eg-tops-copy h2 {
    color: var(--eg-text);
}

html[data-bs-theme="dark"] .eg-tops-school {
    color: var(--eg-text);
}

@media (max-width: 575.98px) {
    .eg-tops-grid {
        grid-template-columns: 1fr;
        max-width: 22rem;
        margin-inline: auto;
    }
}
