
:root {
    --green: #1b7a3a;
    --yellow: #f5c400;
    --maroon: #7a1b1b;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--white);
    color: #222;
    line-height: 1.6;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--yellow);
    color: #000;
    padding: 8px;
    z-index: 100;
}
.skip-link:focus {
    top: 0;
}

/* HEADER */
header {
    background: var(--green);
    color: var(--white);
}

/* TOP NAV */
.top-nav {
    background: #145c2c;
}


/* ONLY top-level menu */
.top-nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}


.top-nav li a {
    display: block;
    padding: 0.9rem 1.2rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.top-nav li a:hover,
.top-nav li a:focus {
    background: var(--yellow);
    color: #000;
}

/* Header content */
.header-content {
    padding: 1rem;
}

.header-content h1 {
    margin: 0;
}

.container {
    display: flex;
    min-height: calc(100vh - 160px);
}

/* LEFT PANEL */
aside {
    width: 260px;
    background: var(--maroon);
}

aside nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside nav ul li a {
    display: block;
    padding: 1rem;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

aside nav ul li a:hover,
aside nav ul li a:focus {
    background: var(--yellow);
    color: #000;
}

/* MAIN */
main {
    flex: 1;
    padding: 2rem;
}

section {
    margin-bottom: 2rem;
}

.card {
    border-left: 6px solid var(--green);
    background: #f9f9f9;
    padding: 1rem;
}

.btn {
    display: inline-block;
    background: var(--green);
    color: var(--white);
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    border-radius: 4px;
}

.btn:hover,
.btn:focus {
    background: var(--yellow);
    color: #000;
}

footer {
    background: linear-gradient(to right, var(--maroon), #FFFACD);
    color: #fff;
    text-align: center;
    padding: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}


/* SLIDER */
.slider {
    width: 100%;
    max-height: 380px;
    overflow: hidden;
}

.slider img {
    width: 100%;
    display: none;
}

.slider img:first-child {
    display: block;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    aside {
        width: 100%;
    }

    .top-nav ul {
        flex-direction: column;
    }
}





/* DROPDOWN – HOVER ONLY */
.top-nav ul li {
    position: relative;
}

/* Hide child menu by default */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #145c2c;
    min-width: 220px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 999;
}

/* Show ONLY on hover */
.dropdown:hover > .dropdown-menu {
    display: block;
}

/* Child links */
.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.dropdown-menu li a:hover {
    background: var(--yellow);
    color: #000;
}




/* SIDEBAR DROPDOWN – FLY-OUT TO THE RIGHT */
.side-dropdown {
    position: relative; /* parent must be relative */
}

/* hide children initially */
.side-dropdown-menu {
    display: none;
    position: absolute; /* position relative to parent */
    top: 0;             /* align with top of parent */
    left: 100%;         /* fly out to the right */
    background: #5f1515;
    min-width: 200px;
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border-left: 2px solid var(--yellow); /* optional visual separation */
}

/* show on hover */
.side-dropdown:hover > .side-dropdown-menu {
    display: block;
}

/* child links */
.side-dropdown-menu li a {
    padding: 0.8rem 1rem;
    display: block;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* hover effect for child links */
.side-dropdown-menu li a:hover {
    background: var(--yellow);
    color: #000;
}




/* HEADER CONTENT – FLEX LAYOUT */
.header-content {
    padding: 0.5rem 1rem;
    background: var(--green);
    color: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo left, button right */
    flex-wrap: wrap;
    text-align: center; /* center text */
}

/* Logo */
.header-inner .logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* Centered text */
.header-inner .header-text {
    flex: 1;
    text-align: center; /* this centers h1 & p */
    margin: 0 1rem;
}

.header-inner .header-text h1 {
    font-size: 1.3rem;
    margin: 0;
}

.header-inner .header-text p {
    font-size: 0.9rem;
    margin: 0;
}

/* Apply button */
.header-inner .header-btn {
    margin-left: 1rem;
}

.header-inner .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: center; /* center everything on small screens */
    }
    .header-inner .header-text {
        margin: 0.5rem 0;
    }
    .header-inner .header-btn {
        margin: 0.5rem 0;
    }
}


/* RIGHT PANEL NEWS LIST */
.right-panel {
    padding: 1rem;
    background: linear-gradient(to bottom, #FFD700, #FFFACD); /* fading yellow top → lighter yellow bottom */
    border-radius: 6px; /* optional: rounded corners */
}

.right-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #FF8C00; /* dark orange */
    padding-bottom: 0.3rem;
    color: #333; /* darker heading for readability */
}

.right-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.right-panel ul li {
    margin-bottom: 1rem;
}

/* News links - solid color for readability */
.right-panel ul li a {
    text-decoration: none;
    font-weight: 500;
    color: #8B4000; /* dark orange-brown for contrast */
    transition: all 0.3s ease;
}

.right-panel ul li a:hover {
    text-decoration: underline;
    color: #FF8C00; /* lighter orange on hover */
    transform: translateX(3px);
}

/* Date / small text */
.right-panel ul li small {
    color: #444; /* darker for readability */
    font-size: 0.8rem;
}



/* Main navigation */
.top-nav {
    display: flex;
    justify-content: space-between; /* Main menu left, portals right */
    align-items: center;
    background: #004d00; /* dark green */
    padding: 0 20px;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.top-nav ul li {
    margin: 0 15px;
    position: relative;
}

.top-nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: 500;
}

/* Dropdown */
.top-nav ul li .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #006600; /* slightly lighter green for dropdown */
    padding: 10px 0;
    min-width: 150px;
}

.top-nav ul li.dropdown:hover .dropdown-menu {
    display: block;
}

.top-nav ul li .dropdown-menu li {
    margin: 0;
    padding: 0;
}

.top-nav ul li .dropdown-menu li a {
    padding: 8px 20px;
    display: block;
    color: white;
}

/* Portal menu */
.portal-menu {
    margin-left: auto; /* push to far right */
}

.portal-menu li a {
    font-size: 0.85rem; /* smaller links */
    background: #004d00; /* dark green to match main nav */
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
}

.portal-menu li a:hover {
    background: #003300; /* darker green on hover */
}
s

/* Kenyan Flag Card */
.top-nav .portal-menu li.flag-card {
    background: #fff; /* card background */
    padding: 3px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.top-nav .portal-menu li.flag-card img {
    height: 20px; /* adjust size */
    width: auto;
    display: block;
}



/* TOP NAV PORTAL MENU */
.top-nav .portal-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.top-nav .portal-menu li {
    margin-left: 1rem;
}

/* Kenyan Flag Card */
.top-nav .portal-menu li.flag-card {
    background: green; /* card background */
    padding: 0px 0px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Flag image inside the card */
.top-nav .portal-menu li.flag-card img {
    height: 20px; /* adjust size */
    width: auto;
    display: block;
    /* Add flutter animation */
    animation: waveFlag 1.5s infinite ease-in-out;
    transform-origin: left center; /* pivot from left side */
}

/* Keyframes for waving effect */
@keyframes waveFlag {
    0% { transform: rotate(0deg) scaleX(1); }
    25% { transform: rotate(2deg) scaleX(1.02); }
    50% { transform: rotate(0deg) scaleX(1); }
    75% { transform: rotate(-2deg) scaleX(0.98); }
    100% { transform: rotate(0deg) scaleX(1); }
}





.bottom-main {
    flex: 2;
    background-color: #f5f5f5;
    padding: 15px;
}

.partners-section {
    text-align: center;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 20px;
    margin-top: 15px;
    align-items: center;
}

.partner-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo img {
    max-height: 45px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}


.welcome-main {
    flex: 1.5;
    background-color: #f5f5f5;
    padding: 20px;
}

.welcome-section {
    max-width: 1100px;
    margin: auto;
}

.welcome-title {
    color: #0b7a33; /* GREEN */
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.welcome-text {
    color: #0b7a33; /* GREEN */
    font-size: 1rem;
    margin-bottom: 20px;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.mv-item {
    background: #ffffff;
    padding: 15px;
    border-left: 5px solid #800000; /* MAROON */
    border-radius: 6px;
}

.mv-item h3 {
    color: #800000; /* MAROON */
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.mv-item i {
    margin-right: 6px;
}

.mv-item ul {
    padding-left: 18px;
    margin: 0;
}

.mv-item ul li {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: #333;
}


.slider-section {
    position: relative;
}

.slider img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Overlay container */
.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 10;

    /* IMPORTANT: does not hide image */
    background: linear-gradient(
        to bottom,
        rgba(245,245,245,0.75),
        rgba(245,245,245,0.2),
        rgba(245,245,245,0)
    );
}





/* Text styling */
.welcome-title,
.welcome-text {
    color: #0b7a33; /* GREEN */
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.mv-item {
    background: rgba(255,255,255,0.85); /* readable but transparent */
    padding: 12px;
    border-left: 4px solid #800000;
    border-radius: 6px;
}

.mv-item h3 {
    color: #800000; /* MAROON */
    font-size: 1rem;
}

.mv-item ul {
    padding-left: 18px;
    margin: 0;
}

.mv-item li {
    font-size: 0.9rem;
}
 
.header-btn {
    animation: fadeSlide 0.8s ease-out forwards;
}

/* Button base style */
btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, #0056b3, #0099ff);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover interaction */
.btn:hover {
    transform: scale(1.07);
    box-shadow: 0 12px 28px rgba(0, 102, 204, 0.6);
}

/* Attention animation */
.apply-animate {
    animation: bounceGlow 2s infinite;
}

/* Keyframes */
@keyframes bounceGlow {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
    }
    50% {
        transform: translateY(-6px);
        box-shadow: 0 16px 30px rgba(0, 153, 255, 0.6);
    }
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Individual leader card */
.leader-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

/* Hover effect */
.leader-card:hover {
    transform: translateY(-5px);
}

/* Images inside leader cards */
.leader-card img {
    width: 80px;          /* smaller width */
    height: 80px;         /* adjust height to keep aspect ratio */
    object-fit: cover;
    border-radius: 10px;
    margin: 10px auto;     /* center image */
    display: block;
}

/* Leader name */
.leader-card h3 {
    margin: 5px 0 5px;
    font-size: 12px;
    color: #003366;
}

/* Position text */
.leader-card .position {
    margin: 0 0 10px 0;
    font-size: 10px;
    color: #555;
}

/* Table styling */
.leaders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    text-align: center;
}

.leaders-table td {
    vertical-align: top;
}








body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #e8f0fe); /* Subtle gradient background for page */
    margin: 0;
    padding: 0;
}

.mv-grid {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.mv-item {
    max-width: 900px;
    width: 100%;
    padding: 25px;
    background: linear-gradient(145deg, #ffffff, #dbe9f9); /* Nice card gradient */
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.department-links {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 8px 15px; /* spacing between links */
    font-size: 0.85rem; /* Smaller font to fit more links */
}

.department-links a {
    display: block;
    text-decoration: none;
    color: #1a1a1a;
    background: #e3f2fd; /* Light blue background */
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-align: center;
}

.department-links a:hover {
    background: #1a73e8;
    color: #fff;
}