﻿/* =========================================
   ACADEMICS PAGE - BLACK & WHITE PROFESSIONAL
   ========================================= */
:root {
    --primary: #000000;
    --accent: #334155;
    --text-dark: #1e293b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

.academics-page {
    background: #ffffff;
    padding-top: 0;
}

/* =========================================
   PAGE TITLE SECTION
   ========================================= */
.page-title-section {
    background: #000000;
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

    .page-title-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
        animation: patternMove 20s ease-in-out infinite;
    }

@keyframes patternMove {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: titleFadeIn 1s ease-out;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   TOPPERS CAROUSEL SECTION
   ========================================= */
.toppers-section {
    /* UPDATED: Reduced bottom padding from 80px to 10px */
    padding: 80px 0 10px 0;
    background: #ffffff;
    text-align: center;
    overflow: hidden;
}

.section-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.toppers-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 50px 0;
    color: var(--primary);
}

    .toppers-section h2 .year {
        color: var(--primary);
        border-bottom: 3px solid var(--primary);
    }

/* CAROUSEL STRUCTURE */
.position-carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.position-track-wrapper {
    width: 100%;
    overflow: visible;
    padding: 20px 0;
}

.position-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    gap: 20px;
    align-items: stretch;
    will-change: transform;
}

/* POSITION CARD */
.position-card {
    flex: 0 0 calc(33.333% - 14px);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .position-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        border-color: #000;
    }

.pos-rank-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #000;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.pos-img-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f8fafc;
}

    .pos-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.position-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #000;
}

.pos-marks {
    font-size: 1.5rem;
    font-weight: 900;
    color: #000;
    margin: 5px 0 10px 0;
}

.pos-group {
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* =========================================
   CURRICULUM & INFO SECTIONS
   ========================================= */
.curriculum-section {
    background: #f8fafc;
    /* UPDATED: Reduced top padding from 80px to 40px */
    padding: 40px 20px 80px 20px;
}

.row-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.curriculum-box {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

    .curriculum-box.dark {
        background: #000000;
        color: #ffffff;
        border-color: #333333;
    }

.box-header {
    padding: 25px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.curriculum-box.dark .box-header {
    border-bottom: 2px solid #333333;
}

.box-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.grades {
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.box-body {
    padding: 25px;
    flex-grow: 1;
}

.desc {
    color: #64748b;
    margin-bottom: 20px;
    font-style: italic;
    font-size: 0.95rem;
}

.curriculum-box.dark .desc {
    color: #94a3b8;
}

/* SUBJECT LIST (Two Columns) */
.subject-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}

    .subject-list li {
        margin-bottom: 8px;
        font-weight: 500;
        position: relative;
        padding-left: 18px;
        color: #334155;
        break-inside: avoid;
    }

.curriculum-box.dark .subject-list li {
    color: #e2e8f0;
}

.subject-list li::before {
    content: "•";
    color: #000000;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.curriculum-box.dark .subject-list li::before {
    color: #ffffff;
}

/* UNIFORM LAYOUT */
.uniform-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

    .uniform-layout .subject-list {
        flex: 1;
        columns: 1;
    }

.uniform-img {
    width: 180px;
    height: 240px;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* GROUP TABS */
.group-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab {
    flex: 1;
    background: #333333;
    border: 1px solid #444444;
    color: #aaaaaa;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .tab.active {
        background: #ffffff;
        color: #000000;
        border-color: #ffffff;
    }

.group-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

    .group-panel.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.group-panel h4 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    font-weight: 800;
}

.group-panel p {
    color: #9ca3af;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .tags span {
        background: rgba(255,255,255,0.1);
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 600;
        border: 1px solid rgba(255,255,255,0.2);
    }

/* COMPACT DOWNLOAD STRIP */
.download-strip {
    background: #000000;
    color: #ffffff;
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #333333;
    max-width: 1200px;
    margin: 30px auto 0 auto;
}

.dl-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

    .dl-info svg {
        width: 32px;
        height: 32px;
        color: #ffffff;
        flex-shrink: 0;
    }

    .dl-info h4 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 800;
        line-height: 1.2;
    }

    .dl-info p {
        margin: 0;
        color: #9ca3af;
        font-size: 0.85rem;
        line-height: 1.2;
    }

.btn-download {
    background: #ffffff;
    color: #000000;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.85rem;
    border: 2px solid #ffffff;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-download:hover {
        transform: translateY(-2px);
        background: #e2e8f0;
    }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .page-title-section {
        padding: 100px 20px 60px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    /* CAROUSEL BREAKPOINTS */
    .position-card {
        flex: 0 0 calc(50% - 10px); /* 2 per row on tablets */
    }

    .row-layout {
        grid-template-columns: 1fr;
    }

    .uniform-layout {
        flex-direction: column-reverse;
        align-items: flex-start;
    }

    .uniform-img {
        width: 120px;
        height: 160px;
        align-self: flex-start;
    }

    .download-strip {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .dl-info {
        flex-direction: column;
        gap: 10px;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    /* Mobile Carousel - 1 per row */
    .position-card {
        flex: 0 0 100%;
    }

    .position-track-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .position-card {
        scroll-snap-align: center;
    }
}
