/* ==========================================================================
   BCM UGANDA - MASTER STYLESHEET 
   ========================================================================== */

:root {
    --primary: #001F3F; /* Deep BCM Blue */
    --accent: #001F3F;  
    --text: #333;
    --light: #F4F7F9;
    --text-dark: #1a1a1a;
    --text-light: #555;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Source Sans Pro', sans-serif; 
    line-height: 1.6; 
    color: var(--text); 
    background: #fff; 
    scroll-behavior: smooth; 
}

/* --- HEADER & LOGO --- */
.main-header {
    position: fixed; width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 20px 8%; 
    /* Transparent at top with subtle dark fade so white text stays readable */
    background: linear-gradient(to bottom, rgba(0,31,63,0.7) 0%, transparent 100%); 
    z-index: 1000; border-bottom: none; 
    transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

/* Added by JavaScript when scrolling */
.main-header.scrolled {
    background: var(--primary); 
    padding: 12px 8%; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

.logo { 
    display: flex; align-items: center; gap: 8px; 
    text-decoration: none; transition: 0.3s;
}
.logo:hover { opacity: 0.85; }
.logo img { height: 38px; width: auto; display: block; }
.logo span { 
    font-family: 'Varela Round', sans-serif; 
    color: var(--white) !important; 
    font-weight: 700; font-size: 1.4rem; 
    text-transform: none; letter-spacing: -0.5px; margin-top: 0; 
}

/* --- NAVIGATION --- */
nav ul { display: flex; list-style: none; }
nav ul li { margin: 0 20px; }
nav ul li:last-child { margin-right: 0; } /* Forces perfect right alignment */

nav ul li a { 
    text-decoration: none; color: var(--white); 
    font-weight: 600; font-size: 0.95rem; transition: 0.3s; 
    padding-bottom: 4px; border-bottom: 2px solid transparent; 
}
nav ul li a:hover, .global-link:hover { 
    color: var(--white); opacity: 0.9; border-bottom: 2px solid var(--white); 
}

/* --- UNIVERSAL BUTTONS --- */
.cta-btn { 
    background: var(--white); color: var(--primary); padding: 10px 25px; 
    text-decoration: none; border-radius: 50px; font-size: 0.85rem; 
    transition: 0.3s; border: 2px solid var(--white); 
    font-family: 'Source Sans Pro', sans-serif; font-weight: 700; 
}
.cta-btn:hover { background: transparent; color: var(--white); }

.btn-primary { 
    background: var(--primary); color: white; padding: 15px 35px; 
    text-decoration: none; border-radius: 5px; font-weight: bold; 
    margin-right: 15px; display: inline-block; border: 2px solid var(--primary); 
    font-family: 'Source Sans Pro', sans-serif; 
}
.btn-primary:hover { background: white; color: var(--primary); }

.btn-secondary { 
    border: 2px solid white; color: white; padding: 13px 35px; 
    text-decoration: none; border-radius: 5px; font-weight: bold; 
    display: inline-block; font-family: 'Source Sans Pro', sans-serif; 
}
.btn-secondary:hover { background: white; color: var(--primary); }

/* --- HOME PAGE HERO --- */
.hero { 
    height: 100vh; 
    background: url('images/warehouse.jpg') center/cover no-repeat; 
    display: flex; align-items: center; padding: 0 8%; position: relative; color: white; 
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(0,31,63,0.9), transparent); }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero-content h1 { font-family: 'Source Serif Pro', serif; font-size: 4rem; line-height: 1.1; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* --- HOME PAGE SERVICES --- */
.services-container { padding: 100px 8%; background: var(--light); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title span { color: var(--primary); font-weight: bold; text-transform: uppercase; letter-spacing: 2px; }
.section-title h2 { font-family: 'Source Serif Pro', serif; font-size: 2.5rem; color: var(--primary); }

.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card { background: white; padding: 40px; border-radius: 15px; transition: 0.4s; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.service-card:hover { transform: translateY(-10px); background: var(--primary); color: white; }
.service-card .icon { font-size: 3rem; font-weight: 800; color: rgba(0,0,0,0.05); position: absolute; top: 10px; right: 20px; }
.service-card h3 { margin-bottom: 15px; color: var(--primary); transition: 0.3s; font-family: 'Source Serif Pro', serif; font-size: 1.5rem; }
.service-card:hover h3 { color: white; }

/* --- NEW SERVICE CARD ICONS --- */
.card-icon { width: 50px; height: 50px; margin-bottom: 20px; color: var(--primary); }
.service-card:hover .card-icon { color: white; }
.card-icon svg { width: 100%; height: 100%; }
.service-card .icon { display: none; }

/* --- GLOBAL GATEWAY --- */
.global-gateway { padding: 80px 8%; background: #000; color: white; text-align: center; }
.gateway-box { border: 1px solid var(--primary); padding: 50px; border-radius: 20px; }
.gateway-box h2 { font-family: 'Source Serif Pro', serif; margin-bottom: 15px; }
.gateway-box a { color: white; font-weight: bold; text-decoration: none; border-bottom: 2px solid white; margin-top: 20px; display: inline-block; }

/* --- CONTACT PAGE --- */
.contact-hero { padding: 160px 8% 80px; background: linear-gradient(135deg, var(--primary) 0%, #003366 100%); color: white; text-align: center; }
.contact-hero h1 { font-family: 'Source Serif Pro', serif; font-size: 3rem; margin-bottom: 15px; }
.contact-hero p { font-size: 1.1rem; opacity: 0.8; max-width: 600px; margin: 0 auto; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; max-width: 1200px; margin: -50px auto 100px; padding: 0 5%; }
.contact-info { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); height: fit-content; }
.info-card { margin-bottom: 35px; }
.info-card h3 { color: var(--primary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; border-left: 3px solid var(--primary); padding-left: 15px; }
.info-card p { color: var(--text-light); font-size: 1rem; line-height: 1.8; }

.contact-form-container { background: white; padding: 50px; border-radius: 15px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; }
.premium-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.premium-form input, .premium-form select, .premium-form textarea { width: 100%; padding: 16px; border: 1px solid #e0e0e0; border-radius: 8px; background: #fafafa; font-size: 0.95rem; font-family: 'Source Sans Pro', sans-serif; transition: all 0.3s ease; }
.premium-form input:focus, .premium-form select:focus, .premium-form textarea:focus { border-color: var(--primary); background: #fff; outline: none; }
.submit-btn { background: var(--primary); color: white; border: none; padding: 18px 40px; font-size: 1rem; font-weight: 700; border-radius: 8px; cursor: pointer; width: 100%; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px; font-family: 'Source Sans Pro', sans-serif; }
.submit-btn:hover { background: white; color: var(--primary); border: 2px solid var(--primary); }

.map-section { width: 100%; height: 450px; filter: grayscale(100%); transition: 0.5s; }
.map-section:hover { filter: grayscale(0%); }

/* --- ABOUT PAGE --- */
.about-hero { height: 60vh; background: linear-gradient(rgba(0,31,63,0.7), rgba(0,31,63,0.7)), url('https://images.unsplash.com/photo-1578575437130-527eed3abbec?auto=format&fit=crop&q=80'); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.about-narrative { padding: 100px 8%; background: white; }
.container { max-width: 1200px; margin: 0 auto; }
.narrative-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; align-items: center; }
.text-block h2 { font-family: 'Source Serif Pro', serif; font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.text-block p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 20px; }
.stat-box { background: var(--primary); padding: 40px; border-radius: 20px; color: white; display: flex; flex-direction: column; gap: 30px; }
.stat-item .number { display: block; font-size: 3rem; font-weight: 700; color: white; }
.stat-item .label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.mission-vision { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-light); padding: 80px 8%; gap: 40px; }
.mission-card { background: white; padding: 50px; border-left: 5px solid var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.mission-card h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.5rem; font-family: 'Source Serif Pro', serif; }
.global-bridge { padding: 100px 8%; text-align: center; max-width: 900px; margin: 0 auto; }
.global-bridge h2 { font-family: 'Source Serif Pro', serif; margin-bottom: 20px; color: var(--primary); }
.global-bridge a { color: var(--primary); text-decoration: none; font-weight: bold; border-bottom: 2px solid var(--primary); }

/* --- NEW TEAM SECTION (About Page) --- */
.team-section { padding: 80px 8%; background: var(--light); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.team-member { background: white; padding: 25px; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.team-photo { width: 130px; height: 130px; border-radius: 50%; background-color: #e0e0e0; background-size: cover; background-position: center top; margin: 0 auto 20px; border: 4px solid var(--primary); }
.team-member h3 { color: var(--primary); font-family: 'Source Serif Pro', serif; font-size: 1.25rem; margin-bottom: 5px; }
.team-member p { color: var(--text-light); font-weight: 600; font-size: 0.9rem; }

/* --- QUOTE PAGE --- */
.bg-light-alt { background-color: #f0f4f8; }
.quote-header { padding: 160px 8% 100px; background: linear-gradient(135deg, var(--primary) 0%, #003366 100%); color: white; text-align: center; clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%); }
.quote-header h1 { font-family: 'Source Serif Pro', serif; }
.premium-quote-form { max-width: 950px; margin: -80px auto 100px; background: #ffffff; padding: 60px; border-radius: 24px; box-shadow: 0 40px 100px rgba(0, 31, 63, 0.12); border: 1px solid rgba(255, 255, 255, 0.5); position: relative; z-index: 10; }
.form-group-wrapper { margin-bottom: 50px; }
.group-header { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 30px; display: flex; align-items: center; letter-spacing: 0.5px; }
.group-header span { background: var(--primary); color: white; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; margin-right: 18px; font-size: 0.9rem; font-weight: 800; }
.input-field { margin-bottom: 25px; }
.input-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; color: var(--primary); opacity: 0.9; }
.premium-quote-form input, .premium-quote-form select, .premium-quote-form textarea { width: 100%; padding: 18px 22px; background: #f9fbfd; border: 2px solid #e2e8f0; border-radius: 14px; font-size: 1rem; color: var(--primary); font-family: 'Source Sans Pro', sans-serif; transition: all 0.3s; }
.premium-quote-form input:focus, .premium-quote-form select:focus, .premium-quote-form textarea:focus { outline: none; background: #ffffff; border-color: var(--primary); }

.checkbox-row {
    display: flex; align-items: center; justify-content: flex-start; 
    gap: 15px; padding: 15px 20px; background: #f4f7f9; 
    border-radius: 10px; cursor: pointer; transition: 0.3s;
}
.checkbox-row:hover { background: #e2e8f0; }
.premium-quote-form input[type="checkbox"] {
    width: 22px !important; height: 22px !important; padding: 0 !important; 
    margin: 0 !important; flex-shrink: 0; accent-color: var(--primary); cursor: pointer;
}
.checkbox-row label {
    margin: 0 !important; font-weight: 500; cursor: pointer; color: var(--primary); font-size: 0.95rem;
}

.quote-submit-btn { width: 100%; background: var(--primary); color: white; border: none; padding: 22px; font-size: 1.1rem; font-weight: 700; border-radius: 14px; cursor: pointer; transition: all 0.4s; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 20px; font-family: 'Source Sans Pro', sans-serif; }
.quote-submit-btn:hover { background: white; color: var(--primary); border: 2px solid var(--primary); }

/* --- SERVICES PAGE DETAILED ROWS --- */
.services-hero { min-height: 60vh; padding: 140px 8% 80px; background: linear-gradient(rgba(0, 31, 63, 0.85), rgba(0, 31, 63, 0.85)), url('https://images.unsplash.com/photo-1494412651409-8963ce7935a7?auto=format&fit=crop&q=80'); background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; color: white; position: relative; }
.services-hero h1 { font-family: 'Source Serif Pro', serif; font-size: 3.5rem; margin-bottom: 20px; }
.service-row { display: flex; min-height: 500px; align-items: center; }
.service-row.reverse { flex-direction: row-reverse; }
.service-image { flex: 1; height: 600px; background-size: cover; background-position: center; }
.service-text { flex: 1; padding: 80px 10%; background: white; }
.service-number { font-size: 0.9rem; font-weight: 800; color: var(--primary); letter-spacing: 3px; display: block; margin-bottom: 20px; }
.service-text h2 { font-family: 'Source Serif Pro', serif; font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.service-text p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 30px; line-height: 1.8; }
.service-features { list-style: none; padding: 0; }
.service-features li { position: relative; padding-left: 30px; margin-bottom: 15px; font-weight: 600; color: var(--primary); }
.service-features li::before { content: "•"; position: absolute; left: 0; color: var(--primary); font-size: 1.5rem; line-height: 1; }
.service-footer-cta { padding: 100px 8%; text-align: center; background: var(--primary); }
.service-footer-cta h2 { font-family: 'Source Serif Pro', serif; font-size: 2rem; color: white; margin-bottom: 30px; }
.service-footer-cta .cta-btn { background: white; color: var(--primary); border-color: white;}
.service-footer-cta .cta-btn:hover { background: transparent; color: white; border: 2px solid white; }

/* --- FOOTER --- */
footer { text-align: center; padding: 40px; font-size: 0.8rem; background: #000; color: #666; }

/* ==========================================================================
   MOBILE RESPONSIVENESS & HAMBURGER MENU
   ========================================================================== */

#menu-toggle { display: none !important; }
.menu-toggle { display: none !important; }
.hamburger { display: none; }

@media (max-width: 992px) {
    /* Hamburger Setup */
    .hamburger {
        display: flex !important; flex-direction: column; gap: 5px;
        cursor: pointer; z-index: 1001; margin-left: auto; 
    }
    .hamburger span {
        display: block; width: 25px; height: 3px; 
        background: var(--white); /* White lines against the blue/transparent header */
        transition: 0.3s ease;
    }

    /* Drawer Setup */
    nav {
        position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
        background: var(--primary); 
        padding-top: 100px; transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3); z-index: 1000;
    }
    nav ul { flex-direction: column; align-items: center; }
    nav ul li { margin: 25px 0; }
    nav ul li a { font-size: 1.2rem; border-bottom: none; }
    nav ul li a:hover { border-bottom: none; opacity: 0.7; }

    /* Menu Logic */
    .menu-toggle:checked ~ nav { right: 0 !important; }
    .menu-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
    .menu-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Header adjustments */
    .main-header { padding: 15px 5%; }
    .cta-btn { display: none !important; } 

    /* Contact Page fixes */
    .contact-wrapper { grid-template-columns: 1fr; margin-top: 20px; gap: 30px; }
    .contact-hero { padding: 120px 5% 40px; }
    
    /* About Page fixes */
    .narrative-grid { grid-template-columns: 1fr; gap: 40px; padding: 50px 5%; }
    .mission-vision { grid-template-columns: 1fr; gap: 30px; padding: 50px 5%; }
    .stat-box { flex-direction: row; justify-content: space-around; text-align: center; padding: 30px 20px; }
    
    /* Responsive fix for Team Grid */
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    /* Services Page fixes */
    .services-hero { padding: 120px 5% 60px; text-align: center; }
    .service-row, .service-row.reverse { flex-direction: column; }
    
    /* FIXED COLLAPSING IMAGES ON MOBILE */
    .service-image { width: 100%; height: 300px; min-height: 300px; flex: none; }
    
    .service-text { padding: 50px 5%; }
    .service-footer-cta { padding: 60px 5%; }

    /* Home Page fixes */
    .hero-content h1 { font-size: 2.5rem; line-height: 1.2; }
    .hero-content p { font-size: 1rem; }
    .btn-primary, .btn-secondary { display: block; text-align: center; margin: 0 0 15px 0; width: 100%; }
    .services-container, .global-gateway { padding: 60px 5%; }
    .service-grid { grid-template-columns: 1fr; gap: 20px; }
    .section-title h2 { font-size: 2rem; }
}

@media (max-width: 600px) {
    /* Small Phone specific fixes */
    .premium-form .form-row { grid-template-columns: 1fr; gap: 15px; }
    
    /* Stack Team Grid on small phones */
    .team-grid { grid-template-columns: 1fr; }
}