/* CSS Reset and Variables */
:root {
    --primary-color: #0f4c81;
    --primary-dark: #093154;
    --secondary-color: #2a9d8f;
    --accent-color: #e76f51;
    --bg-light: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --radius: 8px;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header & Top Bar - SEO Optimized */
header {
    background-color: var(--surface-color);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.top-bar-info {
    background: var(--primary-dark);
    color: #fff;
    padding: 6px 16px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-title-group img {
    height: 50px;
    width: auto;
}

.school-name-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.school-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    padding: 4px 8px;
}

/* Navigation - Separate from Logo Header */
nav.main-nav {
    background-color: var(--primary-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 12px 16px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--primary-dark);
    text-decoration: none;
}

/* Main Content Container */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
}

/* Page Banner Title (H1) */
.page-title-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.page-title-banner h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.page-title-banner p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Cards & Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
}

/* Responsive Tables to Cards for Mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: var(--radius);
    overflow: hidden;
}

table.data-table th, table.data-table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

table.data-table th {
    background-color: var(--primary-color);
    color: white;
}

/* Card view for tables on Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav.main-nav {
        display: none;
    }

    nav.main-nav.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links a {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Mobile Card Transformation for Tables */
    table.data-table-mobile-card, 
    table.data-table-mobile-card thead, 
    table.data-table-mobile-card tbody, 
    table.data-table-mobile-card th, 
    table.data-table-mobile-card td, 
    table.data-table-mobile-card tr {
        display: block;
    }

    table.data-table-mobile-card thead {
        display: none;
    }

    table.data-table-mobile-card tr {
        margin-bottom: 15px;
        background: var(--surface-color);
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        padding: 10px;
        box-shadow: var(--shadow-sm);
    }

    table.data-table-mobile-card td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 5px;
        text-align: right;
    }

    table.data-table-mobile-card td:last-child {
        border-bottom: none;
    }

    table.data-table-mobile-card td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        color: var(--primary-color);
        padding-right: 10px;
    }
}

/* Stats Styling */
.stat-box {
    text-align: center;
    padding: 15px;
    background: #eef6ff;
    border-radius: var(--radius);
    border: 1px solid #cce3de;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Random Links Footer Section */
.random-links {
    max-width: 1200px;
    margin: 30px auto 10px auto;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.random-links h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.random-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.random-links-list li a {
    font-size: 0.85rem;
    color: var(--primary-color);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: #e2e8f0;
    padding: 20px 16px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 30px;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
