/*
 * Shared site stylesheet for Kambia Development Foundation.
 * All pages link to this one file for consistent styling.
 * Update this file to change global colors, spacing, typography,
 * or the layout for header/footer sections used across the site.
 */
:root {
    --bg: #f7f9f3;
    --surface: #ffffff;
    --text: #152f1b;
    --muted: #5a6d58;
    --accent: #1e7c31;
    --accent-soft: #d9efd9;
    --border: #d7e4d7;
    --radius: 26px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-family, Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    font-size: 16px;
    line-height: 1.65;
    transition: background 0.3s ease, color 0.3s ease;
}

:root.dark-theme {
    --bg: #121212;
    --surface: #1d1d1d;
    --text: #f3f4f6;
    --muted: #c1c7cd;
    --accent: #66d5a5;
    --accent-soft: #183c28;
    --border: #2c2c2c;
}

.page {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 0 24px 48px;
}
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(17, 49, 29, 0.08);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.theme-toggle,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(31, 56, 37, 0.14);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.theme-toggle:hover,
.theme-toggle:focus-visible,
.menu-toggle:hover,
.menu-toggle:focus-visible {
    transform: translateY(-1px);
    border-color: var(--accent);
}
.theme-toggle i {
    font-size: 1rem;
}

.brand a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
}

.logo-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
}
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(31, 56, 37, 0.14);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
    transform: translateY(-1px);
    border-color: var(--accent);
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    margin: 4px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}
.main-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 14px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 2px;
}
.main-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible {
    color: #0c2c13;
    background: rgba(31,138,50,0.12);
    border-radius: 999px;
}
.main-nav a.active {
    color: #0c2c13;
    background: rgba(31,138,50,0.18);
}
.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    min-height: clamp(640px, 74vh, 840px);
    padding: 56px 0 82px;
    border-radius: 36px;
    overflow: hidden;
    background-image: linear-gradient(180deg, rgba(10, 36, 16, 0.48), rgba(10, 36, 16, 0.88)), url('../images/back.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(113, 199, 101, 0.18), transparent 30%), radial-gradient(circle at bottom right, rgba(48, 114, 57, 0.16), transparent 34%);
}
.hero-content,
.hero-highlight {
    position: relative;
    z-index: 1;
}
.hero-content {
    max-width: 720px;
}
.eyebrow {
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.34em;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.82);
}
.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 5vw, 4.4rem);
    line-height: 1.03;
    max-width: 11ch;
}
.hero-copy {
    margin: 28px 0 0;
    max-width: 680px;
    font-size: 1.08rem;
    color: rgba(255,255,255,0.93);
}
.hero-actions {
    margin-top: 42px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #69b15d);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    min-width: 190px;
    box-shadow: 0 20px 45px rgba(31,138,50,0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button-primary:hover,
.button-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 48px rgba(31,138,50,0.24);
}
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 34px;
    border-radius: 999px;
    background: #22373f;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 16px 30px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button-secondary:hover,
.button-secondary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(0,0,0,0.12);
    background: #1b2b33;
}
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 34px;
    border-radius: 999px;
    background: #bf2f2a;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 16px 28px rgba(192,57,43,0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.button-danger:hover,
.button-danger:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(192,57,43,0.2);
    background: #992b24;
}
.button-primary[disabled],
.button-disabled,
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}
.inline-form {
    display: inline-block;
    margin: 0;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.flex-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.text-center {
    text-align: center;
}
.select-inline {
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #d8e7d7;
}
.mt-20 {
    margin-top: 20px;
}
.admin-notice--error {
    background: #fdecea;
    color: #a33;
    border-color: #f5c6cb;
}
.hero-highlight {
    max-width: 520px;
    margin-top: 48px;
    padding: 34px 34px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 36px;
    backdrop-filter: blur(12px);
}
.hero-highlight p {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.92);
    line-height: 1.9;
}
.section {
    padding: 72px 0;
}
.section-title-wrap {
    max-width: 760px;
    margin-bottom: 32px;
}
.section-title-wrap h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    font-weight: 700;
    color: var(--text);
}
.featured-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.75fr 1fr;
    align-items: start;
}
.featured-panel-group {
    display: grid;
    gap: 24px;
}
.featured-card,
.panel {
    background: var(--surface);
    border: 1px solid rgba(41, 98, 55, 0.12);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 18px 34px rgba(18, 46, 26, 0.06);
}
.latest-news {
    display: grid;
    gap: 18px;
}
.news-card {
    padding: 24px;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(151, 183, 159, 0.18);
    box-shadow: 0 16px 30px rgba(20, 56, 27, 0.05);
}
.news-card h3 {
    margin: 0 0 12px;
    font-size: 1.3rem;
    color: var(--text);
}
.news-card p {
    margin: 0;
    color: #556a58;
    line-height: 1.8;
}
.panel h3 {
    margin: 0 0 16px;
    font-size: 1.3rem;
    color: #1f3b24;
}
.panel p {
    margin: 0 0 20px;
    color: #5e6e5d;
    line-height: 1.8;
}
.panel-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
.panel-link:hover,
.panel-link:focus-visible {
    color: #166026;
    text-decoration: underline;
}
.contact-panel {
    background: #f7faf5;
}
.admin-notice {
    margin: 0 0 24px;
    padding: 20px 26px;
    border-radius: 26px;
    background: #eaf4df;
    color: #1a431f;
    border: 1px solid rgba(126, 171, 118, 0.2);
    box-shadow: 0 14px 28px rgba(18, 47, 24, 0.08);
}
.stats-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-panel {
    background: var(--surface);
    border: 1px solid rgba(43, 84, 52, 0.12);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 16px 32px rgba(17, 42, 23, 0.06);
}
.stats-panel .panel-label {
        margin: 0 0 8px;
        font-weight: 700;
        color: #5e6e5d;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        font-size: 0.82rem;
    }
    .stats-panel .panel-value {
        margin: 0 0 12px;
        font-size: 3rem;
        font-weight: 800;
        color: var(--accent);
        line-height: 1;
    }
    .admin-form {
        display: grid;
        gap: 18px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 28px;
        box-shadow: 0 18px 36px rgba(31, 56, 37, 0.06);
    }
    .admin-form label {
        font-weight: 700;
        color: #1f3b24;
        font-size: 0.95rem;
    }
    .admin-form input,
    .admin-form textarea,
    .admin-form select {
        width: 100%;
        padding: 16px 18px;
        border: 1px solid #d8e7d7;
        background: #f8fbf7;
        border-radius: 18px;
        font-size: 1rem;
        color: var(--text);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .admin-form input:focus,
    .admin-form textarea:focus,
    .admin-form select:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 4px rgba(31, 138, 50, 0.12);
    }
    .admin-form textarea {
        min-height: 160px;
        resize: vertical;
    }
    .checkbox-label {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        color: var(--text);
        font-weight: 600;
    }
    .gallery-preview-container,
    #upload-files-list {
        margin-top: 20px;
        display: grid;
        gap: 18px;
    }
    .gallery-preview-grid {
        display: grid;
        gap: 18px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .gallery-preview-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .gallery-upload-hint {
        margin: 0;
        padding: 24px;
        border-radius: 24px;
        background: #f5fbf6;
        color: #4d6c4d;
        border: 1px dashed #d4e8d4;
        text-align: center;
    }
    .preview-item {
        overflow: hidden;
        border-radius: 24px;
        background: #fbfdf7;
        border: 1px solid #e6efe1;
    }
    .preview-item .gallery-image,
    .gallery-grid .gallery-image {
        width: 100%;
        height: 260px;
        object-fit: cover;
        display: block;
        border-radius: 0;
    }
    .gallery-grid {
        display: grid;
        gap: 18px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .gallery-grid .gallery-image {
        border-radius: 24px;
    }
    @media (max-width: 800px) {
        .preview-item .gallery-image,
        .gallery-grid .gallery-image {
            height: 200px;
        }
    }
    .data-table {
        width: 100%;
        border-collapse: collapse;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 24px;
        overflow: hidden;
    }
    .data-table th,
    .data-table td {
        padding: 18px 20px;
        border-bottom: 1px solid #eef3ed;
    }
    .data-table th {
        background: #f4faf3;
        color: #1f3b24;
        font-weight: 700;
        text-align: left;
    }
    .data-table tbody tr:last-child td {
        border-bottom: none;
    }
    .item-card {
        background: #ffffff;
        border: 1px solid rgba(84, 129, 98, 0.16);
        border-radius: 28px;
        padding: 24px;
        max-width: 700px;
        box-shadow: 0 14px 28px rgba(17, 42, 23, 0.06);
    }
    .item-card h3 {
        margin-top: 0;
        margin-bottom: 12px;
        color: var(--text);
    }
    .item-card p {
        margin: 0;
        color: var(--muted);
        line-height: 1.8;
    }
}
.program-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.program-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 18px 32px rgba(31,56,37,0.06);
}
.program-card h3 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #1f3b24;
}
.program-card p {
    margin: 0 0 18px;
    color: #5e6e5d;
    line-height: 1.8;
}
.program-languages {
    margin: 0;
    color: #2f5d2e;
    font-weight: 700;
}
.contact-section {
    background: linear-gradient(180deg, rgba(241, 250, 239, 0.95), rgba(243, 247, 240, 1));
}
.contact-section .section-title-wrap {
    max-width: 700px;
}
.section-copy {
    margin: 18px 0 0;
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 640px;
    line-height: 1.8;
}
.contact-form-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.25fr);
    align-items: start;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    min-height: auto;
}
.contact-card strong {
    display: block;
    margin-bottom: 12px;
    color: #1f3b24;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}
.contact-card p {
    margin: 0 0 18px;
    color: #5e6e5d;
    line-height: 1.8;
}
.contact-card a {
    color: var(--accent);
    text-decoration: none;
}
.contact-card a:hover,
.contact-card a:focus-visible {
    color: #0f5f21;
    text-decoration: underline;
}
.form-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4faf3 100%);
    border-color: rgba(31, 138, 50, 0.18);
}
.contact-form {
    display: grid;
    gap: 18px;
}
.contact-form label {
    display: block;
    font-weight: 600;
    color: #2f5333;
    font-size: 0.98rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #d8e7d7;
    background: #f8fbf7;
    border-radius: 18px;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(31, 138, 50, 0.12);
}
.contact-form textarea {
    min-height: 180px;
    resize: vertical;
}
.social-links {
    display: grid;
    gap: 10px;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid #d3e4d1;
    background: #f5fbf6;
    text-decoration: none;
    color: #1f3b24;
    font-weight: 600;
}
.social-links a span:first-child {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e4f4e5;
}
.site-footer {
    padding: 64px 0 32px;
    border-top: 1px solid rgba(27, 59, 34, 0.14);
    background: #eff4ed;
}
.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 28px;
}
.footer-title {
    margin: 0 0 16px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-links li {
    margin-bottom: 14px;
}
.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--accent);
}
.footer-copy {
    color: #5e6e5d;
    text-align: center;
    font-size: 0.98rem;
    padding-top: 18px;
}
@media (max-width: 1100px) {
    .featured-grid,
    .program-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        min-height: 620px;
    }
}
@media (max-width: 760px) {
    .site-header {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 0;
    }
    .main-nav {
        order: 3;
        position: absolute;
        top: 92px;
        left: 24px;
        right: 24px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: auto;
        max-height: 0;
        overflow: hidden;
        background: var(--surface);
        border-radius: 28px;
        border: 1px solid var(--border);
        box-shadow: 0 20px 35px rgba(31,56,37,0.08);
        transition: max-height 0.35s ease, opacity 0.35s ease;
        opacity: 0;
    }
    .main-nav.nav-open {
        max-height: 560px;
        opacity: 1;
    }
    .main-nav a {
        padding: 16px 22px;
        border-bottom: 1px solid #eef3ed;
        color: var(--text);
    }
    .main-nav a:last-child {
        border-bottom: none;
    }
    .menu-toggle {
        display: inline-flex;
    }
    .section {
        padding: 52px 0;
    }
    .hero {
        grid-template-columns: 1fr;
        padding: 36px 0 60px;
    }
}
@media (max-width: 520px) {
    .page {
        padding: 0 18px 36px;
    }
    .hero h1 {
        font-size: clamp(2.6rem, 8vw, 3.4rem);
    }
    .hero-highlight {
        margin-top: 28px;
        padding: 24px;
    }
    .button-primary {
        width: 100%;
    }
}

