/* ================== CSS VARIABLES ================== */
:root {
    --primary: #004080;
    --accent: #ff8c00;
    --light-gray: #f4f6f9;
    --text-gray: #555;
    --white: #ffffff;
    --dark-blue: #005b8e;
    --whatsapp-green: #25D366;
    --gold: #D4AF37;
}

/* ================== BASE STYLES ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-gray);
    overflow-x: hidden;
}

.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ================== HEADER STYLES ================== */
.sacco-header {
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Top Bar */
.top-bar {
    background: var(--light-gray);
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-info, .quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar a, .top-bar span {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--primary);
}

/* ================== TEAM MEMBERS SECTION ================== */
.team-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 300px);
}

.page-title {
    text-align: center;
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
}

.page-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

/* Team Members Grid */
.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Loading placeholder for images */
.member-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.team-member {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Member Image */
.member-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.member-image:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}

/* Member Info */
.member-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.member-name {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.member-position {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.member-position:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.member-bio {
    margin-top: auto;
    padding-top: 15px;
}

.member-bio p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ================== RESPONSIVE BREAKPOINTS ================== */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .team-members {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
        padding: 15px;
    }
    
    .team-section {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .team-members {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .member-image {
        height: 220px;
    }
    
    .member-info {
        padding: 20px;
    }
    
    .member-name {
        font-size: 1.3rem;
    }
    
    .page-title {
        font-size: 2rem;
        padding: 0 15px;
    }
}

/* Large Mobile */
@media (max-width: 600px) {
    .team-members {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .team-member {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .member-image {
        height: 280px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        padding: 0 20px;
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .team-members {
        gap: 15px;
        padding: 10px;
    }
    
    .member-image {
        height: 250px;
    }
    
    .team-section {
        padding: 30px 0;
    }
    
    .page-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }
    
    .page-subtitle {
        margin-bottom: 30px;
        font-size: 0.95rem;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .team-members {
        padding: 5px;
    }
    
    .team-member {
        border-radius: 12px;
    }
    
    .member-image {
        height: 220px;
    }
    
    .member-info {
        padding: 15px;
    }
    
    .member-name {
        font-size: 1.2rem;
    }
}

/* ================== ACCESSIBILITY ENHANCEMENTS ================== */
.team-member:focus-within {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.member-image img[alt=""] {
    border: 2px dashed #ccc;
}

/* ================== PRINT STYLES ================== */
@media print {
    .team-section {
        background: none;
        padding: 20px 0;
    }
    
    .team-members {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .team-member {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .team-member:hover {
        transform: none;
    }
}

.separator {
    color: #ccc;
}

.top-menu-link {
    margin-right: 15px;
    white-space: nowrap;
}

.mpesa-icon {
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Blinking Button */
#blinking-button, .btn-balozi-50 {
    background-color: var(--gold) !important;
    color: var(--white);
    border: 0;
    padding: 8px 20px;
    border-radius: 48px 0px;
    animation: blink 1s linear infinite;
    font-weight: bold;
    white-space: nowrap;
}

#blinking-button a, .btn-balozi-50 a {
    color: var(--white);
    text-decoration: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Navigation */
.site-nav {
    padding: 15px 0;
    background: var(--white);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand img {
    max-height: 60px;
    width: auto;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
}

.menu-icon {
    font-size: 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.portal-btn {
    background: var(--accent);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    white-space: nowrap;
}

.portal-btn:hover {
    background: #e67e00;
    transform: translateY(-2px);
}

/* ================== MAIN CONTENT ================== */
.page-banner img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

.main-content {
    padding: 40px 0;
}

.inner {
    min-height: 500px;
}

/* ================== FLOATING SOCIAL ICONS ================== */
.floating-social-icons {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.social-icon.fb { background: #3b5998; }
.social-icon.tw { background: #1da1f2; }
.social-icon.li { background: #e4405f; }

/* ================== LATEST NEWS ================== */
.latest-news {
    padding: 60px 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary);
    font-size: 2rem;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 10px auto;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-body {
    padding: 20px;
}

.news-body h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    min-height: 60px;
}

.news-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-link:hover {
    color: var(--primary);
}

/* ================== FOOTER ================== */
.footer-section {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-top {
    margin-bottom: 40px;
}

.footer-column {
    margin-bottom: 30px;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-column p {
    margin-bottom: 15px;
    color: #ddd;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-column p i {
    color: var(--accent);
    margin-top: 3px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* ================== WHATSAPP FLOAT ================== */
.whatsapp-float {
    position: fixed;
    z-index: 9999;
}

.whatsapp-float.bottom-right {
    bottom: 20px;
    right: 20px;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    background: var(--whatsapp-green);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    padding: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.whatsapp-float a img {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.whatsapp-tooltip {
    background: var(--whatsapp-green);
    color: white;
    font-weight: bold;
    margin-left: 10px;
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 25px;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.whatsapp-float a:hover .whatsapp-tooltip {
    transform: translateX(0);
    opacity: 1;
}

.whatsapp-float a:hover {
    padding-right: 15px;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* ================== TABS COMPONENT ================== */
.balozi-sacco-tabs {
    font-family: 'Arial', sans-serif;
    max-width: 1200px !important;
    margin: 0 auto 40px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.balozi-sacco-tabs .tab-header {
    display: flex;
    justify-content: space-around;
    background: var(--primary);
    flex-wrap: wrap;
}

.balozi-sacco-tabs .tab-header .tab-btn {
    flex: 1;
    min-width: 200px;
    padding: 16px;
    color: white;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: none;
    background: var(--primary);
    transition: background 0.3s, color 0.3s;
    font-size: 1rem;
}

.balozi-sacco-tabs .tab-header .tab-btn:hover {
    background: var(--dark-blue);
}

.balozi-sacco-tabs .tab-header .tab-btn.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.balozi-sacco-tabs .tab-content {
    padding: 30px;
    background: white;
}

.balozi-sacco-tabs .tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.balozi-sacco-tabs .tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.balozi-sacco-tabs .product-title {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 12px;
}

.balozi-sacco-tabs .product-desc {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.balozi-sacco-tabs .features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.balozi-sacco-tabs .feature {
    flex: 1 1 300px;
    background: #f1f5f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.balozi-sacco-tabs .feature:hover {
    transform: translateY(-4px);
}

.balozi-sacco-tabs .feature h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.balozi-sacco-tabs .feature p {
    margin: 0;
    color: #555;
}

.balozi-sacco-tabs .benefits {
    margin-bottom: 20px;
}

.balozi-sacco-tabs .benefits h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.balozi-sacco-tabs .benefits ul {
    list-style: disc;
    padding-left: 20px;
}

.balozi-sacco-tabs .benefits li {
    margin-bottom: 6px;
    color: #333;
}

.balozi-sacco-tabs .tab-btn-container {
    margin-top: 20px;
}

.balozi-sacco-tabs .tab-btn-container .btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    border: none;
}

.balozi-sacco-tabs .tab-btn-container .btn:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
}

.info-box {
    text-align: center;
    padding: 25px;
    background: #eaf1f9;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.info-box h3 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 12px;
}

.info-box p {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
}

/* ================== MILESTONE SECTION ================== */
.milestone {
    width: 100%;
    height: auto;
}

.milestone-section {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.milestone-text,
.milestone-img {
    flex: 1 1 300px;
    max-width: 500px;
    text-align: center;
}

.milestone-text p {
    padding: 10px 20px;
    font-size: 16px;
}

.milestone-text strong {
    font-size: 18px;
}

.milestone-img img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* =================