/* ========================================== */
/* KOMESA - MAIN STYLESHEET */
/* Electrical Engineering Company Ltd */
/* ========================================== */

/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - From Logo */
    --primary: #0a1e3d;
    --primary-dark: #061530;
    --primary-light: #1a3a5c;
    
    /* Secondary Colors - Gold from logo */
    --secondary: #c9a84c;
    --secondary-light: #e8d5a3;
    --secondary-dark: #a88a3a;
    --secondary-gradient: linear-gradient(135deg, #c9a84c, #f0d97a);
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f8f7f4;
    --light-gray: #f0ede8;
    --medium-gray: #b8b0a0;
    --dark-gray: #4a453a;
    --text-dark: #1a1a2e;
    --text-gray: #6c757d;
    
    /* Status Colors */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* Shadows */
    --shadow: 0 5px 25px rgba(10, 30, 61, 0.1);
    --shadow-hover: 0 10px 40px rgba(10, 30, 61, 0.2);
    --shadow-gold: 0 5px 25px rgba(201, 168, 76, 0.3);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Border Radius */
    --radius: 8px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
}

.section-header .subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 0;
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: var(--secondary);
    color: var(--white);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: transparent;
    color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.btn-primary.btn-lg {
    padding: 18px 45px;
    font-size: 1.05rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 40px;
}

/* ========================================== */
/* TOP BAR */
/* ========================================== */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 3px solid var(--secondary);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.top-bar-left span,
.top-bar-right span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar i {
    color: var(--secondary);
}

.top-bar .social-icons {
    display: flex;
    gap: 10px;
}

.top-bar .social-icons a {
    color: var(--white);
    transition: var(--transition);
    font-size: 0.9rem;
}

.top-bar .social-icons a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* ========================================== */
/* HEADER - PROFESSIONAL LOGO (MPYA) */
/* ========================================== */
header {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 12px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling - Round & Small */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px; /* Nafasi kati ya picha na maandishi */
    text-decoration: none;
}

/* HAPA NDIPO TUNAWEKA KIKOMO CHA UKUBWA NA KUFANYA IWE DUA */
.logo-image {
    height: 50px;
    width: 50px; /* Weka upana sawa na urefu ili iwe duara */
    border-radius: 50%; /* Inafanya iwe duara (round) */
    object-fit: cover; /* Hukata sehemu za ziada za picha ndani ya duara */
    border: 2px solid var(--secondary); /* Ukingo wa dhahabu */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Kivuli kidogo */
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(201, 168, 76, 0.4);
    border-color: var(--primary);
}

/* Maandishi ya KOMESA - Yaliyopambwa */
.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    transition: var(--transition);
    line-height: 1;
}

.logo-text span {
    color: var(--secondary);
}

.logo a:hover .logo-text {
    color: var(--secondary);
}

/* Navigation */
.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.main-nav ul li a {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    border-bottom: 3px solid transparent;
    position: relative;
    font-size: 0.95rem;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: var(--transition);
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-nav {
    background: var(--secondary);
    color: var(--white);
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--secondary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================== */
/* FOOTER */
/* ========================================== */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
}

.footer-logo h3 {
    font-size: 1.4rem;
    color: var(--white);
}

.footer-col p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-item i {
    color: var(--secondary);
    margin-top: 4px;
    font-size: 1.1rem;
}

.contact-item span {
    color: rgba(255,255,255,0.7);
}

.footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.footer-bottom p a {
    color: var(--secondary);
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--secondary);
}

/* ========================================== */
/* HIDDEN ADMIN TRIGGER */
/* ========================================== */
.admin-trigger {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.12);
    z-index: 999;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.5);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.admin-trigger:hover {
    color: var(--secondary);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    transform: scale(1.1);
}

/* ========================================== */
/* RESPONSIVE */
/* ========================================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 10px;
    }
    
    .btn-nav {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.7rem;
    }
    h3 {
        font-size: 1.2rem;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 25px;
        font-size: 0.85rem;
    }
    
    /* KUPUNGUZA LOGO KWENYE SIMU */
    .logo-image {
        height: 40px;
        width: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--secondary);
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .logo a {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .top-bar-left,
    .top-bar-right {
        flex-direction: column;
        gap: 5px;
    }
    
    /* LOGO NDOGO ZAIDI KWENYE SIMU NDOGO */
    .logo-image {
        height: 35px;
        width: 35px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--secondary);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo a {
        gap: 6px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    
    .admin-trigger {
        width: 24px;
        height: 24px;
        font-size: 10px;
        bottom: 8px;
        right: 8px;
    }
}