:root {
    --color-primary: #002147;
    --color-accent: #a2c0ac;
    --color-bg: #f8fafc;
    --color-text: #002147;
    --color-heading: #002147;
    --color-btn-primary: #002147;
    --color-btn-primary-hover: #1a335c;
    --color-btn-accent: #a2c0ac;
    --color-btn-accent-hover: #7fa18d;
    --color-link: #002147;
    --color-link-hover: #a2c0ac;
    --color-footer-bg: #002147;
    --color-footer-text: #fff;
    --color-footer-link: #a2c0ac;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-logo a:hover {
    color: var(--color-accent);
}

.logo-img {
    height: 36px;
    margin-right: 10px;
    vertical-align: middle;
}

.company-name {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--color-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--color-link-hover);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero, .rankings-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
    color: white;
    padding-top: 70px;
    position: relative;
    z-index: 10;
}

/* Ensure methodology content doesn't interfere with hero */
.methodology-content {
    padding: 80px 0;
    background: #fff;
    position: relative;
    z-index: 1;
}

/* Force rankings-hero to have proper background */
.rankings-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
    background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
    color: #e6f0eb;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-btn-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 33, 71, 0.15);
}

.btn-secondary {
    background: var(--color-btn-accent);
    color: var(--color-primary);
    border: 2px solid var(--color-btn-accent);
}

.btn-secondary:hover {
    background: var(--color-btn-accent-hover);
    color: #fff;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease 0.6s both;
}

/* Education Icon Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0.8rem;
    width: 400px;
    height: 400px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.grid-item i {
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.grid-item:hover i {
    transform: scale(1.2);
    color: var(--color-accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .education-grid {
        width: 350px;
        height: 350px;
        gap: 0.6rem;
    }
    
    .grid-item i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .education-grid {
        width: 280px;
        height: 280px;
        gap: 0.5rem;
    }
    
    .grid-item i {
        font-size: 1.1rem;
    }
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--color-heading);
}

/* About Section */
.about {
    background: var(--color-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--color-text);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 33, 71, 0.10);
}

.feature i {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
}

.feature p {
    color: var(--color-text);
}

/* Services Section */
.services {
    background: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    padding: 2.5rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 33, 71, 0.10);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #fff;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

.service-card p {
    color: var(--color-text);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background: var(--color-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--color-primary);
    width: 50px;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--color-heading);
}

.contact-item p {
    color: var(--color-text);
}

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--color-heading);
    font-size: 1.3rem;
}

/* Footer */
.footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--color-footer-text);
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--color-footer-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #fff;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Active navigation link */
.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    width: 100%;
} 

/* Rankings table styling */
.rankings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed; /* Fixed layout for consistent column widths */
}

/* Detailed view table specific width */
#rankingsTable1 {
    width: 100% !important; /* Use available container width */
    max-width: 1200px !important; /* Respect container constraint */
    table-layout: fixed !important;
}



/* Table container to handle horizontal scroll */
.table-container {
    overflow-x: auto;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Specific table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    margin: 20px 0;
}

.rankings-table th {
    background: var(--color-primary);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

        .rankings-table td {
            padding: 8px;
            text-align: center;
            vertical-align: middle;
            border-bottom: 2px solid #e5e7eb;
            border-right: 1px solid #e5e7eb;
            height: 40px; /* Fixed height for all cells */
        }

        /* Default View - smaller row height */
        #rankingsTable2 td {
            height: 32px; /* Smaller height for Default View */
            padding: 6px 8px; /* Slightly reduced padding */
        }

        /* Emphasize Scaled Z Total Score in Default View */
        #rankingsTable2 td:nth-child(3) {
            font-weight: 700; /* Bold */
            font-size: 1.1em; /* Larger text */
        }

        /* All numbers in both tables */
        .rankings-table td {
            color: #002147;
        }

        /* Keep school names in original color */
        .rankings-table td.school-name {
            color: var(--color-text);
        }

        /* School link styling */
        .rankings-table .school-link {
            color: var(--color-primary);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .rankings-table .school-link:hover {
            color: var(--color-accent);
            text-decoration: underline;
        }

.rankings-table tr:last-child td {
    border-bottom: none;
}

.rankings-table td:last-child {
    border-right: none;
}

/* No color banding - all rows have same background */

/* Hover effect for better row identification */
.rankings-table tr:hover {
    background: #f8fafc;
}

/* Z-score chart columns - center the chart and label */
.rankings-table td:nth-child(4),
.rankings-table td:nth-child(6),
.rankings-table td:nth-child(9) {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    min-height: 40px; /* Ensure enough height for chart + label */
}

/* Distribution chart styling */
.distribution-chart {
    width: 100%;
    height: 40px;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

/* Filter controls styling - with !important to override inline styles */
.filter-controls {
    display: flex !important;
    align-items: flex-end !important;
    gap: 15px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    padding: 1.5rem !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb !important;
    flex-wrap: nowrap !important;
}

.filter-group {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 3px !important;
}

.filter-group label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--color-primary) !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
}

.filter-group select {
    padding: 8px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    background: white !important;
    color: var(--color-text) !important;
    cursor: pointer !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.filter-group select:hover {
    border-color: var(--color-accent) !important;
}

.filter-group select:focus {
    outline: none !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1) !important;
}

/* Reset button styling */
.filter-controls .btn-secondary {
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    height: 42px !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.distribution-curve {
    width: 100%;
    height: 100%;
}

.curve-path {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.5;
}

.z-point {
    fill: var(--color-primary);
    stroke: white;
    stroke-width: 2;
    r: 3;
}

.chart-label {
    font-size: 0.7rem;
    color: var(--color-text);
    text-align: center;
    margin-top: 0.25rem;
    font-weight: 500;
    line-height: 1;
    overflow: hidden;
    white-space: nowrap;
}

/* Default View (Scaled Rankings) column coloring */
/* Scaled Z Total Score - same as school name (no background) */
#rankingsTable2 td:nth-child(3) {
    background-color: transparent;
}
/* Scaled Z Top Grade Rate - light blue */
#rankingsTable2 td:nth-child(4) {
    background-color: rgba(135, 206, 235, 0.2); /* Sky blue */
}
/* Scaled Z A-Level Value Added - light green */
#rankingsTable2 td:nth-child(5) {
    background-color: rgba(144, 238, 144, 0.25); /* Light green */
}
/* Scaled Z Oxbridge Adjusted - light purple */
#rankingsTable2 td:nth-child(6) {
    background-color: rgba(147, 112, 219, 0.15); /* Light purple */
}

/* Default View (Scaled Rankings) header styling */
/* Scaled Z Total Score header - same as school name (no background) */
#rankingsTable2 th:nth-child(3) {
    background-color: var(--color-primary) !important;
    color: white !important;
    border-right: 1px solid #e5e7eb;
}
/* Scaled Z Top Grade Rate header - blue */
#rankingsTable2 th:nth-child(4) {
    background-color: rgba(135, 206, 235, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(135, 206, 235, 1);
}
/* Scaled Z A-Level Value Added header - green */
#rankingsTable2 th:nth-child(5) {
    background-color: rgba(144, 238, 144, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(144, 238, 144, 1);
}
/* Scaled Z Oxbridge Adjusted header - purple */
#rankingsTable2 th:nth-child(6) {
    background-color: rgba(147, 112, 219, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(147, 112, 219, 1);
}

/* Detailed View (Original Rankings) column coloring */
/* Columns 1-3: Rank, School Name, Total Score - White background */
#rankingsTable1 td:nth-child(1),
#rankingsTable1 td:nth-child(2),
#rankingsTable1 td:nth-child(3) {
    background-color: white;
}

/* Columns 4-5: Top Grade Rate, Top Grade Z-Score - Light blue */
#rankingsTable1 td:nth-child(4),
#rankingsTable1 td:nth-child(5) {
    background-color: rgba(135, 206, 235, 0.2); /* Sky blue */
}

/* Columns 6-7: A-level Value Added, A-level Value Z-Score - Light green */
#rankingsTable1 td:nth-child(6),
#rankingsTable1 td:nth-child(7) {
    background-color: rgba(144, 238, 144, 0.25); /* Light green */
}

/* Columns 8-10: Oxbridge Rate 2024, Oxbridge Offers 2024, Oxbridge Z-Score - Light purple */
#rankingsTable1 td:nth-child(8),
#rankingsTable1 td:nth-child(9),
#rankingsTable1 td:nth-child(10) {
    background-color: rgba(147, 112, 219, 0.15); /* Light purple */
}

/* Detailed View (Original Rankings) header styling */
/* Columns 1-3: Rank, School Name, Total Score - Navy Blue */
#rankingsTable1 th:nth-child(1),
#rankingsTable1 th:nth-child(2),
#rankingsTable1 th:nth-child(3) {
    background-color: #002147 !important;
    color: white !important;
    border-right: 1px solid #e5e7eb;
}

/* Columns 4-5: Top Grade Rate, Top Grade Z-Score - Light Blue */
#rankingsTable1 th:nth-child(4),
#rankingsTable1 th:nth-child(5) {
    background-color: rgba(135, 206, 235, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(135, 206, 235, 1);
}

/* Columns 6-7: A-level Value Added, A-level Value Z-Score - Green */
#rankingsTable1 th:nth-child(6),
#rankingsTable1 th:nth-child(7) {
    background-color: rgba(144, 238, 144, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(144, 238, 144, 1);
}

/* Columns 8-10: Oxbridge Rate 2024, Oxbridge Offers 2024, Oxbridge Z-Score - Purple */
#rankingsTable1 th:nth-child(8),
#rankingsTable1 th:nth-child(9),
#rankingsTable1 th:nth-child(10) {
    background-color: rgba(147, 112, 219, 0.8) !important;
    color: #333 !important;
    border-right: 2px solid rgba(147, 112, 219, 1);
}

/* Detailed View (rankingsTable1) - Column widths that fit within 1200px */
#rankingsTable1 th:nth-child(1) { width: 5%; }    /* Rank - 60px */
#rankingsTable1 th:nth-child(2) { width: 18%; }   /* School Name - 216px */
#rankingsTable1 th:nth-child(3) { width: 7%; }    /* Total Score - 84px */
#rankingsTable1 th:nth-child(4) { width: 9%; }    /* Top Grade Rate - 108px */
#rankingsTable1 th:nth-child(5) { width: 10%; }   /* Top Grade Z-Score - 120px */
#rankingsTable1 th:nth-child(6) { width: 10%; }   /* A-level Value Added - 120px */
#rankingsTable1 th:nth-child(7) { width: 10%; }   /* A-level Value Z-Score - 120px */
#rankingsTable1 th:nth-child(8) { width: 10%; }   /* Oxbridge Rate 2024 - 120px */
#rankingsTable1 th:nth-child(9) { width: 11%; }   /* Oxbridge Offers 2024 - 132px */
#rankingsTable1 th:nth-child(10) { width: 10%; }  /* Oxbridge Z-Score - 120px */

/* Methodology Page Styles */
.methodology-content {
    padding: 80px 0;
    background: #fff;
}

.methodology-section {
    margin-bottom: 60px;
}

.methodology-section h2 {
    color: var(--color-primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.methodology-section h3 {
    color: var(--color-primary);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.methodology-section h4 {
    color: var(--color-text);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.methodology-section p {
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.metric-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid var(--color-primary);
}

.metric-category h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.metric-category p {
    margin-bottom: 0;
    font-size: 1rem;
}

.ranking-categories,
.limitations,
.updates {
    list-style: none;
    padding: 0;
}

.ranking-categories li,
.limitations li,
.updates li {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    margin: 0.8rem 0;
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.ranking-categories li strong {
    color: var(--color-primary);
}

.mapping-details {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.mapping-details li {
    background: #f0f8ff;
    padding: 0.8rem 1.2rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
}

.mapping-details li:before {
    content: "✓";
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

.notation-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.notation-list li {
    background: #f8f9fa;
    padding: 0.8rem 1.2rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: 'Times New Roman', serif;
}

.notation-list li:before {
    content: "→";
    color: var(--color-primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .methodology-section h2 {
        font-size: 1.8rem;
    }
    
    .methodology-section h3 {
        font-size: 1.4rem;
    }
    
    .methodology-section h4 {
        font-size: 1.2rem;
    }
    
    .methodology-section p {
        font-size: 1rem;
    }
    
    .metric-category {
        padding: 1.2rem;
    }
}

/* Math Formula Styling */
.math-formula {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.math-formula .MathJax {
    font-size: 1.2em;
}

/* Ensure MathJax displays properly */
.MathJax_Display {
    margin: 1rem 0;
}

.MathJax {
    color: var(--color-primary);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
    gap: 1.5rem;
}

.pagination-info {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn.active {
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: 600;
}

.pagination-ellipsis {
    color: #64748b;
    font-weight: 500;
    padding: 0 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    height: 44px;
}

.pagination-page {
    color: #475569;
    font-weight: 500;
    font-size: 1rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .pagination-controls {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 40px;
        height: 40px;
    }
    
    .pagination-ellipsis {
        height: 40px;
        font-size: 0.9rem;
    }
    
    .pagination-info {
        font-size: 0.9rem;
    }
}

 