/* ============================================================
   Boy Child Advocacy of Zambia — Design System
   Palette taken directly from the organisation's logo:
   royal blue (#2E3192), red (#ED1B24), white.
   ============================================================ */

:root {
    /* Color — logo blue */
    --blue-900: #171A57;
    --blue-800: #1F2266;
    --blue-700: #2E3192;   /* logo blue */
    --blue-600: #3B3FAE;
    --blue-500: #565ACB;
    --blue-100: #E7E8F7;

    /* Color — logo red */
    --red-700: #A00F16;
    --red-600: #C21118;
    --red-500: #ED1B24;    /* logo red */
    --red-400: #F14A52;
    --red-100: #FCE4E5;

    /* Neutrals — white is the primary surface */
    --white: #FFFFFF;
    --paper-50: #FFFFFF;
    --paper-100: #F4F5FA;
    --paper-200: #E8EAF3;
    --ink-900: #191A1F;
    --ink-700: #43454E;
    --ink-500: #6C6E78;

    /* Type */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    /* Radii / shadow */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-soft: 0 12px 32px -14px rgba(23, 26, 87, 0.28);
    --shadow-lift: 0 20px 45px -18px rgba(23, 26, 87, 0.38);
}

/* ============ Base ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink-900);
    background-color: var(--white);
    margin: 0;
}

a { color: var(--blue-700); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--red-500); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--blue-800);
    line-height: 1.15;
    margin-top: 0;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--ink-700); }

.eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red-500);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--blue-700);
    display: inline-block;
}
.eyebrow.on-dark { color: var(--red-400); }
.eyebrow.on-dark::before { background: var(--white); }

::selection { background: var(--red-500); color: var(--white); }

:focus-visible {
    outline: 3px solid var(--blue-500);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============ Navigation ============ */
.navbar {
    background-color: var(--blue-900) !important;
    padding: 1rem 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
    transition: box-shadow .3s ease, padding .3s ease;
}
.navbar.is-scrolled {
    padding: 0.6rem 0;
    box-shadow: var(--shadow-soft);
}
.navbar-brand { display: flex; align-items: center; gap: 0.65rem; }
.navbar-brand img {
    height: 44px;
    width: 44px;
    object-fit: cover;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--red-500);
    transition: transform .3s ease;
}
.navbar-brand:hover img { transform: scale(1.06); }
.navbar-brand .brand-text {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--white);
    font-size: 1.05rem;
    line-height: 1.15;
}
.navbar-brand .brand-text small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--red-400);
    font-weight: 700;
    text-transform: uppercase;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.94rem;
    padding: 0.55rem 1rem !important;
    margin: 0 0.1rem;
    border-radius: 999px;
    transition: all .25s ease;
    position: relative;
}
.nav-link:hover { color: var(--white) !important; background-color: rgba(255,255,255,0.1); }
.nav-link.active { color: var(--white) !important; background-color: var(--red-500); font-weight: 600; }

.navbar-toggler { border-color: rgba(255,255,255,0.25); }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.btn-donate-nav {
    background: linear-gradient(135deg, var(--red-500), var(--red-700));
    color: var(--white) !important;
    border: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px -8px rgba(237, 27, 36, 0.6);
    transition: transform .25s ease, box-shadow .25s ease;
}
.btn-donate-nav:hover {
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(237, 27, 36, 0.75);
}

/* ============ Buttons ============ */
.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 0.7rem 1.7rem;
    transition: all .25s ease;
    font-size: 0.95rem;
}
.btn-primary {
    background-color: var(--blue-700);
    border-color: var(--blue-700);
}
.btn-primary:hover {
    background-color: var(--blue-800);
    border-color: var(--blue-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.btn-danger, .btn-copper {
    background-color: var(--red-500);
    border-color: var(--red-500);
    color: var(--white);
}
.btn-danger:hover, .btn-copper:hover {
    background-color: var(--red-600);
    border-color: var(--red-600);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.btn-outline-light { border-width: 2px; font-weight: 600; }
.btn-outline-primary { color: var(--blue-700); border-color: var(--blue-700); }
.btn-outline-primary:hover { background-color: var(--blue-700); border-color: var(--blue-700); }
.btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; }

/* ============ Hero ============ */
.hero-carousel { position: relative; background: var(--blue-900); }
.hero-carousel .carousel-item {
    height: min(78vh, 720px);
    min-height: 460px;
    position: relative;
}
.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95) contrast(1.02);
}
.hero-carousel .carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(23,26,87,0.55) 0%, rgba(23,26,87,0.35) 40%, rgba(23,26,87,0.94) 100%),
        linear-gradient(100deg, rgba(23,26,87,0.88) 5%, rgba(23,26,87,0.15) 55%);
}
.hero-carousel .carousel-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    padding: 0;
}
.hero-caption-inner { max-width: 640px; }
.hero-carousel h1 {
    color: var(--white);
    font-size: clamp(2.3rem, 5vw, 3.75rem);
    margin-bottom: 1.1rem;
}
.hero-carousel h1 em {
    font-style: normal;
    color: var(--red-400);
}
.hero-carousel p {
    color: rgba(255,255,255,0.88);
    font-size: 1.15rem;
    max-width: 560px;
}
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.5rem; }

.hero-carousel .carousel-indicators { justify-content: flex-start; padding-left: var(--bs-gutter-x, 1.5rem); margin-left: 4rem; margin-bottom: 2.4rem; }
.hero-carousel .carousel-indicators [data-bs-target] {
    width: 34px; height: 3px; border-radius: 2px;
    background-color: rgba(255,255,255,0.4); opacity: 1; border: none;
}
.hero-carousel .carousel-indicators .active { background-color: var(--red-500); }

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { width: 6%; opacity: 0.7; }
.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover { opacity: 1; }

.hero-fallback {
    background: radial-gradient(120% 140% at 15% 20%, var(--blue-700), var(--blue-900) 60%);
    padding: 6rem 0 5rem;
    color: var(--white);
}

/* ============ Sections ============ */
.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }
.section-dark { background-color: var(--blue-900); color: rgba(255,255,255,0.92); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.75); }
.section-paper { background-color: var(--paper-100); }
.section-title { max-width: 640px; margin-bottom: 3rem; }
.section-title.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============ Pathway (signature element) ============
   Encodes the organisation's real four-stage program journey.
*/
.pathway {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    margin-top: 3rem;
}
.pathway::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--red-500) 0 10px, transparent 10px 18px);
    z-index: 0;
}
.pathway-step { position: relative; z-index: 1; padding: 0 1rem; text-align: center; }
.pathway-node {
    width: 56px; height: 56px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--blue-700);
    color: var(--blue-700);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-soft);
    transition: transform .3s ease, background .3s ease, color .3s ease;
}
.pathway-step:hover .pathway-node {
    transform: translateY(-4px);
    background: var(--red-500);
    border-color: var(--red-500);
    color: var(--white);
}
.pathway-step h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--blue-800);
}
.section-dark .pathway-step h4 { color: var(--white); }
.pathway-step p { font-size: 0.92rem; }

@media (max-width: 767.98px) {
    .pathway { grid-template-columns: 1fr; gap: 2.2rem; }
    .pathway::before { display: none; }
}

/* ============ Impact stats ============ */
.stat-strip {
    background: linear-gradient(120deg, var(--blue-800), var(--blue-900));
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.stat-strip::before {
    content: '';
    position: absolute;
    left: 0; top: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red-500), var(--red-400) 50%, var(--red-500));
}
.stat-strip::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(237,27,36,0.25), transparent 70%);
}
.stat-item { text-align: center; }
.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    display: block;
    line-height: 1;
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red-400);
    margin-top: 0.6rem;
}

/* ============ Cards ============ */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(23,26,87,0.08);
    transition: all .3s ease;
    overflow: hidden;
    background: var(--white);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card-img-top { height: 200px; object-fit: cover; }
.card-body { padding: 1.6rem; }
.card-title { font-size: 1.2rem; color: var(--blue-800); }

.program-card {
    padding: 2rem 1.75rem;
    border-radius: var(--radius-md);
    background: var(--white);
    border: 1px solid var(--paper-200);
    border-top: 3px solid var(--red-500);
    box-shadow: 0 4px 14px rgba(23,26,87,0.06);
    height: 100%;
}
.program-card .icon-wrap {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--blue-100);
    color: var(--blue-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.news-card { border: none; }
.news-card .card-body { padding: 1.25rem 0 0; }
.news-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--red-500);
}

/* ============ Testimonial ============ */
.testimonial {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--paper-200);
    box-shadow: 0 4px 14px rgba(23,26,87,0.06);
    position: relative;
}
.testimonial::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--blue-100);
    position: absolute;
    top: 0.5rem;
    left: 1.2rem;
    line-height: 1;
}
.testimonial p.quote { font-style: italic; font-size: 1.05rem; position: relative; z-index: 1; }
.testimonial-author { display: flex; align-items: center; margin-top: 1.2rem; }
.testimonial-author img {
    width: 48px; height: 48px; border-radius: 50%;
    margin-right: 0.9rem; object-fit: cover;
    border: 2px solid var(--red-500);
}
.testimonial-author strong { color: var(--blue-800); }
.testimonial-author span { font-size: 0.85rem; color: var(--ink-500); }

/* ============ Team ============ */
.team-member img { border: 3px solid var(--paper-200); }
.team-member.executive { background-color: var(--paper-100) !important; border-radius: var(--radius-md); }
.team-member.executive img { border-color: var(--red-500); }

/* ============ CTA banner ============ */
.cta-banner {
    background: linear-gradient(120deg, var(--red-600), var(--red-500));
    border-radius: var(--radius-lg);
    padding: 3.5rem 3rem;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.5rem; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 0; }
.cta-banner .btn-outline-light:hover { color: var(--red-600); }

/* ============ Forms ============ */
.form-label { font-weight: 600; color: var(--blue-800); font-size: 0.9rem; }
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--paper-200);
    padding: 0.7rem 0.9rem;
    background-color: var(--white);
}
.form-control:focus, .form-select:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 0.2rem rgba(46, 49, 146, 0.15);
}

/* ============ Footer ============ */
footer.site-footer {
    background-color: var(--blue-900);
    color: rgba(255,255,255,0.78);
    padding-top: 4rem;
}
footer.site-footer h5 {
    color: var(--white);
    font-family: var(--font-display);
    margin-bottom: 1.25rem;
}
footer.site-footer a { color: rgba(255,255,255,0.72); }
footer.site-footer a:hover { color: var(--red-400); }
footer.site-footer ul { list-style: none; padding-left: 0; }
footer.site-footer ul li { margin-bottom: 0.6rem; }
footer.site-footer .brand-text { font-family: var(--font-display); color: var(--white); font-size: 1.3rem; }
footer.site-footer .text-copper { color: var(--red-400) !important; }

.social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background-color: rgba(255,255,255,0.1);
    color: var(--white) !important;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all .25s ease;
}
.social-icons a:hover { background-color: var(--red-500); transform: translateY(-3px); }

.copyright {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.5rem 0;
    margin-top: 2.5rem;
    font-size: 0.85rem;
}

/* ============ Scroll reveal ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ Back to top ============ */
.btn-back-to-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 48px; height: 48px; border-radius: 50%;
    background-color: var(--blue-800);
    color: var(--white);
    border: none;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all .3s ease;
    z-index: 99;
    box-shadow: var(--shadow-soft);
}
.btn-back-to-top.show { opacity: 1; visibility: visible; }
.btn-back-to-top:hover { background-color: var(--red-500); color: var(--white); }

/* ============ Page hero (inner pages) ============ */
.page-hero {
    background: radial-gradient(140% 160% at 10% 0%, var(--blue-700), var(--blue-900) 65%);
    color: var(--white);
    padding: 4.5rem 0 3.5rem;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero p { color: rgba(255,255,255,0.82); max-width: 620px; font-size: 1.1rem; }
.breadcrumb-trail {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--red-400);
    margin-bottom: 1rem;
}
.breadcrumb-trail a { color: rgba(255,255,255,0.65); }
.breadcrumb-trail a:hover { color: var(--white); }

/* ============ Utility ============ */
.bg-light-blue { background-color: var(--blue-100); }
.text-primary-blue { color: var(--blue-700); }
.text-copper { color: var(--red-500); }
.bg-paper { background-color: var(--white); }

/* ============ Responsive ============ */
@media (max-width: 767.98px) {
    .section { padding: 3.25rem 0; }
    .hero-carousel .carousel-indicators { margin-left: 1.5rem; }
    .cta-banner { padding: 2.25rem 1.5rem; text-align: center; justify-content: center; }
}
