
/* =========================================
   GLOBAL RESET
========================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

img,
video,
iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* =========================================
   HEADER
   PRESERVED WITHOUT CHANGES
========================================= */

header {
    text-align: center;
    padding: 20px 20px;
    background: linear-gradient(135deg,
    #1eb53a 25%,
    #fcd116 25%, #fcd116 35%,
    #000000 35%, #000000 65%,
    #fcd116 65%, #fcd116 75%,
    #00a1de 75%
    );
    color: white;
    margin-bottom: 30px;
    animation: fadeIn 2s ease-in-out;
}

header h1 {
    font-size: 2.8em;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

header h4 {
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* =========================================
   MAIN CONTENT
========================================= */

main {
    width: 100%;
    flex: 1;
    padding: 20px;
    text-align: center;
}

.content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.instruction {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

/* =========================================
   ALPHABET NAVIGATION
========================================= */

.alphabet-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    margin-top: 30px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.alphabet {
    display: inline-flex;
    gap: 5px;
    font-size: 1rem;
    font-weight: bold;
}

.alphabet span {
    min-width: 40px;
    min-height: 40px;
    margin: 2px;
    padding: 10px;
    background-color: #002d72;
    color: white;
    border-radius: 5px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.alphabet span:hover {
    background-color: #004a99;
    transform: translateY(-2px);
}

/* =========================================
   SCHOOL LIST
========================================= */

.school-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.school-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: left;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    overflow-wrap: anywhere;
}

.school-item:hover {
    background-color: #f1f6ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

/* =========================================
   ANALYSIS LINKS
========================================= */

.analysis-links {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analysis-links a {
    text-decoration: none;
    font-size: 16px;
    padding: 12px 20px;
    background-color: #0056b3;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    transition: all 0.3s ease;
}

.analysis-links a:hover {
    background-color: #003d80;
    transform: translateY(-2px);
}

/* =========================================
   DISTRICT LINKS
========================================= */

.district-links {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.district-btn {
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #28A745;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.district-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* =========================================
   NAVIGATION BAR
========================================= */

.navbar {
    background: #007bff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: white;
    width: 100%;
}

.navbar .logo {
    font-size: 18px;
    font-weight: bold;
}

.navbar a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
    display: inline-block;
    padding: 5px 0;
}

.navbar a:hover {
    text-decoration: underline;
}

/* =========================================
   CONTAINER
========================================= */

.container {
    width: calc(100% - 30px);
    max-width: 900px;
    margin: 25px auto;
    padding: 25px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

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

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* =========================================
   GRID CONTAINER
========================================= */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-in-out;
}

.link-card {
    background: #ffffff;
    padding: 20px;
    cursor: pointer;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.link-card h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 15px 0 10px;
    color: #222;
}

/* =========================================
   POPUP
========================================= */

.popup-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.65);
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-y: auto;
}

.popup-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

.popup-box h3 {
    margin-bottom: 15px;
    color: #333;
}

.popup-box ul {
    list-style: none;
    padding: 0;
}

.popup-box ul li {
    margin: 8px 0;
}

.popup-box ul li a {
    text-decoration: none;
    color: #007BFF;
    font-weight: 500;
    display: block;
    padding: 8px;
    border-radius: 5px;
}

.popup-box ul li a:hover {
    background: #f0f5ff;
    text-decoration: underline;
}

.close-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: #c82333;
}

/* =========================================
   BATCH LIST
========================================= */

.batch-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem;
    gap: 15px;
}

.batch-card {
    background-color: white;
    border-left: 5px solid #046A38;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.batch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.batch-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3rem;
    overflow-wrap: anywhere;
}

.batch-year {
    font-size: 0.9rem;
    color: #666;
}

/* =========================================
   NOT FOUND
========================================= */

.not-found {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 2rem 1rem;
    background-color: #f8f9fa;
}

.not-found-box {
    background-color: #ffffff;
    border-left: 5px solid #d9534f;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.not-found-box h2 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
    color: #d9534f;
}

.not-found-box p {
    color: #555;
    font-size: 1rem;
    margin: 0;
}

/* =========================================
   LINKS LIST
========================================= */

.links-list {
    list-style: none;
    padding: 0;
    width: 100%;
}

.links-list li {
    margin: 10px 0;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.links-list a {
    text-decoration: none;
    color: #007BFF;
    font-size: 16px;
    display: inline-block;
    overflow-wrap: anywhere;
}

.links-list a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* =========================================
   FOOTER
========================================= */

.footer {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 25px 15px;
    margin-top: 40px;
    width: 100%;
}

.footer-links {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 15px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #4da3ff;
}

.footer span {
    color: #aaa;
}

.footer-copy {
    font-size: 12px;
    color: #aaa;
}

/* Support for pages using the footer element */
footer {
    position: relative;
    width: 100%;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px 15px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-top: auto;
}

footer a {
    color: #4CAF50;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

a:focus-visible,
button:focus-visible,
.school-item:focus-visible,
.alphabet span:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

@media (max-width: 992px) {

    .content {
        padding: 15px;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
        padding: 0 10px;
    }

    .container {
        max-width: 95%;
    }
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 767px) {

    main {
        padding: 12px;
    }

    .content {
        padding: 10px;
    }

    .school-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .analysis-links,
    .district-links {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .analysis-links a,
    .district-btn {
        width: 100%;
        margin: 0;
        min-height: 46px;
    }

    .navbar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
    }

    .navbar > div {
        max-width: 100%;
    }

    .navbar a {
        margin: 5px 8px;
    }

    .container {
        width: calc(100% - 20px);
        margin: 15px auto;
        padding: 15px;
    }

    .card {
        padding: 18px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5px;
    }

    .link-card {
        padding: 18px;
    }

    .popup-box {
        padding: 22px 18px;
    }

    .batch-list {
        padding: 10px;
    }

    .footer {
        padding: 20px 10px;
    }
}

/* =========================================
   SMALL MOBILE DEVICES
========================================= */

@media (max-width: 380px) {

    main {
        padding: 8px;
    }

    .container {
        width: calc(100% - 12px);
        padding: 12px;
    }

    .card {
        padding: 14px;
    }

    .alphabet span {
        min-width: 35px;
        padding: 8px;
        font-size: 14px;
    }

    .analysis-links a,
    .district-btn {
        font-size: 14px;
        padding: 10px;
    }

    .batch-title {
        font-size: 1rem;
    }

    .popup-box {
        padding: 18px 14px;
    }
}

/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* GENERIC INFORMATION PAGE STYLING */

.legal-content {
    width: calc(100% - 30px);
    max-width: 850px;
    margin: 35px auto;
    padding: clamp(20px, 5vw, 40px);
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: left;
    line-height: 1.8;
    overflow-wrap: break-word;
}

.legal-content h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #1eb53a;
}

.legal-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #333;
    margin: 25px 0 12px;
}

.legal-content h3 {
    font-size: 1.1rem;
    color: #444;
    margin: 20px 0 10px;
}

.legal-content p {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: #555;
    margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
    padding-left: 25px;
    margin-bottom: 18px;
    color: #555;
}

.legal-content li {
    margin-bottom: 8px;
}

.legal-content a {
    color: #007bff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.25s ease;
}

.legal-content a:hover {
    color: #0056b3;
}

.legal-content a:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 600px) {
    .legal-content {
        width: calc(100% - 20px);
        margin: 20px auto;
        padding: 20px 16px;
        border-radius: 8px;
    }

    .legal-content p {
        line-height: 1.7;
    }
}

