
/* St. Benedict's CBSE Toppers — v1.1.0
 * Theme-friendly typography: inherits the active school theme font.
 */

.stbct-section{
    --stbct-navy:#071f4d;
    --stbct-navy-2:#0b2e66;
    --stbct-blue:#3159e8;
    --stbct-gold:#dca514;
    --stbct-gold-soft:#f5e6bd;
    --stbct-text:#101828;
    --stbct-muted:#667085;
    --stbct-border:#e5e7eb;
    position:relative;
    width:100%;
    padding:clamp(48px,5.5vw,78px) 0;
    overflow:hidden;
    background:
        radial-gradient(circle at 8% 20%, rgba(49,89,232,.09), transparent 28%),
        radial-gradient(circle at 92% 85%, rgba(220,165,20,.10), transparent 25%),
        linear-gradient(180deg,#f8faff 0%,#ffffff 48%,#f8fafc 100%);
}

.stbct-section::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.34;
    background-image:
        linear-gradient(rgba(7,31,77,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(7,31,77,.025) 1px,transparent 1px);
    background-size:42px 42px;
}

.stbct-section-glow{
    position:absolute;
    width:300px;
    height:300px;
    border-radius:50%;
    filter:blur(60px);
    pointer-events:none;
    opacity:.25;
}

.stbct-glow-one{top:-180px;left:-120px;background:#3159e8}
.stbct-glow-two{right:-130px;bottom:-190px;background:#dca514}

.stbct-container{
    position:relative;
    z-index:1;
    width:min(1280px,calc(100% - 40px));
    margin:auto;
}

.stbct-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:28px;
    margin-bottom:28px;
}

.stbct-heading-copy{min-width:0}

.stbct-eyebrow{
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:9px;
    color:var(--stbct-blue);
    font:800 11px/1.2 inherit;
    letter-spacing:2px;
    text-transform:uppercase;
}

.stbct-eyebrow span{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--stbct-gold);
    box-shadow:0 0 0 4px rgba(220,165,20,.13);
}

.stbct-title{
    display:flex!important;
    align-items:center;
    gap:13px;
    margin:0!important;
    padding:0!important;
    color:var(--stbct-text)!important;
    font-family:inherit!important;
    font-size:clamp(29px,3.3vw,43px)!important;
    font-weight:800!important;
    line-height:1.08!important;
    letter-spacing:-.9px!important;
}

.stbct-title i{
    width:5px;
    height:43px;
    flex:0 0 5px;
    border-radius:3px;
    background:linear-gradient(180deg,var(--stbct-blue),var(--stbct-navy));
}

.stbct-subtitle{
    max-width:690px;
    margin:10px 0 0 18px!important;
    color:var(--stbct-muted)!important;
    font-family:inherit!important;
    font-size:15px!important;
    line-height:1.5!important;
}

.stbct-heading-badge{
    flex:none;
    padding:9px 12px;
    border:1px solid rgba(220,165,20,.35);
    border-radius:8px;
    background:rgba(255,255,255,.72);
    color:var(--stbct-navy);
    font:800 10px/1 inherit;
    letter-spacing:1.4px;
    box-shadow:0 6px 20px rgba(7,31,77,.05);
}

.stbct-heading-badge strong{
    color:var(--stbct-blue);
}

.stbct-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:24px;
    padding:6px;
    border:1px solid rgba(7,31,77,.08);
    border-radius:12px;
    background:rgba(255,255,255,.82);
    box-shadow:0 7px 22px rgba(7,31,77,.055);
    backdrop-filter:blur(12px);
}

.stbct-filters{
    display:flex;
    gap:4px;
    overflow:auto;
    scrollbar-width:none;
}

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

.stbct-filters button{
    min-height:40px;
    border:0!important;
    border-radius:8px!important;
    background:transparent!important;
    color:#667085!important;
    padding:0 15px!important;
    font:700 13px/1 inherit!important;
    white-space:nowrap;
    cursor:pointer;
    transition:.2s ease;
}

.stbct-filters button:hover{
    color:var(--stbct-navy)!important;
    background:#f3f6fb!important;
}

.stbct-filters button.is-active{
    background:var(--stbct-navy)!important;
    color:#fff!important;
    box-shadow:0 4px 12px rgba(7,31,77,.18);
}

.stbct-toolbar select{
    min-width:180px;
    height:40px;
    border:1px solid #dfe4ec;
    border-radius:8px;
    background:#fff;
    color:var(--stbct-text);
    padding:0 12px;
    outline:none;
    font:700 13px/1 inherit;
    cursor:pointer;
}

.stbct-toolbar select:focus{
    border-color:var(--stbct-blue);
    box-shadow:0 0 0 3px rgba(49,89,232,.10);
}

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

.stbct-card{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(7,31,77,.09);
    border-radius:15px;
    background:#fff;
    box-shadow:0 10px 28px rgba(7,31,77,.085);
    transition:transform .28s ease,box-shadow .28s ease;
}

.stbct-card::after{
    content:"";
    position:absolute;
    left:18px;
    right:18px;
    bottom:0;
    height:3px;
    border-radius:3px 3px 0 0;
    background:linear-gradient(90deg,var(--stbct-blue),var(--stbct-gold));
    transform:scaleX(0);
    transform-origin:left;
    transition:transform .3s ease;
}

.stbct-card:hover{
    transform:translateY(-5px);
    box-shadow:0 18px 38px rgba(7,31,77,.13);
}

.stbct-card:hover::after{transform:scaleX(1)}

.stbct-photo{
    position:relative;
    aspect-ratio:1/1.02;
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    background:linear-gradient(145deg,#dbe5f3,#aebfd7);
    font-size:60px;
    font-weight:800;
}

.stbct-photo::after{
    content:"";
    position:absolute;
    inset:auto 0 0;
    height:35%;
    background:linear-gradient(transparent,rgba(7,31,77,.2));
    pointer-events:none;
}

.stbct-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center top;
    transition:transform .5s ease;
}

.stbct-card:hover .stbct-photo img{transform:scale(1.035)}

.stbct-rank{
    position:absolute;
    top:11px;
    left:11px;
    z-index:2;
    padding:6px 9px;
    border-radius:6px;
    background:var(--stbct-gold);
    color:var(--stbct-navy);
    box-shadow:0 5px 12px rgba(7,31,77,.12);
    font-family:inherit;
    font-size:9px;
    font-weight:900;
    line-height:1;
    letter-spacing:.7px;
}

.stbct-body{
    position:relative;
    padding:17px 18px 20px;
}

.stbct-body small{
    color:var(--stbct-blue);
    font:800 10px/1 inherit;
    letter-spacing:1.1px;
}

.stbct-body h3{
    margin:6px 0 6px!important;
    color:var(--stbct-text)!important;
    font:800 19px/1.25 inherit!important;
}

.stbct-body strong{
    display:block;
    color:var(--stbct-navy);
    font:900 30px/1 inherit;
    letter-spacing:-.7px;
}

.stbct-body p{
    margin:8px 0 0!important;
    color:var(--stbct-muted)!important;
    font:600 11px/1.35 inherit!important;
}

.stbct-body em{
    display:block;
    margin-top:8px;
    color:#697386;
    font:12px/1.45 inherit;
}

.stbct-empty{
    padding:35px;
    border:1px dashed #ccd3df;
    border-radius:12px;
    background:rgba(255,255,255,.7);
    color:#667085;
    text-align:center;
}

@media(max-width:1050px){
    .stbct-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:800px){
    .stbct-container{width:calc(100% - 30px)}
    .stbct-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .stbct-toolbar{flex-direction:column;align-items:stretch}
    .stbct-toolbar select{width:100%}
    .stbct-heading-badge{display:none}
}

@media(max-width:560px){
    .stbct-section{padding:36px 0 44px}
    .stbct-container{width:calc(100% - 24px)}
    .stbct-heading{margin-bottom:19px}
    .stbct-eyebrow{font-size:9px;letter-spacing:1.5px}
    .stbct-title{gap:10px;font-size:25px!important;letter-spacing:-.5px!important}
    .stbct-title i{width:4px;height:29px;flex-basis:4px}
    .stbct-subtitle{margin-left:14px!important;font-size:13px!important}
    .stbct-toolbar{margin-bottom:18px;padding:5px;border-radius:10px}
    .stbct-filters button{min-height:38px;padding:0 13px!important;font-size:12px!important}
    .stbct-grid{gap:10px}
    .stbct-card{border-radius:11px}
    .stbct-body{padding:12px}
    .stbct-body h3{font-size:14px!important}
    .stbct-body strong{font-size:22px}
    .stbct-body p{font-size:9px!important}
    .stbct-body em{display:none}
    .stbct-rank{top:7px;left:7px;font-size:7px;padding:5px 6px}
}

@media(max-width:360px){
    .stbct-grid{grid-template-columns:1fr}
    .stbct-body h3{font-size:17px!important}
    .stbct-body strong{font-size:26px}
}

/* Hard reset for the rank badge so theme typography cannot enlarge it. */
.stbct-section .stbct-card .stbct-photo .stbct-rank{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    max-width:max-content;
    height:auto;
    min-height:0;
    margin:0;
    padding:6px 9px;
    box-sizing:border-box;
    color:#071f4d;
    background:#dca514;
    border:0;
    border-radius:6px;
    font-family:inherit !important;
    font-size:9px !important;
    font-style:normal !important;
    font-weight:900 !important;
    line-height:1 !important;
    letter-spacing:.7px !important;
    text-transform:uppercase;
    white-space:nowrap;
}

@media(max-width:560px){
    .stbct-section .stbct-card .stbct-photo .stbct-rank{
        padding:5px 6px;
        font-size:7px !important;
    }
}

/* v1.2.0 — compact academic result card */
.stbct-section .stbct-card .stbct-body{
    padding:14px 16px 15px;
}

.stbct-section .stbct-student-meta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:18px;
    margin-bottom:7px;
}

.stbct-section .stbct-class{
    display:inline-flex;
    align-items:center;
    color:#3159e8;
    font-family:inherit !important;
    font-size:10px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:1px !important;
    text-transform:uppercase;
}

.stbct-section .stbct-session{
    display:inline-flex;
    align-items:center;
    gap:5px;
    color:#7a8497;
    font-family:inherit !important;
    font-size:9px !important;
    font-weight:600 !important;
    line-height:1 !important;
    white-space:nowrap;
}

.stbct-section .stbct-calendar{
    width:9px;
    height:9px;
    position:relative;
    display:inline-block;
    border:1.2px solid currentColor;
    border-radius:2px;
    opacity:.75;
}

.stbct-section .stbct-calendar::before{
    content:"";
    position:absolute;
    left:1px;
    right:1px;
    top:2px;
    border-top:1px solid currentColor;
}

.stbct-section .stbct-calendar::after{
    content:"";
    position:absolute;
    left:2px;
    top:-2px;
    width:1px;
    height:3px;
    background:currentColor;
    box-shadow:4px 0 0 currentColor;
}

.stbct-section .stbct-card .stbct-body h3{
    margin:0 0 11px !important;
    color:#101828 !important;
    font-family:inherit !important;
    font-size:18px !important;
    font-weight:800 !important;
    line-height:1.18 !important;
    letter-spacing:-.2px !important;
}

.stbct-section .stbct-result-row{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:10px;
    padding-top:10px;
    border-top:1px solid #edf0f4;
}

.stbct-section .stbct-result-label{
    color:#98a2b3;
    font-family:inherit !important;
    font-size:8px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:1px !important;
}

.stbct-section .stbct-result-row strong{
    display:block;
    margin:0;
    color:#071f4d !important;
    font-family:inherit !important;
    font-size:25px !important;
    font-weight:900 !important;
    line-height:.95 !important;
    letter-spacing:-.7px !important;
}

.stbct-section .stbct-card .stbct-body em{
    margin-top:9px;
    padding-top:8px;
    border-top:1px solid #edf0f4;
    color:#7a8497;
    font-family:inherit !important;
    font-size:10px !important;
    font-style:normal !important;
    line-height:1.35 !important;
}

@media(max-width:560px){
    .stbct-section .stbct-card .stbct-body{
        padding:11px 12px 12px;
    }
    .stbct-section .stbct-student-meta{
        margin-bottom:6px;
    }
    .stbct-section .stbct-class{
        font-size:8px !important;
        letter-spacing:.8px !important;
    }
    .stbct-section .stbct-session{
        font-size:8px !important;
    }
    .stbct-section .stbct-card .stbct-body h3{
        margin-bottom:9px !important;
        font-size:14px !important;
    }
    .stbct-section .stbct-result-row{
        padding-top:8px;
    }
    .stbct-section .stbct-result-label{
        font-size:7px !important;
    }
    .stbct-section .stbct-result-row strong{
        font-size:21px !important;
    }
}

/* v1.3.0 — six-column desktop achievers grid + stronger score emphasis */
.stbct-section .stbct-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:14px;
}

.stbct-section .stbct-card{
    min-width:0;
    border-radius:18px;
    overflow:hidden;
}

.stbct-section .stbct-card .stbct-photo{
    aspect-ratio:4 / 4.35;
}

.stbct-section .stbct-card .stbct-body{
    padding:12px 13px 13px;
}

.stbct-section .stbct-student-meta{
    margin-bottom:6px;
}

.stbct-section .stbct-class{
    font-size:8px !important;
    letter-spacing:.8px !important;
}

.stbct-section .stbct-session{
    font-size:7.5px !important;
    gap:4px;
}

.stbct-section .stbct-card .stbct-body h3{
    margin-bottom:8px !important;
    font-size:14px !important;
    line-height:1.12 !important;
    letter-spacing:-.25px !important;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.stbct-section .stbct-result-row{
    padding-top:8px;
    align-items:center;
}

.stbct-section .stbct-result-label{
    font-size:6.5px !important;
    letter-spacing:.8px !important;
}

.stbct-section .stbct-result-row strong{
    font-size:24px !important;
    line-height:.9 !important;
    letter-spacing:-1px !important;
}

@media (min-width:1200px){
    .stbct-section .stbct-grid{
        gap:12px;
    }
}

@media (min-width:1500px){
    .stbct-section .stbct-grid{
        gap:14px;
    }
    .stbct-section .stbct-result-row strong{
        font-size:27px !important;
    }
}

/* Keep tablets comfortable rather than forcing six tiny cards. */
@media (max-width:1199px) and (min-width:768px){
    .stbct-section .stbct-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:16px;
    }
    .stbct-section .stbct-card .stbct-body{
        padding:13px 14px 14px;
    }
}

/* Mobile remains intentionally easy to read. */
@media (max-width:767px){
    .stbct-section .stbct-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }
    .stbct-section .stbct-card{
        border-radius:14px;
    }
    .stbct-section .stbct-card .stbct-photo{
        aspect-ratio:1 / 1.08;
    }
    .stbct-section .stbct-card .stbct-body{
        padding:10px 10px 11px;
    }
    .stbct-section .stbct-card .stbct-body h3{
        font-size:12px !important;
        margin-bottom:7px !important;
    }
    .stbct-section .stbct-result-row strong{
        font-size:20px !important;
    }
}

/* v1.4.0 — two-row responsive pagination */
.stbct-section .stbct-pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin:22px 0 2px;
}

.stbct-section .stbct-page-numbers{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
}

.stbct-section .stbct-page-prev,
.stbct-section .stbct-page-next,
.stbct-section .stbct-page-number{
    appearance:none;
    border:1px solid #dfe5ef;
    background:rgba(255,255,255,.92);
    color:#102b59;
    min-width:36px;
    height:36px;
    padding:0 10px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    font-family:inherit !important;
    font-size:12px !important;
    font-weight:700 !important;
    line-height:1 !important;
    cursor:pointer;
    transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
}

.stbct-section .stbct-page-prev span:first-child,
.stbct-section .stbct-page-next span:last-child{
    font-size:20px !important;
    line-height:0 !important;
    font-weight:400 !important;
}

.stbct-section .stbct-page-number{
    width:36px;
    padding:0;
}

.stbct-section .stbct-page-number.is-active{
    background:#0b2857;
    border-color:#0b2857;
    color:#fff;
    box-shadow:0 5px 14px rgba(11,40,87,.18);
}

.stbct-section .stbct-page-prev:hover:not(:disabled),
.stbct-section .stbct-page-next:hover:not(:disabled),
.stbct-section .stbct-page-number:hover:not(.is-active){
    border-color:#dca514;
    color:#0b2857;
    transform:translateY(-1px);
}

.stbct-section .stbct-page-prev:disabled,
.stbct-section .stbct-page-next:disabled{
    opacity:.42;
    cursor:not-allowed;
    transform:none;
}

.stbct-section .stbct-page-ellipsis{
    width:28px;
    text-align:center;
    color:#8792a5;
    font-size:15px;
    line-height:36px;
}

@media(max-width:767px){
    .stbct-section .stbct-pagination{
        margin-top:16px;
        gap:5px;
    }
    .stbct-section .stbct-page-prev,
    .stbct-section .stbct-page-next{
        min-width:34px;
        height:34px;
        padding:0 8px;
        border-radius:9px;
        font-size:10px !important;
    }
    .stbct-section .stbct-page-number{
        width:34px;
        min-width:34px;
        height:34px;
        border-radius:9px;
    }
}
