/* ===============================
   Base Styles - Header & Footer Only (base.css)
=============================== */
* {
    box-sizing: border-box; /* fix padding/margin overflow */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f7f8fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #0d6efd;
}

h1, h2, h3 {
    margin: 0.5em 0;
    font-weight: 600;
}

.small {
    font-size: 0.9rem;
    color: #555;
}

/* Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Add small top spacing below header */
main.container {
    margin-top: 0.8rem; /* adjust between 0.5rem – 1rem as needed */
}


/* ===============================
   Navbar / Header
=============================== */
/* Keep logo and navigation aligned in one row on desktop */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* 👈 prevent logo/nav from stacking */
    gap: 1rem; /* adjust if needed */
}

/* Only allow wrapping on mobile */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap; /* allow stacking on small screens */
    }
}

.navbar {
    background-color: #0b1020;
    color: #e6eef6;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-size: 0.95rem;
}

.navbar .container,
.container.flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e6eef6;
}

.upper-score {
    font-size: 1.2rem;
    color: #d32f2f;
    margin-right: 0.5rem;
    vertical-align: super;
}

.logo-right {
    width: 40px;
    height: auto;
}

/* Navigation */
.navbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar nav a {
    padding: 6px 10px;
    border-radius: 5px;
    color: #e6eef6;
    transition: all 0.2s ease-in-out;
    font-size: 0.95rem;
}

.navbar nav a:hover {
    background-color: #0d6efd;
    color: #fff;
}

.navbar nav a.active {
    font-weight: 600;
    background-color: #10b981;
    color: #fff;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar nav {
        flex-direction: column;
        width: 100%; /* full width for small screens */
        margin-top: 0.5rem;
    }

    .brand {
        font-size: 1.1rem;
    }

    .logo-right {
        width: 30px;
    }
}

/* Hamburger Button */
/* ===============================
   Hamburger Icon - Modern Style
=============================== */
.hamburger {
    display: none; /* hidden on desktop */
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
    background: none;
    border: none;
}

/* Hamburger lines */
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #fff;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.4s ease;
}

/* Position the lines */
.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

/* Toggle active state (turn into X) */
.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    bottom: 50%;
    transform: rotate(-45deg);
}

/* ===============================
   Mobile Navigation Overlay
=============================== */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    #nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        z-index: 90;
        transition: opacity 0.3s ease;
    }

    #nav-overlay.show {
        display: block;
        opacity: 1;
    }

    #main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* slide from right */
        width: 250px;
        height: 100vh;
        background-color: #0b1020;
        display: flex;
        flex-direction: column;
        padding-top: 60px;
        gap: 1rem;
        transition: right 0.4s ease;
        z-index: 100;
        overflow-y: auto;
    }

    #main-nav.show {
        right: 0; /* slide-in effect */
    }

    #main-nav a {
        padding: 15px 20px;
        color: #ffffff;
        font-weight: 500;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transition: background 0.3s ease, color 0.3s ease;
    }

    #main-nav a:hover {
        background-color: #1a1f3a;
        color: #ff6600;
    }

    body.nav-open {
        overflow: hidden;
    }
}


/* ===============================
   Footer
=============================== */
/* ===============================
   Footer
=============================== */
footer {
    padding: 2.5rem 1rem;
    background-color: #0b1020;
    color: #e6eef6;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Footer text paragraphs */
.footer-text p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Kenya emoji with shadow for depth */
.kenya-emoji {
    font-size: 1.6rem;
    text-shadow:
        1px 0 #ff0000,
       -1px 0 #008000,
        0 1px #000000,
        0 -1px #ffffff;
}

/* Kenya flag image */
.kenya-flag {
    width: 28px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Footer social links */
.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0.5rem 0;
}

.footer-links a {
    color: #e6eef6;
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover {
    color: #0d6efd;
    transform: scale(1.2);
}

/* Footer year text */
.footer-year {
    font-size: 0.85rem;
    color: #a1a1a1;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---------------- Responsive adjustments ---------------- */
@media (max-width: 768px) {
    .footer-content {
        gap: 0.8rem;
        padding: 0 1rem;
    }

    .footer-text p {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }

    .footer-links {
        gap: 0.6rem;
    }

    .footer-links a {
        font-size: 1.1rem;
    }

    .kenya-flag {
        width: 24px;
    }
}

/* ===============================
   Utilities
=============================== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

main {
    flex: 1;
    width: 100%;
}
