/* --- Global Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* --- Navigation (Stacked Layout) --- */
nav {
    display: flex;
    flex-direction: column; /* Stacks Logo above Links */
    align-items: center;    /* Centers everything */
    background: #ffffff;
    padding: 20px 5%;
    position: relative; 
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    margin-bottom: 15px; 
    text-align: center;
    width: 100%;
}

#company-logo {
    height: 120px; 
    width: auto;
    max-width: 100%;
    display: inline-block;
    transition: 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap; 
    justify-content: center; 
    width: 100%;
    padding: 0;
}

.nav-links li {
    margin: 0 25px; 
}

.nav-links a {
    text-decoration: none;
    color: #232f3e;
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    font-size: 1rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #ff9900;
    border-bottom: 2px solid #ff9900; 
}


/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(35, 47, 62, 0.8), rgba(35, 47, 62, 0.8)), url('sino-africa.jpg') no-repeat center center/cover;
    height: 80vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* --- Mission Section --- */
#mission {
    padding: 80px 0;
    background: #f4f4f4;
    text-align: center;
}

.mission-statement {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 20px auto 50px;
    color: #555;
}

.mission-pillars {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.pillar {
    flex: 1;
    min-width: 280px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border-top: 5px solid #ff9900;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* --- Zanzibar Project Section --- */
#projects {
    padding: 80px 0;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.project-content {
    flex: 1;
    min-width: 300px;
}

.project-image {
    flex: 1;
    min-width: 300px;
}

.project-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-list {
    margin-top: 20px;
    list-style: none;
}

.project-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.project-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: #ff9900;
}

/* --- Partners & Recruitment --- */
#partners {
    padding: 80px 0;
    background: #232f3e;
    color: #fff;
    text-align: center;
}

.partner-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.partner-item {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 5px;
    width: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Contact & Footer --- */
#contact {
    padding: 80px 0;
}

.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-info, .map-container {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    margin-bottom: 10px;
    color: #ff9900;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary {
    background: #ff9900;
    color: #fff;
}

.btn-secondary {
    background: #232f3e;
    color: #fff;
    margin-top: 20px;
}

.btn-primary:hover, .btn-secondary:hover {
    opacity: 0.8;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    nav { 
        flex-direction: column; 
        padding: 20px;
    }
    
    .logo-container {
        margin-bottom: 20px;
    }
    
    .nav-links { 
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-links li { 
        margin: 10px 15px; 
    }
}

/* 1. The Base Engine */
.flag-hover {
  position: relative; /* Essential for positioning the gradient */
  z-index: 1;         /* Establishes a stacking context */
  transition: transform 0.3s ease; /* Optional: subtle pop effect */
}

/* 2. The Invisible Flag Layer */
.flag-hover::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* Fills the ENTIRE box */
  z-index: -1;   /* Puts color behind the text */
  opacity: 0;    /* Hidden by default */
  transition: opacity 0.3s ease;
  border-radius: 5px; /* MATCHES .partner-item border-radius */
}

/* 3. The Trigger */
.flag-hover:hover::before {
  opacity: 0.5; /* Higher opacity needed to show over the dark background */
}

/* 4. Country Specific Gradients */

/* Tanzania */
.flag-hover.tanzania::before {
  background: linear-gradient(135deg, 
    #1EB53A 30%, 
    #FCD116 30%, #FCD116 34%, 
    #000000 34%, #000000 66%, 
    #FCD116 66%, #FCD116 70%, 
    #00A3DD 70%
  );
}

/* Kenya */
.flag-hover.kenya::before {
  background: linear-gradient(180deg, 
    #000000 30%, 
    #FFFFFF 30%, #FFFFFF 33%, 
    #BB0000 33%, #BB0000 67%, 
    #FFFFFF 67%, #FFFFFF 70%, 
    #006600 70%
  );
}

/* Uganda */
.flag-hover.uganda::before {
  background: linear-gradient(180deg, 
    #000000 16.6%, #FCDC04 16.6%, #FCDC04 33.3%, 
    #D90000 33.3%, #D90000 50%, 
    #000000 50%, #000000 66.6%, 
    #FCDC04 66.6%, #FCDC04 83.3%, 
    #D90000 83.3%
  );
}

/* Mauritius */
.flag-hover.mauritius::before {
  background: linear-gradient(180deg, 
    #EA2839 25%, 
    #1A206D 25%, #1A206D 50%, 
    #FFD500 50%, #FFD500 75%, 
    #00A551 75%
  );
}

/* Improve spacing within the Projects section */
#projects .project-content h2 {
    margin-bottom: 20px;
}

#projects .project-content h3 {
    margin-bottom: 20px;
}

#projects .project-content p {
    margin-bottom: 25px;
}

#projects .project-content {
    padding-right: 20px; /* gives text more breathing room from image */
}

/* --- New paragraph under mission statement --- */
.philosophy-statement {
    max-width: 800px;
    margin: 0 auto 50px auto;  /* centers the text and adds bottom space before pillars */
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    text-align: left;          /* better readability for longer text */
    font-style: normal;
    padding: 0 15px;           /* slight side padding on narrow screens */
}