﻿.toppers-page {
    width: 100%;
    padding: 40px 20px;
    background: #f7f8fc;
}

.toppers-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.toppers-page-title {
    text-align: center;
    margin-bottom: 35px;
}

    .toppers-page-title h1 {
        margin: 0;
        color: #1f2d5c;
        font-size: 36px;
        font-weight: 700;
    }

    .toppers-page-title p {
        margin: 10px 0 0;
        color: #777777;
        font-size: 16px;
    }

.toppers-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.toppers-section {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.toppers-section-header {
    padding: 20px 25px;
    background: #4563df;
    color: #ffffff;
}

    .toppers-section-header h2 {
        margin: 0;
        font-size: 22px;
        font-weight: 700;
    }

    .toppers-section-header p {
        margin: 6px 0 0;
        font-size: 14px;
        opacity: 0.9;
    }

.toppers-list {
    height: 470px;
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
}

    .toppers-list::-webkit-scrollbar {
        width: 6px;
    }

    .toppers-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .toppers-list::-webkit-scrollbar-thumb {
        background: #4563df;
        border-radius: 10px;
    }

.topper-card {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 145px;
    margin-bottom: 15px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-left: 5px solid #4563df;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

    .topper-card:last-child {
        margin-bottom: 0;
    }

.topper-card-photo {
    width: 90px;
    min-width: 90px;
    height: 90px;
    margin-right: 16px;
}

    .topper-card-photo img {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #edf0ff;
    }

.topper-no-photo {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f8;
    border: 3px solid #edf0ff;
    border-radius: 50%;
    font-size: 35px;
}

.topper-card-content {
    flex: 1;
    min-width: 0;
}

    .topper-card-content h3 {
        margin: 0 0 5px;
        color: #4563df;
        font-size: 19px;
        font-weight: 700;
    }

.topper-achievement-title {
    margin-bottom: 7px;
    color: #444444;
    font-size: 15px;
    font-weight: 600;
}

.topper-info {
    margin-bottom: 4px;
    color: #666666;
    font-size: 13px;
}

    .topper-info strong {
        color: #333333;
    }

.topper-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.topper-year {
    display: inline-block;
    padding: 4px 10px;
    background: #eef1ff;
    color: #4563df;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.read-more-btn {
    position: relative;
    z-index: 10;
    display: inline-block;
    padding: 6px 14px;
    background: #4563df;
    color: #ffffff;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
}

    .read-more-btn:hover {
        background: #344fc4;
    }

.view-all-wrapper {
    padding: 18px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
    text-align: center;
}

.view-all-btn {
    position: relative;
    z-index: 10;
    min-width: 130px;
    padding: 9px 20px;
    background: #4563df;
    color: #ffffff;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

    .view-all-btn:hover {
        background: #344fc4;
    }

.no-records {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #999999;
}

.no-records-icon {
    margin-bottom: 12px;
    font-size: 45px;
}

.no-records p {
    margin: 0;
    font-size: 15px;
}

/* Modal */

.topper-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
}

    .topper-modal.active {
        display: flex;
    }

.topper-modal-box {
    position: relative;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.25);
}

.view-all-modal-box {
    max-width: 1000px;
}

.topper-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    background: #4563df;
    color: #ffffff;
}

    .topper-modal-header h3 {
        margin: 0;
        font-size: 22px;
        font-weight: 700;
    }

.topper-modal-close {
    width: 35px;
    height: 35px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 30px;
    line-height: 30px;
    cursor: pointer;
}

.topper-modal-body {
    max-height: 70vh;
    padding: 25px;
    overflow-y: auto;
}

.topper-modal-main {
    display: flex;
    gap: 30px;
}

.topper-modal-photo-area {
    width: 200px;
    min-width: 200px;
    text-align: center;
}

.topper-modal-photo {
    width: 190px;
    height: 190px;
    border: 4px solid #eef1ff;
    border-radius: 12px;
    object-fit: cover;
}

.topper-modal-no-photo {
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: #f1f3f8;
    border-radius: 12px;
    font-size: 60px;
}

.topper-modal-details {
    flex: 1;
}

    .topper-modal-details h4 {
        margin: 0 0 18px;
        color: #4563df;
        font-size: 28px;
        font-weight: 700;
    }

.modal-info {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #eeeeee;
    font-size: 14px;
}

    .modal-info strong {
        width: 190px;
        min-width: 190px;
        color: #333333;
    }

    .modal-info span {
        color: #666666;
        word-break: break-word;
    }

.modal-description {
    margin-top: 20px;
    padding: 18px;
    background: #f7f8fc;
    border-radius: 8px;
}

    .modal-description h5 {
        margin: 0 0 8px;
        color: #4563df;
        font-size: 17px;
        font-weight: 700;
    }

    .modal-description p {
        margin: 0;
        color: #666666;
        font-size: 14px;
        line-height: 1.7;
        white-space: pre-line;
    }

.topper-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 25px;
    border-top: 1px solid #eeeeee;
}

.modal-close-button {
    padding: 8px 20px;
    background: #6c757d;
    color: #ffffff;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}

.view-all-list {
    max-height: 65vh;
    padding: 20px;
    overflow-y: auto;
    background: #f7f8fc;
}

.view-all-card {
    display: flex;
    gap: 18px;
    margin-bottom: 15px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-left: 5px solid #4563df;
    border-radius: 10px;
}

    .view-all-card:last-child {
        margin-bottom: 0;
    }

.view-all-photo {
    width: 90px;
    min-width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
}

.view-all-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f8;
    font-size: 35px;
}

.view-all-content {
    flex: 1;
    min-width: 0;
}

    .view-all-content h4 {
        margin: 0 0 5px;
        color: #4563df;
        font-size: 19px;
        font-weight: 700;
    }

    .view-all-content p {
        margin: 3px 0;
        color: #666666;
        font-size: 13px;
    }

.view-all-read-more {
    margin-top: 8px;
    padding: 6px 14px;
    background: #4563df;
    color: #ffffff;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

    .view-all-read-more:hover {
        background: #344fc4;
    }

body.toppers-modal-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .toppers-columns {
        grid-template-columns: 1fr;
    }

    .toppers-page-title h1 {
        font-size: 30px;
    }
}

@media (max-width: 767px) {
    .toppers-page {
        padding: 25px 10px;
    }

    .toppers-page-title h1 {
        font-size: 26px;
    }

    .toppers-section-header {
        padding: 17px 18px;
    }

        .toppers-section-header h2 {
            font-size: 19px;
        }

    .topper-card {
        padding: 12px;
    }

    .topper-card-photo {
        width: 70px;
        min-width: 70px;
        height: 70px;
        margin-right: 12px;
    }

        .topper-card-photo img,
        .topper-no-photo {
            width: 70px;
            height: 70px;
        }

    .topper-card-content h3 {
        font-size: 17px;
    }

    .topper-achievement-title {
        font-size: 14px;
    }

    .topper-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .topper-modal {
        padding: 10px;
    }

    .topper-modal-main {
        align-items: center;
        flex-direction: column;
    }

    .topper-modal-photo-area {
        width: 100%;
    }

    .topper-modal-details {
        width: 100%;
    }

        .topper-modal-details h4 {
            text-align: center;
            font-size: 23px;
        }

    .modal-info {
        display: block;
    }

        .modal-info strong {
            display: block;
            width: auto;
            min-width: auto;
            margin-bottom: 3px;
        }

    .view-all-card {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .view-all-content {
        width: 100%;
    }
}
