:root {
    /* --- COLOUR PALETTE (From Logo) --- */
    --color-primary: #003b8e;     /* Deep Royal Blue from text */
    --color-secondary: #0088ff;   /* Glowing Blue from book */
    --color-accent: #115e59;      /* Deep Green from quill */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-text-main: #334155;
    --color-text-muted: #64748b;

    /* --- LAYOUT & SPACING --- */
    --max-width: 1120px;
    --radius-lg: 1.25rem;
    --radius-md: 0.875rem;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);

    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2.5rem;
    --space-2xl: 3.5rem;

    /* --- TYPOGRAPHY --- */
    --font-heading: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --text-sm: 0.875rem;  /* 14px */
    --text-base: 1rem;    /* 16px (Standard Body & Menu) */
    --text-lg: 1.125rem;
    --text-xl: 1.35rem;
    --text-2xl: 1.8rem;
    --text-3xl: 2.25rem;
}

/* ==========================================================================
   GLOBAL RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; color: var(--color-text-main); background-color: var(--color-bg); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 6rem; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; }
img { max-width: 100%; display: block; }
a { color: var(--color-secondary); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; }
p { margin: 0 0 var(--space-md); }
h1, h2, h3, h4 { margin: 0 0 var(--space-sm); font-family: var(--font-heading); color: var(--color-primary); line-height: 1.3; }

/* UTILITIES */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.text-center { text-align: center; }
.justify-center { justify-content: center; }

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background-color: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) 0; }

/* Brand / Logo Layout */
.brand { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; }
.brand-logo { height: 50px; width: auto; object-fit: contain; }

/* Wrapper for text to ensure alignment */
.brand-text-wrapper { display: flex; flex-direction: row; align-items: baseline; gap: 0.5rem; }
.brand-title { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg); color: var(--color-primary); white-space: nowrap; }
.brand-tagline { font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-text-muted); white-space: nowrap; margin-top: 0.15rem; }

/* Mobile Menu Toggle */
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--color-border); background-color: #ffffff; cursor: pointer; padding: 0; display: none; }
.nav-toggle-bar { width: 18px; height: 2px; border-radius: 999px; background-color: var(--color-text-main); margin: 0 auto; transition: transform 0.2s ease, opacity 0.15s ease; }

/* Desktop Navigation */
.site-nav { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--space-md); }
.nav-link { font-size: var(--text-base); font-weight: 500; color: var(--color-text-muted); padding: 0.35rem 0.25rem; border-radius: 999px; transition: all 0.16s ease; }
.nav-link:hover { color: var(--color-secondary); text-decoration: none; }
.nav-link-active { color: var(--color-secondary); font-weight: 700; }

/* Dropdown Menu */
.nav-item-has-dropdown { position: relative; }
.nav-dropdown-toggle { border: none; background: none; font: inherit; font-weight: 500; padding: 0.35rem 0.25rem; display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.nav-dropdown-caret { font-size: 0.65rem; }
.nav-dropdown { position: absolute; top: 100%; left: 0; margin-top: 0.35rem; min-width: 220px; padding: 0.35rem 0; background-color: #ffffff; border-radius: 0.75rem; border: 1px solid var(--color-border); box-shadow: var(--shadow-soft); display: none; z-index: 60; }
.nav-dropdown-link { display: block; padding: 0.45rem 0.9rem; font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; }
.nav-dropdown-link:hover { background-color: rgba(0, 136, 255, 0.06); color: var(--color-secondary); text-decoration: none; }
.nav-item-has-dropdown.is-open > .nav-dropdown { display: block; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid transparent; font-weight: 500; cursor: pointer; text-decoration: none; transition: all 0.15s ease; white-space: nowrap; font-size: var(--text-base); padding: 0.6rem 1.3rem; }
.nav-list .btn { margin-left: 0.5rem; } /* Spacing in menu */

.btn-primary { background-color: var(--color-secondary); color: #ffffff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background-color: #006bce; transform: translateY(-1px); color: #fff; text-decoration: none; }

.btn-secondary { background-color: #ffffff; color: var(--color-primary); border-color: rgba(148, 163, 184, 0.7); }
.btn-secondary:hover { background-color: #f9fafb; text-decoration: none; }

.btn-accent { background-color: var(--color-accent); color: #fff; box-shadow: var(--shadow-soft); }
.btn-accent:hover { background-color: #0f4f4b; transform: translateY(-2px); color: #fff; text-decoration: none;}

.btn-outline-light { background-color: transparent; color: #ffffff; border: 2px solid rgba(255, 255, 255, 0.8); }
.btn-outline-light:hover { background-color: #ffffff; color: var(--color-primary); text-decoration: none; }

.btn-lg { padding: 0.85rem 1.8rem; font-size: 1.1rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.9rem; }

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */
.hero-image-bg { background-size: cover; background-position: center; background-repeat: no-repeat; padding: var(--space-2xl) 0 6rem 0; color: #ffffff; }
.hero-image-bg h1 { color: #ffffff; font-size: var(--text-3xl); font-weight: 800; line-height: 1.2; margin-bottom: var(--space-md); text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-eyebrow { display: block; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.1em; color: #93c5fd; margin-bottom: var(--space-sm); font-weight: 600; }
.hero-lead { color: #f1f5f9; font-size: var(--text-lg); max-width: 800px; margin: 0 auto var(--space-xl) auto; text-shadow: 0 1px 5px rgba(0,0,0,0.5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-md); }

/* Stylish box for registered names/info in the hero */
.info-pill { margin-top: var(--space-xl); padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); display: flex; flex-wrap: wrap; gap: var(--space-xl); text-align: center; }
.pill-label { display: block; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; color: #93c5fd; }
.pill-main { margin: 0.2rem 0 0; font-weight: 600; color: #ffffff; }

/* ==========================================================================
   SECTIONS & LAYOUTS
   ========================================================================== */
.section { padding: var(--space-xl) 0; }
.section-alt { background-color: #ffffff; }
.section-header { margin-bottom: var(--space-xl); }
.section-header p { color: var(--color-text-muted); max-width: 40rem; margin: 0 auto; }

/* Grids */
.cards-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.content-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
.programmes-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }

/* Panels and Cards */
.content-panel { background-color: #ffffff; border-radius: var(--radius-md); padding: var(--space-lg); border: 1px solid var(--color-border); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03); }
.card { background-color: var(--color-surface); border-radius: var(--radius-md); padding: var(--space-lg); border: 1px solid var(--color-border); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03); }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-xs); }
.card p { font-size: var(--text-sm); color: var(--color-text-muted); }
.card-link { display: inline-flex; margin-top: var(--space-sm); font-size: var(--text-sm); font-weight: 600; }

.interactive-card { transition: transform 0.2s ease, box-shadow 0.2s ease; border-top: 4px solid transparent; }
.interactive-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-top-color: var(--color-secondary); }
.card-icon { font-size: 2.5rem; margin-bottom: var(--space-sm); }

/* Homepage Impact Strip */
.impact-strip { background-color: #ffffff; padding: var(--space-lg) 0; border-bottom: 1px solid var(--color-border); margin-top: -3rem; position: relative; z-index: 10; box-shadow: var(--shadow-soft); border-radius: var(--radius-lg); max-width: 900px; margin-left: auto; margin-right: auto; }
.impact-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: var(--space-md); text-align: center; }
.impact-number { display: block; font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--color-primary); line-height: 1; }
.impact-label { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Call to Action Strip */
.cta-strip { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #ffffff; padding: var(--space-2xl) 0;}
.cta-inner { display: flex; flex-direction: column; gap: var(--space-md); align-items: center; text-align: center;}
.cta-inner h2 { color: #ffffff; }
.cta-inner p { margin: 0; color: rgba(241, 245, 249, 0.9); max-width: 600px;}
.cta-action { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }

/* ==========================================================================
   LISTS & TYPOGRAPHY UTILS
   ========================================================================== */
.check-list, .dot-list { list-style: none; margin: var(--space-sm) 0 0; padding: 0; color: var(--color-text-muted); }
.check-list li, .dot-list li { position: relative; padding-left: 1.5rem; margin-top: 0.5rem; line-height: 1.5; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--color-secondary); font-weight: bold; }
.dot-list li::before { content: "•"; position: absolute; left: 0.1rem; top: -0.1rem; color: var(--color-secondary); font-size: 1.2rem; }

/* ==========================================================================
   FORMS (Contact Page)
   ========================================================================== */
.contact-form { display: grid; gap: var(--space-md); margin-top: var(--space-sm); }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: var(--text-sm); font-weight: 600; color: var(--color-text-main); }
.required { color: #dc2626; }

.form-input { font-family: var(--font-body); font-size: var(--text-base); padding: 0.6rem 0.75rem; border-radius: 0.5rem; border: 1px solid var(--color-border); background-color: #f8fafc; outline: none; transition: all 0.2s ease; }
.form-input:focus { border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15); background-color: #ffffff; }
.form-textarea { resize: vertical; min-height: 150px; }

.form-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-sm); margin-top: var(--space-sm); }
.form-note { font-size: 0.8rem; color: var(--color-text-muted); margin: 0; }
.honeypot { display: none !important; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background-color: #0f172a; color: #e5e7eb; padding-top: var(--space-xl); margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr); gap: var(--space-lg); padding-bottom: var(--space-lg); }
.footer-col h3, .footer-col h4 { color: #ffffff; margin-bottom: var(--space-sm); }
.footer-list { list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); }
.footer-list li + li { margin-top: 0.25rem; }
.footer-list a { color: #94a3b8; }
.footer-list a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(148, 163, 184, 0.2); padding: var(--space-md) 0; font-size: var(--text-sm); text-align: center; color: #64748b; }

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .site-nav { display: block; }
    
    .cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .programmes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .content-grid-2 { grid-template-columns: 1.2fr 1fr; align-items: start; gap: var(--space-xl); }
    .contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
    
    .cta-inner { flex-direction: row; justify-content: space-between; align-items: center; text-align: left;}
    .cta-action { justify-content: flex-start; }
    .footer-inner { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    /* Hide tagline to keep header clean when screen gets tight */
    .brand-tagline { display: none; } 
}

@media (max-width: 767.98px) {
    /* --- Nav toggle --- */
    .nav-toggle { display: inline-flex; }

    /* --- Nav panel: slide-down animation --- */
    .site-nav {
        position: absolute;
        inset: 100% var(--space-md) auto var(--space-md);
        background-color: #ffffff;
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        padding: 0;
        display: none;
        overflow: hidden;
    }
    .site-nav.is-open {
        display: block;
        animation: navSlideIn 0.2s ease forwards;
    }

    /* --- Nav list: vertical stack --- */
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }

    /* --- Nav links: full-width tappable rows --- */
    .nav-list > li > .nav-link {
        display: block;
        width: 100%;
        padding: 0.875rem 1rem;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
    }

    /* --- Dropdown toggle: full-width with caret right-aligned --- */
    .nav-dropdown-toggle {
        display: flex;
        width: 100%;
        padding: 0.875rem 1rem;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
        justify-content: space-between;
        text-align: left;
    }

    /* --- Programmes sub-menu: inline indented --- */
    .nav-dropdown {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--color-border);
        border-radius: 0;
        background-color: #f8fafc;
        padding: 0.25rem 0;
        min-width: unset;
        margin-top: 0;
    }
    .nav-item-has-dropdown.is-open > .nav-dropdown { display: block; }
    .nav-dropdown-link {
        display: block;
        padding: 0.6rem 1rem 0.6rem 2rem;
        font-size: var(--text-sm);
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    }
    .nav-dropdown li:last-child .nav-dropdown-link { border-bottom: none; }

    /* --- Donate button: full-width at bottom of panel --- */
    .nav-list .btn {
        display: flex;
        margin: 0.75rem;
        width: calc(100% - 1.5rem);
        justify-content: center;
        text-align: center;
    }

    /* --- Hero heading size --- */
    .hero-image-bg h1 { font-size: 2rem; }

    /* --- Hero buttons: centred --- */
    .hero-actions { justify-content: center; }

    /* --- Impact strip --- */
    .impact-strip { margin-top: -1.5rem; }
}

/* Hamburger → X animation */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Nav slide-in animation */
@keyframes navSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}