/* ==========================================================================
   Brindleford School — Stylesheet
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2D2D2D;
    background: #F8F7F4;
}

h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, "Times New Roman", serif;
    color: #1B3A5C;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

a { color: #1B3A5C; text-decoration: none; transition: color 0.2s; }
a:hover { color: #C8922A; }

img { max-width: 100%; height: auto; }

ul { list-style: none; }

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

/* --- Header --- */
.site-header {
    background: #1B3A5C;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.logo:hover { color: #C8922A; }

.logo img { border-radius: 4px; }

.logo-text { display: flex; flex-direction: column; }

.school-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 0.02em;
}

.school-motto {
    font-size: 0.75rem;
    opacity: 0.8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    gap: 4px;
}

.main-nav a {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.main-nav a.active {
    background: #C8922A;
    color: #fff;
}

/* --- Mobile Nav Toggle --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #1B3A5C 0%, #2E7D4F 100%);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 0.3em;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 1.5em;
}

.hero .btn {
    font-size: 1.05rem;
    padding: 14px 32px;
}

/* --- Page Banner (interior pages) --- */
.page-banner {
    background: #1B3A5C;
    color: #fff;
    padding: 50px 20px;
    text-align: center;
}

.page-banner h1 {
    color: #fff;
    margin-bottom: 0.2em;
}

.page-banner p {
    opacity: 0.85;
    font-size: 1.1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: #C8922A;
    color: #fff;
}

.btn-primary:hover { background: #b07e22; color: #fff; }

.btn-secondary {
    background: #fff;
    color: #1B3A5C;
    border: 2px solid #1B3A5C;
}

.btn-secondary:hover { background: #1B3A5C; color: #fff; }

/* --- Section Spacing --- */
.section {
    padding: 60px 0;
}

.section-alt {
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title p {
    color: #666;
    margin-top: 8px;
    font-size: 1.05rem;
}

/* --- Feature Cards (Home) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.feature-card h3 { margin-bottom: 10px; }

.feature-card p { color: #555; font-size: 0.95rem; }

/* --- News Cards --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.news-card-body {
    padding: 25px;
}

.news-card .date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 8px;
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.news-card h3 a { color: #1B3A5C; }
.news-card h3 a:hover { color: #C8922A; }

.news-card p { color: #555; font-size: 0.9rem; margin-bottom: 12px; }

.read-more {
    font-weight: 600;
    color: #C8922A;
    font-size: 0.9rem;
}

.read-more:hover { color: #1B3A5C; }

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, #C8922A 0%, #d4a545 100%);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
}

.cta-banner h2 { color: #fff; margin-bottom: 15px; }
.cta-banner p { margin-bottom: 25px; font-size: 1.1rem; opacity: 0.95; }

.cta-banner .btn {
    background: #1B3A5C;
    color: #fff;
}

.cta-banner .btn:hover { background: #142d48; color: #fff; }

/* --- Staff Grid --- */
.staff-section { margin-bottom: 50px; }

.staff-section h2 {
    border-bottom: 3px solid #C8922A;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.staff-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.staff-card:hover { transform: translateY(-3px); }

.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
}

.staff-card h3 { font-size: 1.1rem; margin-bottom: 4px; }

.staff-card .role {
    color: #C8922A;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.staff-card .bio { color: #555; font-size: 0.9rem; }

/* --- Content Pages --- */
.content-section {
    padding: 50px 0;
}

.content-section h2 {
    margin-top: 35px;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    max-width: 800px;
}

.content-section ul,
.content-section ol {
    margin: 0 0 20px 25px;
    list-style: disc;
}

.content-section ol { list-style: decimal; }
.content-section li { margin-bottom: 6px; }

/* --- Two Column Layout --- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Info Cards (Parents, Admissions) --- */
.info-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.info-card h3 {
    margin-bottom: 12px;
    border-left: 4px solid #C8922A;
    padding-left: 12px;
}

/* --- Term Dates Table --- */
.term-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}

.term-table th,
.term-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #E8E6E1;
}

.term-table th {
    background: #1B3A5C;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.term-table tr:last-child td { border-bottom: none; }
.term-table tr:hover td { background: #f5f4f0; }

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-details h3 { margin-bottom: 15px; }

.contact-details p {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.contact-details .label {
    font-weight: 600;
    color: #1B3A5C;
}

.map-placeholder {
    background: #E8E6E1;
    border-radius: 8px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
}

/* --- Article Page --- */
.article-header {
    margin-bottom: 30px;
}

.article-header .date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.article-header .author {
    color: #C8922A;
    font-weight: 600;
    font-size: 0.9rem;
}

.article-body p { margin-bottom: 18px; max-width: 750px; }
.article-body h2 { margin-top: 30px; }

.back-link {
    display: inline-block;
    margin-bottom: 25px;
    font-weight: 600;
    color: #C8922A;
}

.back-link:hover { color: #1B3A5C; }

/* --- Curriculum Grid --- */
.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.curriculum-card {
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 4px solid #2E7D4F;
}

.curriculum-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.curriculum-card p { font-size: 0.9rem; color: #555; }

/* --- News List (full page) --- */
.news-list-item {
    background: #fff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    gap: 25px;
    align-items: start;
    transition: transform 0.2s;
}

.news-list-item:hover { transform: translateX(4px); }

.news-list-date {
    flex-shrink: 0;
    text-align: center;
    background: #1B3A5C;
    color: #fff;
    border-radius: 6px;
    padding: 12px 16px;
    min-width: 70px;
}

.news-list-date .day {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.news-list-date .month {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.news-list-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
.news-list-content h3 a { color: #1B3A5C; }
.news-list-content h3 a:hover { color: #C8922A; }
.news-list-content p { color: #555; font-size: 0.95rem; }

/* --- Footer --- */
.site-footer {
    background: #1B3A5C;
    color: rgba(255,255,255,0.85);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.site-footer h3 {
    color: #C8922A;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.site-footer a {
    color: rgba(255,255,255,0.8);
}

.site-footer a:hover { color: #C8922A; }

.site-footer ul li { margin-bottom: 8px; }

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- Disclaimer Modal --- */
.disclaimer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInOverlay 0.4s ease;
}

.disclaimer-overlay.hidden { display: none; }

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

.disclaimer-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1);
    animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.disclaimer-stripe {
    height: 6px;
    background: linear-gradient(90deg, #c0392b 0%, #e74c3c 40%, #C8922A 100%);
}

.disclaimer-body {
    padding: 36px 40px 40px;
    text-align: center;
}

.disclaimer-badge {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.disclaimer-modal h2 {
    color: #1B3A5C;
    font-size: 1.65rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.disclaimer-divider {
    width: 50px;
    height: 3px;
    background: #C8922A;
    margin: 18px auto 20px;
    border-radius: 3px;
}

.disclaimer-modal p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin: 0 0 24px;
}

.disclaimer-portal {
    background: #f0f4f8;
    border: 1px solid #dce3ea;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 28px;
}

.disclaimer-portal span {
    display: block;
    font-size: 0.8rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 6px;
}

.disclaimer-portal a {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1B3A5C;
    text-decoration: none;
    transition: color 0.2s;
}

.disclaimer-portal a:hover { color: #C8922A; }

.disclaimer-btn {
    display: inline-block;
    width: 100%;
    padding: 16px 32px;
    background: #1B3A5C;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.1s;
}

.disclaimer-btn:hover {
    background: #142d48;
    transform: translateY(-1px);
}

.disclaimer-btn:active { transform: translateY(0); }

@media (max-width: 768px) {
    .disclaimer-body { padding: 28px 24px 32px; }
    .disclaimer-modal h2 { font-size: 1.35rem; }
    .disclaimer-portal a { font-size: 1.15rem; }
}

/* --- Not Found --- */
.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h2 { margin-bottom: 15px; }
.not-found p { margin-bottom: 25px; color: #666; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .features-grid,
    .news-grid,
    .staff-grid,
    .curriculum-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #1B3A5C;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

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

    .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .main-nav a {
        display: block;
        padding: 12px 20px;
        border-radius: 0;
    }

    .hero { padding: 50px 20px; }
    .hero h1 { font-size: 2rem; }

    .features-grid,
    .news-grid,
    .staff-grid,
    .curriculum-grid {
        grid-template-columns: 1fr;
    }

    .two-col,
    .contact-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .news-list-item {
        flex-direction: column;
        gap: 15px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}
