/* =====================
   GLOBAL RESET
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #ffffff;
    color: #333;
}

/* =====================
   TOP BAR
===================== */
.topbar {
    background: #ffffff;
    padding: 14px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar img {
    height: 75px;   /* Larger logo */
}

.topbar .cta-buttons button {
    background: #0A0A5F;
    color: #FFD700;
    border: none;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: 0.3s;
}

.topbar .cta-buttons button:hover {
    background: #FFD700;
    color: #0A0A5F;
}

/* =====================
   NAVBAR
===================== */
header {
    background: #7ED4F7;
}

.navbar {
    padding: 12px 5%;
}

nav ul {
    display: flex;
    justify-content: space-between;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #0A0A5F;
    font-weight: bold;
    padding: 10px 14px;
    display: block;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #999999;
}

/* =====================
   DROPDOWN MENU FIX
===================== */
nav ul li {
    position: relative;
}

nav ul li ul.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 220px;
    background: rgba(10,10,95,0.95);
    z-index: 999;
}

/* Make submenu visible on hover and allow pointer events inside */
nav ul li:hover > ul.dropdown {
    display: block;
}

nav ul li ul.dropdown li a {
    display: block;
    padding: 12px;
    color: #fff;
    white-space: nowrap;
}

nav ul li ul.dropdown li a:hover {
    color: #FFD700;
}

/* =====================
   HERO SLIDER
===================== */
.hero-slider {
    position: relative;
    height: 80vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3); /* 30% */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.overlay h2 {
    font-size: 42px;
    color: #FFD700;
    margin-bottom: 10px;
}

.overlay p {
    font-size: 18px;
    max-width: 700px;
}

/* =====================
   COUNTERS
===================== */
.section.counters {
    background: #f4f6fb;
    padding: 50px 5%;
}

.grid-3 {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.card h2 {
    font-size: 40px;
    color: #0A0A5F;
}

.card p {
    color: #0A0A5F;
    font-weight: bold;
}

/* =====================
   FOOTER
===================== */
footer {
    background: #2b2b2b;
    padding: 15px 5%;
    color: #fff;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-center a {
    color: #FFD700;
    font-size: 18px;
    margin: 0 10px;
    transition: 0.3s;
}

.footer-center a:hover {
    color: #999999;
}

.footer-right a {
    color: #fff;
    margin-left: 10px;
}

.footer-right a:hover {
    color: #FFD700;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width:900px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .grid-3 {
        flex-direction: column;
        gap: 25px;
    }
}
/* =====================
   DROPDOWN STABILITY FIX
   (prevents disappearing menus)
===================== */

/* ensure nav items align perfectly */
nav ul {
    align-items: center;
}

/* remove hover gap */
nav ul li {
    position: relative;
    padding-bottom: 2px; /* creates hover bridge */
}

/* lock dropdown directly under parent */
nav ul li ul.dropdown {
    top: calc(100% - 2px);  /* removes invisible gap */
    left: 0;
    border-top: 3px solid #FFD700; /* SACCO accent line */
}

/* keep dropdown open while hovering inside it */
nav ul li:hover > ul.dropdown,
nav ul li ul.dropdown:hover {
    display: block;
}

/* smoother interaction */
nav ul li ul.dropdown li {
    width: 100%;
}

/* prevent flicker */
nav ul li ul.dropdown {
    pointer-events: auto;
}
