* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    padding-top: var(--header-offset, 140px); /* Space for fixed header */
}

:root {
    /* Kingdom Life SACCO brand palette */
    --brand-blue: #0066CC;
    --brand-gold: #FFD700;
    --brand-orange: #FF8C00; /* deeper, stronger orange */
    --brand-white: #ffffff;
    --brand-dark: #001b3d;
    --brand-text: #333333;

    /* Layout tokens */
    --header-offset: 140px;
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    /* Account for fixed header padding so hero still feels like "one screen" */
    height: calc(100vh - var(--header-offset, 140px));
    min-height: 520px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.8);
    transition: transform 6s ease-out;
}

.hero-slide.active img {
    transform: scale(1);
    animation: zoomOutEffect 6s ease-out;
}

@keyframes zoomOutEffect {
    0% {
        transform: scale(1.8);
    }
    100% {
        transform: scale(1);
    }
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 40px 60px 30px;
    z-index: 3;
}

.hero-text-container {
    /* Dark overlay for hero captions (avoid any yellow/orange blocks) */
    background-color: rgba(0, 0, 0, 0.65);
    background-image: none;
    padding: 20px 35px;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--brand-white);
    margin-bottom: 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--brand-white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Navigation Arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav:hover {
    background: rgba(0, 102, 204, 0.8);
}

.hero-nav.prev-btn {
    left: 20px;
}

.hero-nav.next-btn {
    right: 20px;
}

/* Slide Indicators */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: var(--brand-orange);
    width: 30px;
    border-radius: 6px;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--brand-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-header {
    background: var(--brand-blue);
    color: var(--brand-white);
    padding: 15px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    position: relative;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo-text h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--brand-white);
}

.logo-text p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--brand-gold);
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.phone-number {
    font-size: 1.1rem;
    font-weight: bold;
}

.btn-orange {
    background: var(--brand-orange);
    color: #000;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-orange:hover {
    background: var(--brand-gold);
    color: #000;
}

.main-navbar {
    background: var(--brand-white);
    border-bottom: 2px solid var(--brand-gold);
    padding: 0;
    overflow: visible;
}

.main-navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    margin-left: auto;
}

.nav-menu li {
    margin: 0;
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--brand-text);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--brand-blue);
    background: rgba(0, 102, 204, 0.1);
    border-bottom-color: var(--brand-gold);
}

/* Dropdown Menu */
.nav-menu li.dropdown {
    position: relative;
}

.nav-menu li.dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--brand-white);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border-top: 3px solid var(--brand-gold);
    display: block;
    pointer-events: none;
}

.nav-menu li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
    pointer-events: auto;
}

.dropdown-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    padding: 12px 20px;
    color: var(--brand-text);
    display: block;
    border-bottom: none;
    transition: all 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(0, 102, 204, 0.1);
    color: #0066CC;
    padding-left: 25px;
}


/* News Section */
.news-section {
    padding: 80px 0;
    background: #f8f9fa;
}

/* Featured Products & Services uses same layout, but white background to separate it */
.featured-section {
    padding: 80px 0;
    background: var(--brand-white);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.news-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--brand-blue);
    margin: 0;
}

.news-title span {
    color: var(--brand-gold);
}

.news-nav-controls {
    display: flex;
    gap: 10px;
}

.news-nav-btn {
    width: 40px;
    height: 40px;
    background: var(--brand-orange);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.news-nav-btn:hover {
    background: var(--brand-blue);
    color: var(--brand-white);
    transform: scale(1.1);
}

.news-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.news-carousel {
    display: flex;
    gap: 30px;
    transition: transform 0.8s ease-in-out;
    will-change: transform;
}

.news-item {
    min-width: 320px;
    flex-shrink: 0;
}

.news-card {
    background: var(--brand-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-overlay-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 102, 204, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.badge-content {
    text-align: center;
}

.badge-content h4 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.badge-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.btn-badge {
    background: var(--brand-orange);
    color: #000;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-badge:hover {
    background: var(--brand-gold);
    color: #000;
}

.news-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 102, 204, 0.9);
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--brand-blue);
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-text {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.btn-read-more {
    display: inline-block;
    background: var(--brand-blue);
    color: var(--brand-white);
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    align-self: flex-start;
    font-weight: bold;
}

.btn-read-more:hover {
    background: var(--brand-orange);
    color: #000;
    transform: translateX(5px);
}

/* Footer */
.main-footer {
    background: var(--brand-blue);
    color: var(--brand-white);
    padding: 60px 0 20px;
    position: relative;
}

/* Orange accent bar to better match brand */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-orange), var(--brand-gold), var(--brand-orange));
}

.footer-logo-section {
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.footer-logo-icon {
    width: 60px;
    height: 60px;
    position: relative;
    flex-shrink: 0;
}

.footer-logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-logo-text h3 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--brand-white);
    font-weight: bold;
}

.footer-tagline {
    font-size: 0.85rem;
    margin: 0;
    color: var(--brand-orange);
    font-style: italic;
}

.footer-reach-us h4 {
    color: var(--brand-orange);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-contact {
    margin-bottom: 8px;
    color: var(--brand-white);
}

.footer-branch-link {
    color: var(--brand-orange);
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    margin-top: 10px;
}

.footer-branch-link:hover {
    color: var(--brand-white);
    text-decoration: underline;
}

/* Footer Social Media Section (Right Side) */
.footer-social-section {
    margin-bottom: 30px;
}

.footer-social-section h4 {
    color: var(--brand-orange);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

.footer-social-horizontal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-white);
    text-decoration: none;
    transition: all 0.3s;
    padding: 8px 0;
}

.footer-social-item:hover {
    color: var(--brand-orange);
    transform: translateX(5px);
}

.footer-social-icon-horizontal {
    width: 35px;
    height: 35px;
    background: rgba(255, 140, 0, 0.85);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.3s;
    font-weight: bold;
}

.footer-social-item:hover .footer-social-icon-horizontal {
    background: var(--brand-orange);
    transform: scale(1.1);
}

.footer-social-name {
    font-size: 0.95rem;
    color: inherit;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--brand-orange);
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--brand-white);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-arrow {
    color: var(--brand-orange);
    margin-right: 5px;
}

.footer-links a:hover {
    color: var(--brand-gold);
}

.footer-links a:hover .footer-arrow {
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 140, 0, 0.35);
    padding-top: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-privacy-link {
    color: var(--brand-white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-privacy-link:hover {
    color: var(--brand-orange);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-offset: 200px;
    }

    body {
        padding-top: var(--header-offset, 200px);
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-text-container {
        padding: 20px 30px;
        margin: 0 20px;
    }

    .hero-overlay {
        padding: 30px 20px 20px;
    }


    .top-header-right {
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-menu a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        margin-left: 20px;
        display: none;
    }

    .nav-menu li.dropdown:hover .dropdown-menu,
    .nav-menu li.dropdown.active .dropdown-menu {
        display: block;
    }

    .news-title {
        font-size: 1.8rem;
    }

    .news-item {
        min-width: 280px;
    }

    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-logo {
        flex-direction: column;
        text-align: center;
    }

    .footer-social-horizontal {
        gap: 10px;
    }

    .footer-social-item {
        padding: 6px 0;
    }

    .footer-bottom {
        text-align: center;
    }

    .footer-bottom .text-end {
        text-align: center !important;
        margin-top: 10px;
    }
}
                                                                                                             