/* =========================================
   PREHISTORY CLUB OF KENYA
   National Museums of Kenya Inspired – Earth Brown + Gold
   + Dark Mode Support
========================================= */

:root {
    /* Brand */
    --primary: #B75629;
    --primary-dark: #8B3A1A;
    --gold: #E5A624;
    --accent: #5E2525;

    /* Light theme (default) */
    --bg: #FDF8F5;
    --bg-alt: #ffffff;
    --bg-muted: #F2E2D9;
    --text: #221F1F;
    --text-muted: #5c534c;
    --border: rgba(183, 86, 41, 0.15);
    --card-shadow: 0 15px 35px rgba(183, 86, 41, 0.12);
    --navbar-bg: rgba(183, 86, 41, 0.93);
    --navbar-scrolled: rgba(139, 58, 26, 0.97);
    --footer-bg: #8B3A1A;
    --section-title: #221F1F;
    --mission-card-bg: #FDF8F5;
    --input-bg: #ffffff;
    --input-border: #d4c4b5;
}

[data-theme="dark"] {
    --bg: #14110f;
    --bg-alt: #1e1a17;
    --bg-muted: #2a241f;
    --text: #f0e6dc;
    --text-muted: #b8a99a;
    --border: rgba(229, 166, 36, 0.18);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    --navbar-bg: rgba(30, 22, 18, 0.95);
    --navbar-scrolled: rgba(20, 15, 12, 0.98);
    --footer-bg: #1a1410;
    --section-title: #f0e6dc;
    --mission-card-bg: #1e1a17;
    --input-bg: #2a241f;
    --input-border: #3d342c;
    --primary: #c96a3a;
    --primary-dark: #B75629;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* ---------- NAVBAR ---------- */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    padding: 14px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--navbar-scrolled) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.navbar-brand h5 {
    font-size: 1.15rem;
    font-weight: 700;
}

.navbar-brand small {
    font-size: 0.75rem;
}

.nav-link {
    color: #ffffff !important;
    font-weight: 500;
    margin: 0 8px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: #E5A624 !important;   /* gold */
}

.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Primary buttons */
.btn-success {
    background: var(--primary);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 50px;
}

.btn-success:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

/* ---------- HERO ---------- */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero img {
    height: 100vh;
    width: 100%;
    object-fit: cover;
}

.carousel-item {
    position: relative;
}

.carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(183, 86, 41, 0.35),
        rgba(139, 58, 26, 0.65)
    );
    z-index: 1;
}

.carousel-caption {
    position: absolute;
    left: 8%;
    right: auto;
    bottom: 22%;
    width: 650px;
    text-align: left;
    z-index: 2;
}

.carousel-caption h1 {
    font-size: 3.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.15;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.35);
}

.carousel-caption p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn {
    padding: 13px 32px;
    border-radius: 50px;
    font-weight: 600;
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background: var(--bg-alt);
    color: #8B3A1A;
}

.carousel-control-prev,
.carousel-control-next {
    width: 7%;
}

/* ---------- COMMON SECTION STYLES ---------- */
.section-tag {
    display: inline-block;
    background: #E5A624;          /* gold */
    color: #ffffff;
    padding: 7px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--section-title);
    margin-bottom: 16px;
}

.section-text {
    color: #8B3A1A;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ---------- MISSION ---------- */
.mission-section {
    background: var(--bg-alt);
    padding: 90px 0;
}

.mission-card {
    display: flex;
    gap: 18px;
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--mission-card-bg);
    transition: all 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(183, 86, 41, 0.12);
}

.mission-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #B75629;
    border-radius: 50%;
    color: #ffffff;
    font-size: 26px;
    flex-shrink: 0;
}

.video-box {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(183, 86, 41, 0.15);
}

.video-box iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* ---------- COUNTER ---------- */
.counter-section {
    background: linear-gradient(135deg, #B75629, #8B3A1A);
    padding: 90px 0;
}

.counter-box {
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.counter-box:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.22);
}

.counter-box i {
    font-size: 42px;
    margin-bottom: 18px;
    color: #E5A624;
}

.counter {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.counter-box p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    margin: 0;
}

/* ---------- PROGRAMS ---------- */
.program-section {
    background: var(--bg);
    padding: 90px 0;
}

.program-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    height: 360px;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
}

.program-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.program-overlay {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(
        to top,
        rgba(139, 58, 26, 0.93),
        rgba(183, 86, 41, 0.15)
    );
    color: #ffffff;
    transition: all 0.35s ease;
}

.program-card:hover {
    transform: translateY(-10px);
}

.program-card:hover img {
    transform: scale(1.08);
}

.program-overlay i {
    font-size: 36px;
    margin-bottom: 14px;
    color: #E5A624;
}

.program-overlay h4 {
    margin-bottom: 10px;
    font-weight: 700;
}

.program-overlay p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.95;
}

.read-more {
    color: #E5A624;
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    color: #ffffff;
}

/* ---------- NEWS & EVENTS CARDS ---------- */
.news-card,
.event-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s ease;
    background: var(--bg-alt);
}

.news-card:hover,
.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(183, 86, 41, 0.15) !important;
}

.news-card .card-img-top,
.event-card .card-img-top {
    transition: transform 0.5s ease;
}

.news-card:hover .card-img-top,
.event-card:hover .card-img-top {
    transform: scale(1.05);
}

.btn-outline-success {
    color: #B75629;
    border-color: #B75629;
}

.btn-outline-success:hover {
    background: #B75629;
    border-color: #B75629;
    color: #ffffff;
}

/* ---------- FOOTER ---------- */
footer {
    background: var(--footer-bg) !important;
}

footer a:hover {
    color: #E5A624 !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.9rem;
    }

    .carousel-caption h1 {
        font-size: 2.3rem !important;
    }

    .carousel-caption {
        width: 90% !important;
        left: 5% !important;
        bottom: 12% !important;
    }

    .carousel-caption p {
        font-size: 1rem;
    }
}
/* =========================================
   DESIGN POLISH – Final Touch
========================================= */

/* Consistent section spacing */
section {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Better section titles */
.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--section-title);
    margin-bottom: 12px;
}

.section-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Card hover improvement */
.news-card,
.event-card,
.gallery-card {
    transition: all 0.35s ease;
    border-radius: 16px;
    overflow: hidden;
}

.news-card:hover,
.event-card:hover,
.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(183, 86, 41, 0.15) !important;
}

/* Image zoom on hover */
.news-card img,
.event-card img,
.gallery-card img {
    transition: transform 0.5s ease;
}

.news-card:hover img,
.event-card:hover img,
.gallery-card:hover img {
    transform: scale(1.05);
}

/* Buttons */
.btn-success {
    background-color: #B75629;
    border-color: #B75629;
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 26px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #8B3A1A;
    border-color: #8B3A1A;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 86, 41, 0.35);
}

.btn-outline-success {
    color: #B75629;
    border-color: #B75629;
    border-radius: 50px;
    font-weight: 500;
}

.btn-outline-success:hover {
    background-color: #B75629;
    border-color: #B75629;
    color: #fff;
}

/* Navbar active link */
.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #E5A624 !important;
}

/* Footer polish */
footer {
    background: var(--footer-bg) !important;
}

footer a:hover {
    color: #E5A624 !important;
}

/* Form controls */
.form-control:focus,
.form-select:focus {
    border-color: #B75629;
    box-shadow: 0 0 0 0.2rem rgba(183, 86, 41, 0.2);
}

/* Page header consistency */
.page-header {
    background: linear-gradient(135deg, #B75629, #8B3A1A);
    padding: 100px 0 70px;
    margin-top: 70px;
}

/* Small mobile improvements */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.9rem;
    }

    section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .carousel-caption h1 {
        font-size: 2.1rem !important;
    }
}
/* =========================================
   MOBILE RESPONSIVE IMPROVEMENTS
========================================= */

/* General mobile spacing */
@media (max-width: 991.98px) {
    .navbar {
        padding: 10px 0;
    }

    .navbar-brand h5 {
        font-size: 1rem !important;
    }

    .navbar-brand small {
        font-size: 0.7rem !important;
    }

    .navbar .btn {
        margin-top: 12px;
        width: 100%;
        text-align: center;
    }

    .carousel-caption {
        width: 90% !important;
        left: 5% !important;
        bottom: 12% !important;
        text-align: left !important;
    }

    .carousel-caption h1 {
        font-size: 1.9rem !important;
        line-height: 1.25 !important;
        margin-bottom: 12px !important;
    }

    .carousel-caption p {
        font-size: 0.95rem !important;
        margin-bottom: 18px !important;
    }

    .section-title {
        font-size: 1.7rem !important;
    }

    .section-text {
        font-size: 0.95rem !important;
    }

    section {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }

    .card-title {
        font-size: 1.05rem;
    }

    .form-control-lg,
    .form-select-lg {
        font-size: 1rem;
        padding: 0.65rem 0.9rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.65rem 1.2rem;
    }
}

/* Extra small phones */
@media (max-width: 575.98px) {
    .carousel-caption h1 {
        font-size: 1.55rem !important;
    }

    .carousel-caption p {
        display: none;
    }

    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    footer .col-lg-4,
    footer .col-lg-3,
    footer .col-lg-2 {
        margin-bottom: 20px;
    }
}

/* Better touch targets */
@media (max-width: 991.98px) {
    .nav-link {
        padding: 12px 0 !important;
    }

    .dropdown-item {
        padding: 10px 16px;
    }
}
/* =========================================
   FLOATING QUICK LINKS (RIGHT SIDE)
========================================= */

.quick-float {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.quick-float.hidden-bar {
    right: -70px;
}

.quick-float-toggle {
    position: absolute;
    left: -36px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 70px;
    background: #B75629;
    color: #fff;
    border: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -3px 0 12px rgba(0,0,0,0.15);
}

.quick-float-toggle:hover {
    background: #8B3A1A;
}

.quick-float-item {
    display: flex;
    align-items: center;
    background: #B75629;
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 14px;
    border-radius: 12px 0 0 12px;
    min-width: 52px;
    box-shadow: -4px 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
}

.quick-float-item i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.quick-float-item span {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-float-item:hover {
    background: #8B3A1A;
    padding-right: 18px;
    transform: translateX(-6px);
}

.quick-float-item:hover span {
    max-width: 160px;
    opacity: 1;
    margin-left: 10px;
}

/* Different accent colors */
.quick-float-item.donate { background: #dc2626; }
.quick-float-item.donate:hover { background: #b91c1c; }

.quick-float-item.join { background: #B75629; }
.quick-float-item.join:hover { background: #8B3A1A; }

.quick-float-item.school { background: #2563eb; }
.quick-float-item.school:hover { background: #1d4ed8; }

.quick-float-item.events { background: #d97706; }
.quick-float-item.events:hover { background: #b45309; }

.quick-float-item.news { background: #7c3aed; }
.quick-float-item.news:hover { background: #6d28d9; }

@media (max-width: 768px) {
    .quick-float {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .quick-float-item span {
        display: none;
    }

    .quick-float-item:hover {
        transform: none;
        padding-right: 14px;
    }
}
/* =========================================
   SMOOTH SCROLL + REVEAL ANIMATIONS
========================================= */

html {
    scroll-behavior: smooth;
}

/* Reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Optional delay variants */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
.partner-logo {
    transition: all 0.3s ease;
    min-height: 100px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.partner-logo:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1) !important;
}

.partner-logo img {
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* =========================================
   DARK MODE TOGGLE BUTTON
========================================= */
.theme-toggle {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.45);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
    padding: 0;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--gold);
    color: var(--gold);
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme="dark"]) .theme-toggle .icon-moon {
    display: inline-block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: inline-block;
}

/* =========================================
   DARK MODE COMPONENT OVERRIDES
========================================= */
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-alt);
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-muted);
    color: var(--gold);
}

[data-theme="dark"] .card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .event-card,
[data-theme="dark"] .gallery-card,
[data-theme="dark"] .program-card,
[data-theme="dark"] .mission-card {
    background: var(--bg-alt) !important;
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .section-text,
[data-theme="dark"] .text-muted,
[data-theme="dark"] p {
    color: var(--text-muted);
}

[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, #3d2a1f, #1a1410) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem rgba(183, 86, 41, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light {
    background-color: var(--bg-alt) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}

[data-theme="dark"] footer {
    background: var(--footer-bg) !important;
}

[data-theme="dark"] .partner-logo {
    background: var(--bg-alt);
}

[data-theme="dark"] .partner-logo img {
    filter: grayscale(30%) brightness(1.1);
}

[data-theme="dark"] .btn-outline-success {
    color: var(--gold);
    border-color: var(--gold);
}

[data-theme="dark"] .btn-outline-success:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-theme="dark"] .section-tag {
    background: var(--primary);
}


@media (max-width: 991.98px) {
    .theme-toggle {
        margin: 12px auto 8px;
        display: flex;
    }
}

/* Smooth theme transition for key elements */
body, .navbar, .card, .news-card, .event-card, .gallery-card,
.mission-card, .program-card, footer, .form-control, .form-select,
.dropdown-menu, .page-header {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* =========================================
   Floating Left Social Bar
========================================= */
.social-float {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.social-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #fff;
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.social-float a i {
    transition: transform 0.3s ease;
}

.social-float a span {
    position: absolute;
    left: 52px;
    white-space: nowrap;
    background: inherit;
    color: #fff;
    padding: 8px 14px;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.15);
}

.social-float a:hover {
    width: 52px;
    padding-right: 4px;
}

.social-float a:hover i {
    transform: scale(1.2);
}

.social-float a:hover span {
    opacity: 1;
    transform: translateX(0);
}

.social-float a.facebook { background: #1877F2; }
.social-float a.twitter  { background: #1DA1F2; }
.social-float a.instagram{ background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-float a.youtube  { background: #FF0000; }
.social-float a.linkedin { background: #0A66C2; }

.social-float a:first-child { border-radius: 0 10px 0 0; }
.social-float a:last-child  { border-radius: 0 0 10px 0; }

@media (max-width: 767.98px) {
    .social-float {
        display: none;
    }
}

/* =========================================
   MODERNISATION 2026 – Vibrant & Modern Layer
========================================= */

:root {
    --coral: #E07A5F;
    --coral-soft: #F2B8A0;
    --display-font: 'Playfair Display', 'Outfit', serif;
    --body-font: 'Poppins', 'Outfit', sans-serif;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Typography refresh */
.section-title,
.carousel-caption h1,
.display-heading {
    font-family: var(--display-font);
    letter-spacing: -0.02em;
}

body {
    font-family: var(--body-font);
}

/* Stronger primary CTA */
.btn-success,
.btn-primary-modern {
    background: linear-gradient(135deg, #C96A3A 0%, #B75629 55%, #8B3A1A 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 13px 32px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(183, 86, 41, 0.32);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), filter 0.25s;
}
.btn-success:hover,
.btn-primary-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(183, 86, 41, 0.42);
    filter: brightness(1.05);
    color: #fff;
    background: linear-gradient(135deg, #D47A4A 0%, #C96A3A 55%, #B75629 100%);
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    border-radius: 50px;
    padding: 12px 30px;
    backdrop-filter: blur(6px);
    background: rgba(255,255,255,0.08);
    transition: all 0.25s var(--ease-out);
}
.btn-outline-light:hover {
    background: #fff;
    color: #8B3A1A !important;
    transform: translateY(-2px);
}

/* ---------- HERO – Dramatic gradient & hierarchy ---------- */
.hero {
    height: 100vh;
    min-height: 620px;
    position: relative;
    overflow: hidden;
}

.carousel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(20, 12, 8, 0.72) 0%, rgba(139, 58, 26, 0.45) 45%, rgba(183, 86, 41, 0.25) 100%),
        linear-gradient(to top, rgba(20, 10, 5, 0.75) 0%, transparent 55%);
    z-index: 1;
}

.carousel-caption {
    position: absolute;
    left: 7%;
    right: auto;
    bottom: 20%;
    max-width: 680px;
    width: auto;
    text-align: left;
    z-index: 2;
    padding: 0;
}

.carousel-caption h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 18px;
    line-height: 1.12;
    text-shadow: 0 6px 30px rgba(0,0,0,0.45);
}

.carousel-caption p,
.carousel-caption .lead {
    font-size: 1.15rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.94);
    margin-bottom: 28px;
    max-width: 520px;
    text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-buttons .btn {
    min-width: 160px;
}

/* Soft vignette at edges */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.25) 100%);
    z-index: 1;
}

/* ---------- COUNTERS – Glass & stronger presence ---------- */
.counter-section {
    background: linear-gradient(135deg, #B75629 0%, #8B3A1A 55%, #5E2525 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.counter-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(229,166,36,0.18), transparent 45%),
        radial-gradient(circle at 85% 70%, rgba(255,255,255,0.06), transparent 40%);
    pointer-events: none;
}

.counter-box {
    padding: 40px 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.35s var(--ease-out);
    position: relative;
    z-index: 1;
}

.counter-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.20);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.counter-box i {
    font-size: 2.6rem;
    margin-bottom: 16px;
    color: #E5A624;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.counter {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    font-family: var(--display-font);
    letter-spacing: -0.03em;
}

.counter-box p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    margin: 0;
    font-weight: 500;
}

/* ---------- PROGRAM CARDS – Stronger hover & overlays ---------- */
.program-section {
    background: var(--bg);
    padding: 100px 0;
}

.program-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    height: 380px;
    cursor: pointer;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
    isolation: isolate;
}

.program-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

.program-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 26px 30px;
    background: linear-gradient(
        to top,
        rgba(30, 14, 8, 0.94) 0%,
        rgba(139, 58, 26, 0.55) 45%,
        rgba(183, 86, 41, 0.15) 100%
    );
    color: #fff;
    transition: background 0.4s ease;
    z-index: 2;
}

.program-card:hover {
    transform: translateY(-12px) scale(1.015);
    box-shadow: 0 28px 55px rgba(183, 86, 41, 0.28);
}

.program-card:hover img {
    transform: scale(1.12);
}

.program-card:hover .program-overlay {
    background: linear-gradient(
        to top,
        rgba(20, 8, 4, 0.96) 0%,
        rgba(139, 58, 26, 0.7) 50%,
        rgba(183, 86, 41, 0.25) 100%
    );
}

.program-overlay i {
    font-size: 2rem;
    color: #E5A624;
    margin-bottom: 12px;
    transition: transform 0.35s var(--ease-out);
}

.program-card:hover .program-overlay i {
    transform: scale(1.15);
}

.program-overlay h4 {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 8px;
    font-family: var(--display-font);
}

.program-overlay p {
    font-size: 0.95rem;
    opacity: 0.92;
    margin-bottom: 14px;
    line-height: 1.5;
    max-height: 3.2em;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s;
}

.program-card:hover .program-overlay p {
    max-height: 6em;
    opacity: 1;
}

.read-more {
    color: #E5A624;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s, gap 0.25s;
}
.read-more:hover {
    color: #fff;
    gap: 10px;
}

/* ---------- TIMELINE SECTION ---------- */
.timeline-section {
    background: var(--bg-alt);
    padding: 100px 0;
    position: relative;
}

.timeline-track {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-track::before {
    content: "";
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--gold), var(--primary), var(--primary-dark));
    border-radius: 4px;
}

@media (min-width: 768px) {
    .timeline-track::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 50px;
        text-align: right;
    }
    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 50px;
        text-align: left;
    }
}

.timeline-dot {
    position: absolute;
    left: 18px;
    top: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    border: 4px solid var(--bg-alt);
    box-shadow: 0 0 0 3px rgba(229, 166, 36, 0.35);
    z-index: 2;
}

@media (min-width: 768px) {
    .timeline-item .timeline-dot {
        left: auto;
        right: -11px;
    }
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: -11px;
    }
}

.timeline-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.timeline-item:hover .timeline-card {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(183, 86, 41, 0.16);
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 30px;
    margin-bottom: 10px;
    letter-spacing: 0.4px;
}

.timeline-card h4 {
    font-family: var(--display-font);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--section-title);
}

.timeline-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.6;
}

/* ---------- SECTION POLISH ---------- */
.section-tag {
    background: linear-gradient(135deg, #E5A624, #D4941A);
    box-shadow: 0 4px 14px rgba(229, 166, 36, 0.35);
}

.mission-card,
.news-card,
.event-card {
    border-radius: 18px;
}

/* Dark mode adjustments for new elements */
[data-theme="dark"] .timeline-card {
    background: var(--bg-muted);
}
[data-theme="dark"] .timeline-dot {
    border-color: var(--bg-alt);
}
[data-theme="dark"] .program-overlay {
    background: linear-gradient(
        to top,
        rgba(10, 6, 4, 0.95) 0%,
        rgba(60, 30, 18, 0.65) 50%,
        rgba(100, 50, 30, 0.2) 100%
    );
}

/* Mobile hero */
@media (max-width: 768px) {
    .carousel-caption {
        left: 5% !important;
        right: 5%;
        bottom: 14% !important;
        max-width: none;
        width: 90% !important;
    }
    .carousel-caption h1 {
        font-size: 2.15rem !important;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }
    .counter {
        font-size: 2.4rem;
    }
}

/* =========================================
   FOSSIL MAP – Interactive Kenya Sites
========================================= */
.fossil-map-section {
    background: var(--bg);
    padding: 100px 0;
}

.fossil-map-container {
    height: 520px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(183, 86, 41, 0.18);
    border: 1px solid var(--border);
    z-index: 1;
}

.fossil-sites-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

.fossil-site-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.fossil-site-card:hover,
.fossil-site-card.active {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(183, 86, 41, 0.18);
    border-color: var(--primary);
}

.fossil-site-card h5 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: var(--section-title);
}

.fossil-site-card .age {
    display: inline-block;
    background: linear-gradient(135deg, #E5A624, #D4941A);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.fossil-site-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.fossil-marker {
    background: #B75629;
    border: 3px solid #E5A624;
    border-radius: 50%;
    width: 18px !important;
    height: 18px !important;
    box-shadow: 0 0 0 4px rgba(183, 86, 41, 0.35);
}

.leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.leaflet-popup-content h4 {
    font-family: 'Playfair Display', serif;
    margin: 0 0 6px;
    color: #8B3A1A;
    font-size: 1.1rem;
}

[data-theme="dark"] .fossil-site-card {
    background: var(--bg-muted);
}

@media (max-width: 991px) {
    .fossil-map-container {
        height: 380px;
        margin-bottom: 24px;
    }
    .fossil-sites-list {
        max-height: none;
    }
}

/* ---------- FOSSIL MAP CONTROLS & ENHANCEMENTS ---------- */
.fossil-map-controls .control-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.map-filter {
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    font-weight: 500;
    padding: 6px 14px;
    transition: all 0.25s ease;
}

.map-filter:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.map-filter.active {
    background: linear-gradient(135deg, #B75629, #8B3A1A);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(183, 86, 41, 0.3);
}

.fossil-popup h4 {
    font-family: 'Playfair Display', serif;
    margin: 0 0 6px;
    color: #8B3A1A;
    font-size: 1.15rem;
}

.fossil-popup .popup-age {
    font-size: 0.78rem;
    font-weight: 700;
    color: #B75629;
    margin-bottom: 2px;
}

.fossil-popup .popup-period {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 8px;
}

.fossil-popup p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #444;
}

.map-hint {
    font-size: 0.8rem;
}

[data-theme="dark"] .map-filter {
    background: var(--bg-muted);
    color: var(--text);
}

[data-theme="dark"] .map-filter.active {
    background: linear-gradient(135deg, #c96a3a, #B75629);
    color: #fff;
}

[data-theme="dark"] .fossil-popup h4 {
    color: #E5A624;
}

[data-theme="dark"] .fossil-popup p {
    color: #ddd;
}

/* =========================================
   TYPOGRAPHY – standard readable sizes
   (overrides earlier oversized rules)
========================================= */
html {
    font-size: 16px; /* browser standard base */
}

body {
    font-size: 1rem;       /* 16px */
    line-height: 1.6;
    font-weight: 400;
}

/* Headings – balanced, not oversized */
h1, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-size: 1.75rem !important; /* ~28px */
    line-height: 1.3;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem !important;  /* 24px */
    line-height: 1.35;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem !important; /* 20px */
    line-height: 1.4;
    font-weight: 600;
}

h4 {
    font-size: 1.125rem !important; /* 18px */
    line-height: 1.4;
    font-weight: 600;
}

h5 {
    font-size: 1rem !important; /* 16px */
    line-height: 1.45;
    font-weight: 600;
}

h6 {
    font-size: 0.9375rem !important; /* 15px */
    line-height: 1.45;
    font-weight: 600;
}

p, li, td, th, label, .form-label {
    font-size: 0.9375rem; /* 15px – comfortable body */
    line-height: 1.6;
}

.lead {
    font-size: 1.0625rem !important; /* 17px */
    font-weight: 400;
    line-height: 1.55;
}

/* Section components used across pages */
.section-title {
    font-size: 1.5rem !important; /* 24px */
    line-height: 1.35;
    font-weight: 700;
}

.section-text {
    font-size: 0.9375rem !important; /* 15px */
    line-height: 1.65;
}

.section-tag {
    font-size: 0.75rem !important; /* 12px */
    letter-spacing: 0.06em;
}

/* Navbar */
.navbar-brand h5 {
    font-size: 1rem !important;
}

.navbar-brand small {
    font-size: 0.7rem !important;
}

.nav-link {
    font-size: 0.9rem !important;
}

/* Hero / carousel */
.carousel-caption h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem) !important; /* 24–36px */
}

.carousel-caption .lead,
.carousel-caption p {
    font-size: 1rem !important;
}

/* Cards & content blocks */
.card-title,
.news-card h5,
.event-card h5,
.leader-card h5 {
    font-size: 1.0625rem !important; /* 17px */
}

.card-text,
.news-card p,
.event-card p,
.text-muted,
.small {
    font-size: 0.875rem !important; /* 14px where muted/small */
}

p.text-muted,
.card .text-muted,
.small {
    font-size: 0.875rem !important;
}

/* Forms – avoid oversized form-control-lg */
.form-control,
.form-select,
.form-control-lg,
.form-select-lg {
    font-size: 0.9375rem !important; /* 15px */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.form-label {
    font-size: 0.875rem !important;
    font-weight: 500;
}

/* Buttons */
.btn {
    font-size: 0.9rem !important;
}

.btn-lg {
    font-size: 0.95rem !important;
    padding: 0.55rem 1.25rem;
}

.btn-sm {
    font-size: 0.8rem !important;
}

/* Tables */
.table {
    font-size: 0.9rem;
}

.table th {
    font-size: 0.85rem;
}

/* Footer */
footer,
.footer,
footer p,
footer a,
footer li {
    font-size: 0.875rem !important;
}

footer h5,
footer h6 {
    font-size: 0.95rem !important;
}

/* Alerts */
.alert {
    font-size: 0.9rem !important;
}

/* Page header bands (About, Membership, Donate, etc.) */
section .display-5 {
    font-size: 1.75rem !important;
}

/* Utility: keep body text consistent inside content columns */
.container p,
.container li {
    font-size: 0.9375rem;
}

@media (max-width: 767.98px) {
    h1, .display-5 {
        font-size: 1.5rem !important;
    }
    h2, .section-title {
        font-size: 1.35rem !important;
    }
    .carousel-caption h1 {
        font-size: 1.4rem !important;
    }
    .lead {
        font-size: 1rem !important;
    }
}

/* ---------- Performance: images ---------- */
img {
    max-width: 100%;
    height: auto;
}

img[loading="lazy"] {
    content-visibility: auto;
}

.card-img-top,
.gallery-card img,
.news-card img,
.event-card img {
    background: var(--bg-muted);
}

/* Navbar Login link */
.navbar .nav-link .fa-user-circle {
    opacity: 0.9;
}
.navbar a.nav-link[href*="route=login"]:hover {
    color: #E5A624 !important;
}
