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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #22316C;
    background-color: #f9f9f9;
}

/* Typography */
h1, h2, h3, h4 {
    color: #C02C21;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Header & Logo */
header {
    background-color: #f9f9f9;
    color: #22316C;
    padding: 1.5rem 2rem; 
    display: flex;
    align-items: center;
    justify-content: space-between; 
    max-width: 1100px; 
    margin: 0 auto;    
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: block;
    margin-right: 2rem;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.header-logo {
    max-width: 140px; 
    height: auto;
    display: block;
}

.header-text {
    text-align: left;
}

header h1 {
    color: #C02C21;
    margin: 0;
    font-size: 3rem; 
    line-height: 1.2;
}

.subtitle {
    margin: 0.2rem 0 0 0;
    font-size: 1.5rem; 
    font-weight: 600;
}

.strapline {
    margin: 0;
    font-style: italic;
    font-size: 1.05rem;
}

/* Header Search Box */
.header-search form {
    display: flex;
    align-items: center;
}

.header-search input[type="text"] {
    padding: 0.4rem 1rem; 
    border: 2px solid #C02C21; 
    border-right: none;
    border-radius: 20px 0 0 20px; 
    outline: none;
    font-size: 0.9rem; 
    width: 160px; 
    color: #22316C;
}

.header-search input[type="text"]:focus {
    border-color: #22316C; 
}

.header-search button {
    padding: 0.4rem 1rem; 
    background-color: #C02C21; 
    color: white;
    border: 2px solid #C02C21;
    border-radius: 0 20px 20px 0; 
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; 
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.header-search button:hover {
    background-color: #a0241b; 
    border-color: #a0241b;
}

.header-search button svg {
    stroke: currentColor;
}

/* Navigation & Dropdowns */
nav {
    background-color: #C02C21;
    border-top: 10px solid #22316C;
    border-bottom: 10px solid #22316C;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background-color: #C02C21;
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 1rem 1.5rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown:hover > a {
    background-color: #a0241b;
    color: #fceceb;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #22316C; 
    min-width: 260px; 
    box-shadow: 0px 8px 16px 0px rgba(34, 49, 108, 0.25);
    z-index: 10;
    border-top: 10px solid #C02C21; 
    border-radius: 0 0 4px 4px;
}

.dropdown-content a {
    color: white; 
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15); 
    font-size: 0.95em;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #1a224c; 
    color: white;
}

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Main Layout Container */
.container {
    max-width: 1000px; 
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Photo Gallery (Homepage Slideshow - Updated for 3 Images) */
.hero-gallery {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 350px;
    margin: 0 auto 2rem auto;
    border-radius: 16px; 
    border-bottom: 4px solid #C02C21;
    overflow: hidden;
    background-color: #1a224c;
    box-shadow: 0 4px 8px rgba(34, 49, 108, 0.15);
}

.hero-gallery .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0; /* Base state is hidden */
    animation: crossfade3 15s infinite;
}

/* Negative delays ensure the animation starts correctly on page load */
.hero-gallery .slide-1 { animation-delay: 0s; }
.hero-gallery .slide-2 { animation-delay: -10s; }
.hero-gallery .slide-3 { animation-delay: -5s; }

@keyframes crossfade3 {
    0% { opacity: 1; }
    22% { opacity: 1; }
    33% { opacity: 0; }
    89% { opacity: 0; }
    100% { opacity: 1; }
}

/* Grid Layout for Homepage Content */
.content-grid {
    display: grid;
    grid-template-columns: 2.4fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.panel {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(34, 49, 108, 0.1);
}

.welcome-panel {
    background: white;
    border-radius: 12px;
    border: 2px solid #C02C21;
    position: relative;
    box-shadow: 0 4px 8px rgba(34, 49, 108, 0.1);
}

.welcome-header {
    background-color: #C02C21;
    padding: 1.5rem 1.5rem 1.5rem 230px; 
    border-radius: 9px 9px 0 0;
    min-height: 110px;
    display: flex;
    align-items: center;
}

.welcome-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

.welcome-content {
    padding: 1.2rem 2.5rem 2rem 2.5rem; 
    color: #4a5568; 
}

.headteacher-photo {
    float: left; 
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    margin-top: -120px; 
    margin-right: 20px; 
    margin-bottom: 5px; 
    position: relative;
    z-index: 5;
    shape-outside: circle(50%); 
    shape-margin: 15px; 
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.welcome-intro {
    font-weight: 600;
    color: #4a5568;
}

.highlight-blue {
    color: #1a224c; 
    font-weight: bold;
    font-size: 1.05rem;
}

.notice-board {
    background-color: #fdf5f5;
    border-left: 4px solid #C02C21;
}

.notice-board ul {
    list-style-type: none;
}

.notice-board li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.notice-board li:last-child {
    border-bottom: none;
}

.date-badge {
    font-weight: bold;
    color: #22316C;
    display: block;
    font-size: 0.9em;
}

/* Page Header (Subpages) */
.page-header {
    margin-bottom: 2rem;
    border-bottom: 4px solid #C02C21;
    padding-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #22316C;
    margin-bottom: 0.5rem;
}

/* Content Panels & Cards */
.content-panel {
    background: white;
    padding: 2.5rem 3rem 3rem 3rem; 
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(34, 49, 108, 0.1);
    margin-bottom: 3rem;
}

/* Content Sections (Term Dates, Lists) */
.content-group {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.content-group:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.content-group h2 {
    color: #22316C;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-list {
    list-style: none;
    padding: 0;
}

.content-list li {
    background-color: #f8fafc;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #22316C;
    color: #4a5568;
    line-height: 1.7;
    display: flex;
    align-items: center;
}

.content-list li strong {
    display: inline-block;
    color: #C02C21;
    font-size: 1.1rem;
    text-transform: uppercase;
    min-width: 150px;
    margin-right: 1rem;
}

/* Action Button Styling */
.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 1.8rem;
    background-color: #C02C21;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(192, 44, 33, 0.2);
    margin-top: 1rem;
}

.action-btn:hover {
    background-color: #a0241b;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 8px rgba(192, 44, 33, 0.3);
}

.action-btn svg {
    margin-right: 0.6rem;
}

/* Small Notice Board Button */
.notice-btn-small {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    font-size: 0.85em;
    background-color: #f8fafc;
    color: #22316C !important;
    text-decoration: none !important;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notice-btn-small:hover {
    background-color: #22316C;
    color: #ffffff !important;
    border-color: #22316C;
}

/* Church Layout: Two Columns */
.church-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.church-main {
    flex: 1;
}

.church-main p {
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.featured-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.church-sidebar {
    width: 320px;
    background-color: #fdf5f5;
    padding: 1.8rem;
    border-left: 5px solid #C02C21;
    border-radius: 0 8px 8px 0;
    flex-shrink: 0;
}

.church-sidebar h3 {
    color: #C02C21;
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #cbd5e0;
}

.link-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.link-list a {
    color: #22316C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: block;
    line-height: 1.4;
}

.link-list a:hover {
    color: #C02C21;
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #1a224c;
    color: white;
    padding: 1.5rem 2rem; 
    border-top: 3px solid #C02C21;
    line-height: 1.3; 
}

.footer-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text {
    text-align: center;
}

.footer-text strong, .footer-text p {
    color: white;
}

.footer-text p {
    margin-bottom: 0.3rem; 
}

.footer-buttons {
    position: absolute;
    right: 0;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-btn {
    height: 45px; 
    width: auto;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.footer-btn:hover {
    transform: scale(1.05);
}

/* Cookie Banner Styling */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #22316C;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100%); 
    transition: transform 0.4s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0); 
}

.cookie-banner p {
    margin: 0;
    font-size: 0.95rem;
    flex: 1;
    padding-right: 2rem;
    color: white;
}

.cookie-banner a {
    color: white;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.accept-btn {
    background-color: #C02C21;
    color: white;
}

.accept-btn:hover {
    background-color: #a0241b;
}

.decline-btn {
    background-color: white;
    color: #22316C;
}

.decline-btn:hover {
    background-color: #e2e8f0;
}

/* Responsive Design - Mobile Styling */
@media (max-width: 850px) {
    .church-layout {
        flex-direction: column;
        gap: 2rem;
    }
    .church-sidebar {
        width: 100%;
        border-left: none;
        border-top: 5px solid #C02C21;
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        align-items: center; 
        width: 100%;
        padding: 1.5rem;
    }
    
    .header-left {
        flex-direction: column;
        align-items: center; 
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .logo-link {
        margin: 0 0 1rem 0; 
    }
    
    .header-logo {
        max-width: 110px;
        display: block;
    }
    
    .header-text {
        text-align: center; 
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; 
    }
    
    header h1 {
        font-size: 2.4rem; 
    }
    
    .subtitle {
        font-size: 1.3rem; 
    }
    
    .header-search {
        width: 100%;
    }
    
    .header-search form {
        width: 100%;
        display: flex;
    }
    
    .header-search input[type="text"] {
        width: 100%;
        flex-grow: 1;
    }

    .hero-gallery {
        height: 200px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-links {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: #a0241b; 
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .dropdown {
        width: 100%;
        display: block;
    }
    
    .dropdown > a {
        padding: 0.85rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 1rem;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
    }
    
    .dropdown-content.show {
        display: block;
    }
    
    .dropdown-content a {
        padding: 0.6rem 1.5rem 0.6rem 2.5rem;
        background-color: #22316C; 
        color: white; 
        font-size: 0.9em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .welcome-header {
        padding: 1.2rem 1rem 1.2rem 100px; 
        text-align: left;
        min-height: 90px;
        align-items: center;
    }
    
    .welcome-header h2 {
        font-size: 1.3rem;
    }
    
    .headteacher-photo {
        float: none; 
        position: absolute;
        top: 1.2rem; 
        left: 1rem;
        margin: 0; 
        width: 75px;
        height: 75px;
        border: 2px solid white;
        shape-outside: none; 
    }
    
    .welcome-content {
        padding: 1.5rem;
    }

    .content-panel {
        padding: 1.5rem;
    }

    .content-list li {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2rem;
    }

    .content-list li strong {
        margin-bottom: 0.3rem;
    }

    .footer-container {
        flex-direction: column;
    }
    
    .footer-buttons {
        position: static;
        margin-top: 1.5rem;
        justify-content: center;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .cookie-banner p {
        padding-right: 0;
        margin-bottom: 1rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================= */
/* ZONE 4: PAGE-SPECIFIC STYLES              */
/* ========================================= */

/* --- OUR CHRISTIAN VISION PAGE --- */

/* Split Layout (Text beside Image) */
.split-layout { display: flex; gap: 3rem; align-items: center; }
.split-text { flex: 1; }
.split-image { flex: 1; text-align: center; }
.split-image img { max-width: 350px !important; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 8px 16px rgba(34, 49, 108, 0.15); }

/* Values Grid and Cards */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.value-card { background-color: #ffffff; border: 1px solid #e2e8f0; border-top: 5px solid #C02C21; border-radius: 8px; padding: 2rem 1.5rem; text-align: center; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); transition: transform 0.2s, box-shadow 0.2s; }
.value-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }
.term-badge { display: inline-block; background-color: #22316C; color: white; padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: bold; margin-bottom: 1rem; }
.value-card h4 { color: #C02C21; font-size: 1.4rem; margin-bottom: 1rem; }
.value-card p { font-size: 1rem; margin-bottom: 0; color: #4a5568; }

/* Responsive fixes for Christian Vision */
@media (max-width: 768px) {
    .split-layout { flex-direction: column; gap: 1.5rem; }
}

/* --- OUR STAFF PAGE --- */
.staff-panel {
    max-width: 900px;
    margin: 0 auto;
}

/* Card styling for each department */
.staff-group {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #22316C;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.staff-group h3 {
    color: #C02C21;
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 1.5rem;
}

/* Standard List Styling */
.staff-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.staff-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.staff-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Typography for Names and Roles */
.staff-name {
    font-weight: bold;
    color: #2d3748;
    font-size: 1.1rem;
}

.staff-role-label {
    color: #718096;
    font-size: 0.95rem;
    text-align: right;
    max-width: 60%;
}

/* Multi-column Grid specifically for Teaching Assistants */
.multicolumn-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.multicolumn-list li {
    display: block; /* Overrides the flexbox for standard lists */
    border-bottom: none;
    padding: 0.5rem;
    background-color: #f8fafc;
    border-radius: 6px;
    text-align: center;
}

.multicolumn-list .staff-name {
    display: block;
}

/* Mobile Responsiveness for Staff */
@media (max-width: 600px) {
    .staff-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .staff-role-label {
        text-align: left;
        max-width: 100%;
        font-style: italic;
    }
    .staff-group {
        padding: 1.5rem;
    }
}

/* --- ADMISSIONS PAGE --- */

/* Document Download Links */
.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    background-color: #f8fafc;
    color: #22316C;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.doc-btn svg {
    margin-right: 0.5rem;
    fill: #C02C21;
}

.doc-btn:hover {
    background-color: #22316C;
    color: #ffffff;
    border-color: #22316C;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.15);
}

/* Important Highlight Box */
.highlight-box {
    background-color: #fdf5f5;
    border-left: 5px solid #C02C21;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

.highlight-box p {
    margin: 0;
    color: #a0241b;
    font-weight: 600;
    font-size: 1.05rem;
}

/* --- GOVERNORS PAGE / SHARED COMPONENTS --- */

/* Single Box for Standard Bullet Lists */
.single-box-list {
    background-color: #f8fafc;
    padding: 2rem 2rem 2rem 3rem;
    border-radius: 8px;
    border-left: 4px solid #22316C;
    color: #4a5568;
}

.single-box-list ul {
    margin: 0;
    padding: 0;
    list-style-type: disc;
}

.single-box-list li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.single-box-list li:last-child {
    margin-bottom: 0;
}

/* --- POLICIES PAGE --- */

.policy-grid {
    display: grid;
    /* This automatically creates as many columns as will fit, ensuring they never get too narrow on mobile */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.policy-link {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    color: #22316C;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.policy-link svg {
    flex-shrink: 0;
    margin-right: 1rem;
    fill: #C02C21; /* Colors the document icon in your school's red */
    transition: transform 0.2s ease;
}

.policy-link:hover {
    border-color: #22316C;
    background-color: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(34, 49, 108, 0.1);
    color: #C02C21;
}

.policy-link:hover svg {
    transform: scale(1.1);
}

/* --- INSPECTION & RESULTS PAGE / TABLES --- */

.table-subtitle {
    font-size: 0.95rem;
    color: #718096;
    font-style: italic;
    margin-top: -1rem; /* Pulls it up closer to the h3 heading */
    margin-bottom: 1rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto; /* Allows the table to swipe sideways on tiny phone screens */
    margin-bottom: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    text-align: left;
    min-width: 600px; /* Ensures the table doesn't squish too tightly on mobile */
}

.data-table thead {
    background-color: #22316C;
}

.data-table th {
    color: #ffffff;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

/* Removes the border on the very last row so it looks clean */
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Adds a subtle hover effect to rows for easier reading */
.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* --- SEND PAGE / SIDEBAR LAYOUT --- */

.layout-with-sidebar {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.main-text {
    flex: 1; /* Takes up all the remaining space on the left */
}

.sidebar-links {
    width: 320px; /* Locks the right column to a fixed width */
    flex-shrink: 0;
    background-color: #f8fafc;
    padding: 1.8rem;
    border-radius: 8px;
    border-top: 5px solid #22316C;
}

.sidebar-links h3 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    color: #C02C21;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Forces the document buttons to stack vertically instead of wrapping */
.vertical-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vertical-links .doc-btn {
    width: 100%;
    justify-content: flex-start; /* Keeps the icon and text aligned to the left */
}

/* Responsive: Stacks the columns on top of each other on smaller screens */
@media (max-width: 850px) {
    .layout-with-sidebar {
        flex-direction: column;
        gap: 2rem;
    }
    .sidebar-links {
        width: 100%;
        border-top: none;
        border-left: 5px solid #22316C;
    }
}

/* ========================================= */
/* --- CLASS BLOG PAGES / EVENT CARDS ---    */
/* ========================================= */

.intro-text {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* The main container for each event */
.event-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #22316C; /* St Eanswythe Blue */
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.05);
}

/* Flexbox to keep the title on the left and date on the right */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
}

.event-header h2 {
    margin: 0; /* Removes default margin so it aligns perfectly with the date */
    color: #C02C21;
    padding-right: 1rem;
}

/* Styles the date into a neat little badge */
.event-date {
    display: inline-flex;
    align-items: center;
    background-color: #f8fafc;
    color: #4a5568;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap; /* Stops the date from breaking onto two lines */
}

.event-date svg {
    margin-right: 0.5rem;
    color: #22316C;
}

.event-text p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 0;
}

/* CSS Grid for the 3-across photo layout */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 1rem; /* Space between photos */
    margin-top: 2rem;
}

.photo-gallery img {
    width: 100%;
    height: 220px; /* Locks all images to the same height */
    object-fit: cover; /* Crops the images perfectly so they don't stretch */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.photo-gallery img:hover {
    transform: scale(1.02); /* Slight zoom effect when a parent hovers over a photo */
}

/* Responsive Rules for Mobile Phones */
@media (max-width: 768px) {
    .event-card {
        padding: 1.5rem;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start; /* Stacks the title and date on mobile */
        gap: 1rem;
    }

    .photo-gallery {
        grid-template-columns: 1fr; /* Changes from 3-across to 1-across on phones */
    }
    
    .photo-gallery img {
        height: auto; /* Lets the images size naturally on mobile */
    }
}

/* ========================================= */
/* --- SCHOOL MEALS PAGE ---                 */
/* ========================================= */

/* Grid layout to display the 5 days in a neat wrapping format */
.menu-week-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Individual day card styling */
.menu-day {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 5px solid #22316C; /* St Eanswythe Blue */
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-day:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(34, 49, 108, 0.1);
}

.day-title {
    color: #C02C21; /* St Eanswythe Red */
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #edf2f7;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meal-option {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    padding: 0.5rem 0;
}

/* Styles the 'OR' text into a neat divider with lines on the sides */
.meal-or {
    text-align: center;
    font-weight: bold;
    color: #a0aec0;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-or::before,
.meal-or::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 2px;
    background-color: #edf2f7;
    margin: 0 10px;
}

/* Pushes the dessert to the bottom of the card and gives it a dashed line */
.meal-dessert {
    margin-top: auto; /* Automatically pushes this to the very bottom */
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px dashed #cbd5e0;
    color: #22316C;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

/* The healthy food notice box */
.notice-box {
    background-color: #eef2fa; /* Very light blue */
    border-left: 5px solid #22316C;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2.5rem 0;
    color: #2d3748;
}

.notice-box p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ========================================= */
/* --- CONTACT US PAGE ---                   */
/* ========================================= */

/* 50/50 split for the contact info and the map */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
}

.contact-info a {
    color: #C02C21;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-info a:hover {
    color: #22316C;
    text-decoration: underline;
}

/* Styling for the Key Contacts list */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    padding: 1rem 0;
    border-bottom: 1px dashed #cbd5e0;
    display: flex;
    flex-direction: column;
}

.contact-list li:last-child {
    border-bottom: none;
}

.contact-list strong {
    color: #22316C;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

/* Map container styling */
.map-container {
    width: 100%;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.05);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Ensure headings inside notice boxes don't have awkward gaps */
.notice-box h3 {
    margin-top: 0;
}

/* Responsive: Stacks the text on top of the map on phones */
@media (max-width: 850px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .map-container {
        height: 400px; /* Gives the map a fixed height when stacked */
    }
}

/* --- SCHOOL CLUBS PAGE --- */
.club-note {
    display: block;
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
    margin-top: 0.2rem;
    font-weight: normal;
}

/* ========================================= */
/* --- CURRICULUM PAGE GRIDS ---             */
/* ========================================= */

/* Main Subject Cards (Bold & Colorful) */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.subject-btn {
    background-color: #2b6cb0; /* Adjust to match your school blue if needed */
    color: #ffffff;
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.subject-btn:hover {
    background-color: #1a4971;
    transform: translateY(-3px);
}

/* Class Map Buttons (Clean & Outlined) */
.class-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.class-map-btn {
    background-color: #f7fafc;
    border: 2px solid #cbd5e0;
    color: #2d3748;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.class-map-btn:hover {
    background-color: #ebf8ff;
    border-color: #3182ce;
}

/* ========================================= */
/* --- NEWSLETTER DROP-DOWN STRIP ---        */
/* ========================================= */

.archive-dropdown {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 2.5rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.archive-dropdown summary {
    background-color: #22316C; /* St Eanswythe Blue */
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    list-style: none; /* Removes the default black arrow in most browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide the default webkit triangle (for Safari/Chrome) */
.archive-dropdown summary::-webkit-details-marker {
    display: none;
}

/* Add our own custom red arrow that flips when open */
.archive-dropdown summary::after {
    content: '▼';
    font-size: 0.9rem;
    color: #C02C21; /* St Eanswythe Red */
    transition: transform 0.3s ease;
}

.archive-dropdown[open] summary::after {
    transform: rotate(180deg);
}

.archive-dropdown[open] {
    box-shadow: 0 4px 6px rgba(34, 49, 108, 0.1);
    border-color: #22316C;
}

/* Adjust the inner links to sit nicely inside the open strip */
.archive-dropdown .doc-links {
    padding: 1.5rem 1rem 0.5rem 1rem;
    margin-bottom: 0;
    border-bottom: none;
}
