@font-face {
  font-family: "Delight";
  src: url("../Fonts/delight-regular.otf") format("opentype");
  font-weight: normal;
}

/* =========================================================
   ENSKOOL RESULTS PAGE
   Premium • Responsive • Clean
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: #111111;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.key-points ul li .content h3 {
  font-size: 30px;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   PAGE
   ========================================================= */

.results-section-bg {
    width: 100%;
    background: #f7f5fc !important;
}

.results-page {
    width: 100%;
    max-width: 1334px;
    margin: 0 auto;
    padding: 55px 50px 70px;
    background: #f7f5fc !important;
    box-sizing: border-box;
}

.results-page {
    width: 100%;
    max-width: 1334px;
    margin: 0 auto;
    padding: 55px 50px 70px;
    background: #f7f5fc !important;
}


/* =========================================================
   results-hero
   ========================================================= */

.results-hero {
    /* text-align: center; */
    margin-bottom: 34px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0 27px;

    border: 2px solid #6336a3;
    border-radius: 999px;

    color: #55278e;
    background: rgba(255, 255, 255, 0.55);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.results-hero h1 {
    margin: 0 auto;
    width: 55%;
    font-size: clamp(42px, 4vw, 64px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -1.8px;
}

.results-hero h1 span {
    color: #5940b5;
}

.results-hero p {
    margin-top: 14px;

    color: #8c8993;
    font-size: 20px;
    line-height: 1.5;
}


/* =========================================================
   FILTERS
   ========================================================= */

.filters-wrap {
    width: 100%;
    margin-bottom: 25px;
}

.filters {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    flex-wrap: wrap;
}

.filter-btn {
    min-width: 112px;
    height: 52px;

    padding: 0 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: 1px solid #ece9f2;
    border-radius: 999px;

    background: #ffffff;
    color: #27314d;

    font-size: 15px;
    font-weight: 700;

    box-shadow:
        0 5px 18px rgba(46, 35, 80, 0.045);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 9px 22px rgba(75, 45, 130, 0.10);
}

.filter-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #5c25d9, #6930e6);

    border-color: transparent;

    box-shadow:
        0 10px 24px rgba(92, 37, 217, 0.22);
}

.filter-icon {
    width: 19px;
    height: 19px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    line-height: 1;
}


/* =========================================================
   RESULTS GRID
   ========================================================= */

.results-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 24px;

    align-items: stretch;
}


/* =========================================================
   STUDENT CARD
   ========================================================= */

.student-card {
    position: relative;

    min-width: 0;
    overflow: hidden;

    padding: 0 18px 20px;

    background: #ffffff;

    border: 1px solid rgba(226, 222, 237, 0.8);
    border-radius: 22px;

    text-align: center;

    box-shadow:
        0 8px 25px rgba(48, 35, 82, 0.055);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.student-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 16px 35px rgba(48, 35, 82, 0.10);
}


/* =========================================================
   STUDENT IMAGE
   ========================================================= */

.student-image {
    position: relative;

    width: calc(100% + 36px);
    height: 260px;

    margin-left: -18px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #f0eef7 0%,
            #e7e3ef 100%
        );

    border-radius: 22px 22px 0 0;
}

.student-image > img:not(.rank-badge) {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition: transform 0.45s ease;
}

.student-card:hover .student-image > img:not(.rank-badge) {
    transform: scale(1.025);
}


/* =========================================================
   PHOTO PLACEHOLDER
   ========================================================= */

.photo-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #5b3e98;

    background:
        linear-gradient(
            145deg,
            #f2eff9,
            #e4def2
        );

    font-family: Georgia, "Times New Roman", serif;
    font-size: 70px;
    font-weight: 700;
}


/* =========================================================
   RANK BADGE
   ========================================================= */

.rank-badge {
    position: absolute;
    left: 0px;
    top: 15px;
    z-index: 3;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.15));
    width: 72px ;
    height: 72px ;
    object-fit: contain ;
    display: block;
} 
/* 
.badge-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            #f7c94c,
            #d89b16
        );

    box-shadow:
        0 6px 15px rgba(167, 111, 10, 0.22);
}

.badge-fallback b {
    font-size: 21px;
    line-height: 1;
}

.badge-fallback small {
    margin-top: 3px;

    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.8px;
} */


/* =========================================================
   BRAND
   ========================================================= */

/* .brand {
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 3;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.brand span {
    color: #0b005e;
} */


/* =========================================================
   STUDENT NAME
   ========================================================= */

.student-card h2 {
    margin-top: 17px;

    color: #151515;

    font-family: "Delight";
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   SUBTITLE
   ========================================================= */

.student-subtitle {
    margin-top: 6px;

    color: #5736c2;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


/* =========================================================
   STUDENT DETAILS
   School • Mark • Exam
   ========================================================= */

.student-details {
    width: 100%;
    margin-top: 14px;
    display: grid;
    gap: 8px;
    text-align: left;
}

.student-detail {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #eeeaf5;
    border-radius: 12px;
    background: #faf9fd;
}

.detail-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f0ebff;
    color: #5c25d9;
    font-size: 16px;
}

.detail-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    color: #92909a;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.student-detail strong {
    min-width: 0;
    color: #292532;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mark-detail {
    background: #f7f3ff;
}

.mark-detail strong {
    color: #5b2bd8;
}


/* =========================================================
   RANK PILL
   ========================================================= */

.rank-pill {
    width: fit-content;
    max-width: 100%;

    min-height: 40px;

    margin: 12px auto 0;
    padding: 0 65px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-pill span {
    font-size: 14px;
}

.rank-pill.gold {
    color: #bd6900;
    background: #fff0cd;
}

.rank-pill.silver {
    color: #666666;
    background: #dedede;
}

.rank-pill.bronze {
    color: #8a4b22;
    background: #f1d2bd;
}

.rank-pill.gray {
    color: #555555;
    background: #eeeeee;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    grid-column: 1 / -1;

    min-height: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 35px;

    background: #ffffff;

    border: 1px solid #e7e3ed;
    border-radius: 22px;

    text-align: center;

    box-shadow:
        0 8px 25px rgba(48, 35, 82, 0.05);
}

.empty-state h2 {
    color: #202020;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
}

.empty-state p {
    margin-top: 9px;
    color: #85818c;
    font-size: 15px;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.pagination {
    width: 100%;

    margin-top: 35px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination-btn {
    min-width: 125px;
    height: 46px;

    padding: 0 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid #e1dce9;
    border-radius: 12px;

    background: #ffffff;
    color: #33264c;

    font-size: 14px;
    font-weight: 700;

    box-shadow:
        0 5px 15px rgba(48, 35, 82, 0.04);

    transition: 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
    color: #ffffff;
    background: #5b2bd8;
    border-color: #5b2bd8;
}

.pagination-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-info {
    min-width: 110px;

    text-align: center;

    color: #77727f;

    font-size: 14px;
    font-weight: 600;
}

html {
    scroll-behavior: smooth;
}

#resultsSection {
    scroll-margin-top: 30px;
}

.medal {
    position: absolute;
    top: -15px;
    left: -9px;
    z-index: 3;
}

.rank-badge {

}


/* =========================================================
   LARGE LAPTOP
   ========================================================= */

@media (max-width: 1250px) {

    .results-page {
        padding-left: 35px;
        padding-right: 35px;
    }

    .results-grid {
        gap: 20px;
    }

    .student-image {
        height: 235px;
    }

    .student-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .student-image {
        width: calc(100% + 32px);
        margin-left: -16px;
    }
}


/* =========================================================
   TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 1000px) {

    .results-page {
        padding: 45px 25px 60px;
    }

    .results-hero h1 {
        font-size: 48px;
    }

    .results-hero p {
        font-size: 18px;
    }

    .results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .student-image {
        height: 220px;
    }

    .student-card h2 {
        font-size: 18px;
    }

    .rank-pill {
        font-size: 12px;
        padding: 0 11px;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 760px) {

    .results-page {
        padding: 40px 20px 55px;
    }

    .results-hero {
        margin-bottom: 28px;
    }

    .eyebrow {
        min-height: 42px;
        padding: 0 21px;
        font-size: 11px;
    }

    .results-hero h1 {
        margin-top: 19px;
        font-size: 40px;
        line-height: 1.12;
        letter-spacing: -1px;
    }

    .results-hero p {
        margin-top: 10px;
        font-size: 16px;
    }

    .filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 5px 2px 10px;
        scrollbar-width: none;
    }

    .filters::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        flex: 0 0 auto;
        min-width: 105px;
        height: 48px;
        font-size: 14px;
    }

    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .student-image {
        height: 230px;
    }

    .rank-badge {
        width: 52px;
        height: 52px;
        left: 12px;
        bottom: 12px;
    }

    .brand {
        right: 12px;
        bottom: 12px;
        font-size: 14px;
    }

    .student-card h2 {
        margin-top: 15px;
        font-size: 17px;
    }

    .student-details {
        margin-top: 12px;
        gap: 6px;
    }

    .student-detail {
        gap: 7px;
        padding: 7px 8px;
        border-radius: 10px;
    }

    .detail-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
        border-radius: 8px;
        font-size: 14px;
    }

    .detail-label {
        font-size: 8px;
    }

    .student-detail strong {
        font-size: 10.5px;
    }

    .student-subtitle {
        font-size: 13px;
    }
}


/* =========================================================
   LARGE MOBILE
   ========================================================= */

@media (max-width: 560px) {

    .results-page {
        padding: 32px 15px 45px;
    }

    .results-hero h1 {
        font-size: 34px;
    }

    .results-hero p {
        font-size: 15px;
    }

    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .student-card {
        min-width: 0;
        padding-left: 13px;
        padding-right: 13px;
        padding-bottom: 16px;
        border-radius: 18px;
    }

    .student-image {
        width: calc(100% + 26px);
        height: 195px;
        margin-left: -13px;
        border-radius: 18px 18px 0 0;
    }

    .student-card h2 {
        margin-top: 13px;
        font-size: 16px;
    }

    .student-subtitle {
        margin-top: 5px;
        font-size: 12px;
    }

    .rank-pill {
        min-height: 36px;
        margin-top: 10px;
        padding: 0 9px;
        font-size: 11px;
        border-radius: 9px;
    }

    .rank-badge {
        width: 46px;
        height: 46px;
    }

    .brand {
        font-size: 12px;
    }

    .pagination {
        gap: 8px;
        margin-top: 28px;
    }

    .pagination-btn {
        min-width: 105px;
        height: 42px;
        padding: 0 12px;
        font-size: 12px;
    }

    .pagination-info {
        min-width: 80px;
        font-size: 12px;
    }
}


/* =========================================================
   SMALL MOBILE
   400px AND BELOW
   STILL 2 CARDS PER ROW
   ========================================================= */

@media (max-width: 400px) {

    .results-page {
        padding: 28px 10px 40px;
    }

    .results-hero h1 {
        font-size: 29px;
    }

    .results-hero p {
        font-size: 14px;
    }

    .eyebrow {
        min-height: 38px;
        padding: 0 17px;
        font-size: 10px;
    }

    .filters {
        gap: 9px;
    }

    .filter-btn {
        min-width: 92px;
        height: 44px;
        padding: 0 14px;
        font-size: 12px;
    }

    /*
     * IMPORTANT:
     * Keep 2 cards even on small mobile.
     */
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .student-card {
        min-width: 0;
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 12px;
        border-radius: 14px;
    }

    .student-image {
        width: calc(100% + 16px);
        height: 155px;
        margin-left: -8px;
        border-radius: 14px 14px 0 0;
    }

    .student-card h2 {
        margin-top: 10px;
        margin-left: 2px;
        margin-right: 2px;

        font-size: 13px;
        line-height: 1.25;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .student-subtitle {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.3;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rank-pill {
        width: 100%;
        min-height: 31px;

        margin-top: 8px;
        padding: 0 4px;

        font-size: 9px;
        line-height: 1.15;

        border-radius: 8px;
    }

    .rank-pill span {
        font-size: 9px;
        margin-right: 2px;
    }

    .rank-badge {
        width: 38px;
        height: 38px;

        left: 7px;
        bottom: 7px;
    }

    .badge-fallback {
        width: 38px;
        height: 38px;
    }

    .badge-fallback b {
        font-size: 14px;
    }

    .badge-fallback small {
        font-size: 5px;
    }

    .brand {
        right: 7px;
        bottom: 7px;
        font-size: 9px;
    }

    .pagination {
        gap: 6px;
        margin-top: 25px;
    }

    .pagination-btn {
        min-width: 82px;
        height: 38px;
        padding: 0 8px;
        font-size: 10px;
    }

    .pagination-info {
        min-width: 65px;
        font-size: 10px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   330px AND BELOW
   2 CARDS PER ROW — DO NOT CHANGE TO 1
   ========================================================= */

@media (max-width: 330px) {

    .results-page {
        padding-left: 7px;
        padding-right: 7px;
    }

    /*
     * FORCE 2 COLUMNS
     */
    .results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .student-card {
        min-width: 0;
        padding-left: 6px;
        padding-right: 6px;
        padding-bottom: 10px;
        border-radius: 12px;
    }

    .student-image {
        width: calc(100% + 12px);
        height: 135px;
        margin-left: -6px;
        border-radius: 12px 12px 0 0;
    }

    .student-card h2 {
        margin-top: 8px;
        margin-left: 1px;
        margin-right: 1px;

        font-size: 11px;
        line-height: 1.2;
    }

    .student-subtitle {
        margin-top: 3px;
        font-size: 8px;
        line-height: 1.2;
    }

    .rank-pill {
        min-height: 27px;
        margin-top: 6px;

        padding: 0 3px;

        font-size: 7.5px;
        border-radius: 7px;
    }

    .rank-pill span {
        font-size: 8px;
    }

    .rank-badge {
        width: 32px;
        height: 32px;

        left: 5px;
        bottom: 5px;
    }

    .badge-fallback {
        width: 32px;
        height: 32px;
    }

    .badge-fallback b {
        font-size: 11px;
    }

    .badge-fallback small {
        font-size: 4px;
    }

    .brand {
        right: 5px;
        bottom: 5px;
        font-size: 8px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.filter-btn:focus-visible,
.pagination-btn:focus-visible {
    outline: 3px solid rgba(91, 43, 216, 0.25);
    outline-offset: 3px;
}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .student-card,
    .filter-btn,
    .pagination-btn,
    .student-image > img:not(.rank-badge) {
        transition: none;
    }
}

/* =========================================================
   EXTRA SMALL PHONES
   Keeps cards readable without horizontal overflow.
   ========================================================= */

@media (max-width: 400px) {
    .student-card {
        padding-left: 11px;
        padding-right: 11px;
        border-radius: 18px;
    }

    .student-image {
        width: calc(100% + 22px);
        margin-left: -11px;
        height: 185px;
        border-radius: 18px 18px 0 0;
    }

    .student-card h2 {
        font-size: 15px;
    }

    .student-subtitle {
        font-size: 12px;
    }

    .student-details {
        gap: 5px;
    }

    .student-detail {
        padding: 6px;
        gap: 6px;
    }

    .detail-icon {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .detail-label {
        font-size: 7px;
    }

    .student-detail strong {
        font-size: 9.5px;
    }

    .rank-pill {
        min-height: 34px;
        padding: 0 9px;
        font-size: 10px;
        border-radius: 9px;
    }

    .rank-pill span {
        font-size: 12px;
    }
}

@media (max-width: 340px) {
    .student-image {
        height: 165px;
    }

    .student-card h2 {
        font-size: 14px;
    }

    .student-detail strong {
        font-size: 9px;
    }
}
