/* --- CSS Variables and Global Styles --- */
:root {
    --primary-color: #EC368F;
    --secondary-color: #3E4095;
    --dark-color: #021e40;
    --light-color: #ffffff;
    --text-color: #4c4d56;
    --heading-color: #0e0e0e;
    --bg-light-gray: #f8f9fa;
    --border-color: #ebebeb;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4 {
    color: var(--heading-color);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    color: var(--light-color);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.section-title {
    color: var(--dark-color);
}

.text-center { text-align: center; }

section {
    padding: 5rem 0;
}


/* --- Header & Navigation --- */
.site-header {
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-top-bar {
    background-color: var(--dark-color);
    color: #e0e0e0;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}
.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.header-contact-info a, .header-social-links a {
    color: #e0e0e0;
    margin-right: 1.5rem;
}
.header-contact-info a:hover, .header-social-links a:hover {
    color: var(--primary-color);
}
.header-social-links span {
    margin-right: 0.5rem;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo img {
    max-height: 50px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    color: var(--heading-color);
    font-weight: 600;
    padding: 1.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links li.active a::after {
    width: 100%;
}

.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--light-color);
    box-shadow: var(--shadow);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 220px;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    width: 100%;
    display: block;
}
.dropdown-menu li a::after {
    display: none;
}
.dropdown-menu li a:hover {
    background-color: var(--bg-light-gray);
    color: var(--primary-color);
}
.nav-apply-btn {
    margin-left: 2rem;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--dark-color);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    padding: 0;
    position: relative;
    height: 90vh;
    color: var(--light-color);
}
.hero-swiper {
    width: 100%;
    height: 100%;
}
.hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 30, 64, 0.6);
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 1rem;
}
.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.hero-title {
    color: var(--light-color);
    font-size: 3.5rem;
    font-weight: 800;
}
.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
    opacity: 0.9;
}
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--light-color);
}
.hero-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* --- About Section --- */
.about-section {
    background-color: var(--bg-light-gray);
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-text p {
    margin-bottom: 1rem;
}
.about-video {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(236, 54, 143, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--light-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.about-video:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--primary-color);
}
.about-video img {
    transition: transform 0.5s ease;
}
.about-video:hover img {
    transform: scale(1.05);
}

/* --- Stats Section --- */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
    color: var(--light-color);
}
.stats-section .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.stat-number {
    font-size: 3rem;
    font-weight: 700;
}
.stat-label {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* --- Trainings & News Section --- */
.card {
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.card-title a {
    color: inherit;
}
.card-title a:hover {
    color: var(--primary-color);
}
.card-text {
    flex-grow: 1;
    margin: 0.5rem 0 1rem;
}
.card-link {
    font-weight: 600;
    margin-top: auto;
}
.card-link i {
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}
.card-link:hover i {
    transform: translateX(5px);
}

.trainings-section { background-color: var(--bg-light-gray); }
.trainings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.news-section { background-color: var(--light-color); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.news-meta {
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}


/* --- Testimonials Section --- */
.testimonials-section {
    background-color: var(--bg-light-gray);
}
.testimonials-swiper .swiper-slide {
    padding: 1rem 0 3rem;
}
.testimonial-card {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 0 auto;
}
.testimonial-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--primary-color);
}
.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 1rem;
}
.testimonial-text::before, .testimonial-text::after {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    line-height: 1;
}
.testimonial-text::before { top: -1rem; left: -1rem; }
.testimonial-text::after { content: '\201D'; bottom: -2.5rem; right: -1rem; }
.testimonial-author {
    margin-top: 1rem;
}
.author-name {
    display: block;
    font-weight: 700;
    color: var(--dark-color);
}
.author-info {
    font-size: 0.9rem;
    color: var(--text-color);
}
.testimonials-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-color);
    color: #c0c0c0;
    padding-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}
.widget-title {
    color: var(--light-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}
.links-widget ul, .contact-widget ul {
    list-style: none;
}
.links-widget ul li, .contact-widget ul li {
    margin-bottom: 0.75rem;
}
.links-widget ul a, .contact-widget ul a {
    color: #c0c0c0;
}
.links-widget ul a:hover, .contact-widget ul a:hover {
    color: var(--light-color);
    padding-left: 5px;
}
.contact-widget i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.footer-social a {
    color: #c0c0c0;
    font-size: 1.2rem;
}
.footer-social a:hover {
    color: var(--primary-color);
}
.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.8rem; }
    section { padding: 3rem 0; }

    .header-top-bar { display: none; }
    .main-nav .container { height: 70px; }
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--dark-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0; 
        padding-top: 2rem; 
        transition: transform 0.3s ease-in-out;
        transform: translateX(100%);
        overflow-y: auto;
    }
    .nav-links.active {
        display: flex;
        transform: translateX(0);
    }
    .nav-links a {
        color: var(--light-color);
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    }
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.08); 
    }

    /* Show the dropdown arrow icon on mobile */
    .nav-links a .fas.fa-chevron-down {
        font-size: 0.9rem; 
        width: auto;
        overflow: visible;
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }
    .nav-links li.dropdown.active > a .fas.fa-chevron-down {
        transform: rotate(180deg); 
    }


    /* --- Mobile Dropdown Specific Styles --- */
    .nav-links .dropdown {
        width: 100%;
        text-align: center;
    }

    .nav-links .dropdown-menu {
        position: static;
        display: none; 
        width: 100%;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border-radius: 0; 
        opacity: 1; 
        transform: none; 
        margin-top: 0; 
        overflow: hidden;
    }

    .nav-links .dropdown.active .dropdown-menu {
        display: block;
    }

    .nav-links .dropdown-menu li a {
        font-size: 1rem;
        padding: 0.75rem 2.5rem;
        background-color: transparent;
        color: rgba(255, 255, 255, 0.8);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links .dropdown-menu li:last-child a {
        border-bottom: none;
    }

    .nav-links .dropdown-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: var(--primary-color);
    }

    /* Remove the hover effect for desktop dropdowns, only for mobile */
    .nav-links .dropdown:hover .dropdown-menu {
        display: none; 
    }

    /* Hide the underline for all mobile nav links when active or hovered */
    .nav-links a::after {
        display: none;
    }

    .nav-toggle { display: block; }
    .nav-apply-btn { display: none; }

    .about-content { grid-template-columns: 1fr; }
    .about-text { text-align: center; }
    .about-video { margin-top: 2rem; }

    .stats-section .container { grid-template-columns: 1fr 1fr; gap: 3rem 1rem; }

    .news-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-widget { text-align: center; }
    .widget-title::after { left: 50%; transform: translateX(-50%); }
    .footer-social { justify-content: center; }
}


@media (max-width: 480px) {
    html { font-size: 15px; }
    .hero-title { font-size: 2.2rem; }
    .hero-text { font-size: 1rem; }
    .stats-section .container { grid-template-columns: 1fr; }
}

/* --- Login Page Styles --- */
.login-page-body {
    background-color: var(--light-color);
    overflow: hidden;
}

.login-page-wrapper {
    display: flex;
    min-height: 100vh;
}

.login-image-pane {
    flex: 1;
    background: url('https://engage.uonbi.ac.ke/wp-content/uploads/2025/06/login-hero.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: var(--light-color);
}

.login-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(62, 64, 149, 0.85), rgba(236, 54, 143, 0.85));
}

.login-image-content {
    position: relative;
    z-index: 2;
}

.login-image-content .login-logo-link img {
    max-width: 200px;
    filter: brightness(0) invert(1);
}

.login-image-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light-color);
    margin-top: 2rem;
}

.login-image-content p {
    font-size: 1.1rem;
    max-width: 400px;
    opacity: 0.9;
}

.login-form-pane {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #aaa;
}

.input-wrapper input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(236, 54, 143, 0.15);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.forgot-password-link {
    font-size: 0.9rem;
    font-weight: 500;
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #ccc;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.login-divider:not(:empty)::before { margin-right: .5em; }
.login-divider:not(:empty)::after { margin-left: .5em; }

.login-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Responsive adjustments for Login page */
@media (max-width: 768px) {
    .login-image-pane {
        display: none;
    }
    .login-form-pane {
        flex-basis: 100%;
    }
    .login-form-container {
        max-width: 100%;
    }
}