/* ==================================================
   GLOBAL STYLES & BRAND COLORS
================================================== */
:root {
  /* Core Brand Palette */
  --brand-navy: #073B4C;
  --brand-blue: #118AB2;
  --brand-green: #06D6A0;
  --brand-yellow: #FFD166;
  --brand-white: #FCFCFC;

  /* Accessible Text Variants */
  --brand-blue-text: #0D5F7A;
  --brand-green-text: #048A6B;
  --brand-yellow-text: #B39B2A;

  /* Call-to-Action */
  --cta-base: #FF6B6B;
  --cta-hover: #D94B4B;

  /* Accent Palette */
  --accent-blue-light: #6EC1E4;
  --accent-navy-dark: #0D2C47;
  --accent-aqua: #B2EBF2;
  --accent-coral: #FF8C8C;
  --accent-violet: #4A6FA5;
  --accent-blush: #FFE5E5;
  --accent-orange: #FF8360;

  /* Neutral Shades */
  --neutral: #F5F5F5;
  --dark: #333333;
  --light: #FFFFFF;

  /* Spacing Scale */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
}

/* ==================================================
   PAGE-LEVEL COLOR SCOPES
================================================== */
body.home                { --primary: var(--brand-blue); --accent: var(--brand-yellow); }
body.about               { --primary: var(--brand-navy); --accent: var(--brand-green); }
body.stories             { --primary: var(--brand-blue); --accent: var(--accent-aqua); }
body.contact             { --primary: var(--brand-navy); --accent: var(--cta-base); }
body.resources           { --primary: var(--brand-navy); --accent: var(--brand-blue); }
body.services            { --primary: var(--brand-blue); --accent: var(--brand-yellow); }

/* Service Pages */
body.social-media         { --primary: var(--brand-navy); --accent: var(--brand-green); }
body.digital-ads          { --primary: var(--accent-orange); --accent: var(--brand-yellow); }
body.website-development  { --primary: var(--brand-navy); --accent: var(--accent-coral); }
body.influencer-marketing { --primary: var(--brand-green-text); --accent: var(--brand-yellow); }
body.ai-solutions         { --primary: var(--brand-navy); --accent: var(--accent-aqua); }
body.content-marketing    { --primary: var(--brand-blue-text); --accent: var(--brand-green); }
body.branding             { --primary: var(--accent-violet); --accent: var(--cta-base); }
body.consulting           { --primary: var(--brand-blue-text); --accent: var(--accent-blush); }

/* Training Pages */
body.training-courses          { --primary: var(--brand-blue-text); --accent: var(--accent-coral); }
body.digital-marketing-training{ --primary: var(--brand-navy); --accent: var(--accent-aqua); }
body.business-training         { --primary: var(--accent-coral); --accent: var(--brand-green-text); }
body.ai-smart-tech             { --primary: var(--brand-blue); --accent: var(--brand-navy); }

/* Resource Posts */
body.resources.digital-marketing-for-east-african-businesses,
body.resources.ai-for-east-african-smes,
body.resources.cultural-marketing-and-storytelling {
  --primary: var(--brand-navy);
  --accent: var(--brand-blue);
}

/* ==================================================
   404 Page
================================================== */

/* Services Page */
body.services {
  --primary: var(--brand-blue);
  --accent: var(--brand-yellow);
}

/* Error page) */
body.not-found {
  --primary: var(--cta-base);
  --accent: var(--brand-yellow);
}


/* ==================================================
   BASE TYPOGRAPHY
================================================== */
html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.625rem;
  color: var(--primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover { color: var(--accent); }

/* ==================================================
   HEADER & NAVIGATION
================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--brand-navy);
  color: var(--light);
  padding: 1rem 2.5rem;
  position: relative;
  z-index: 1000;
}

.site-header .logo a {
  font-size: 1.375rem;
  font-weight: bold;
  color: var(--light);
  height: 60px; /* Assuming the header height is around 60px */
    line-height: 60px


}

/* === NEW STYLES FOR IMAGE LOGO === */
.site-header .logo img {
    /* Resize the 512x512px image to fit header */
    height: 50px; /* Adjust height as needed */
    width: auto;
    display: block;
    /* Vertically center the logo: (header height - logo height) / 2 = 5px */
    margin-top: 5px;


}

.main-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav ul li { margin: 0 0.9375rem; }

.main-nav ul li a {
  display: block;
  padding: 0.9375rem 0.625rem;
  font-weight: 500;
  color: var(--light);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  font-weight: bold;
  color: var(--accent);
}

/* ==================================================
   FULL-WIDTH MEGA MENU
================================================== */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  width: 100%;
  padding: 1.875rem 2.5rem;
  background: var(--brand-blue);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5625rem;
  border-top: 2px solid var(--accent-blue-light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.has-dropdown:hover .dropdown-menu { display: grid; }

.dropdown-menu li a {
  display: block;
  padding: 0.625rem;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--light);
  transition: background 0.2s ease;
}

.dropdown-menu li a:hover { background: var(--accent-blue-light); }

/* ==================================================
   LANGUAGE SWITCHER
================================================== */
.language-switcher {
  display: flex;
  align-items: center;
  margin-left: var(--spacing-sm);
  font-weight: bold;
}

.language-switcher a {
  padding: 0 0.25rem;
  color: var(--light);
  transition: color 0.3s ease;
}

.language-switcher a.active { color: var(--brand-yellow); }
.language-switcher a:hover  { color: var(--brand-blue); }

.language-switcher .lang-divider {
  margin: 0 0.25rem;
  color: var(--light);
}

/* ==================================================
   CTA BUTTON
================================================== */
.cta-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border-radius: 5px;
  font-weight: bold;
  background: var(--cta-base);
  color: var(--light);
  transition: background 0.3s ease;
}

.cta-btn:hover { background: var(--cta-hover); }

/* ==================================================
   SITE FOOTER
================================================== */
.site-footer {
  text-align: center;
  padding: var(--spacing-sm);
  background: var(--brand-navy);
  color: var(--light);
}

.site-footer .footer-links a,
.site-footer .footer-links .link-divider {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

.site-footer .social-icons {
  margin-top: var(--spacing-sm);
}

.site-footer .social-icons a {
  margin: 0 0.625rem;
  font-size: 1.125rem;
  color: var(--light);
  transition: color 0.3s ease;
}

.site-footer .social-icons a:hover {
  color: var(--accent);
}


/* ==================================================
   RESPONSIVE DESIGN
================================================== */
.mobile-menu-toggle { display: none; }

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--light);
    background: none;
    border: none;
    cursor: pointer;
  }

  /* Mobile Menu Toggle Icon */
  .mobile-menu-toggle i {
    color: var(--light);
    font-size: 1.5rem;
    pointer-events: none;
  }

  .mobile-menu-toggle:hover i {
    color: var(--accent);
  }

  .site-header {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1rem 1.25rem;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    background: var(--brand-navy);
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .main-nav.is-active { display: flex; }

  .main-nav ul { flex-direction: column; }
  .main-nav ul li { margin: 0.3125rem 0; }

  .dropdown-menu {
    position: static;
    width: 100%;
    padding: 0.9375rem;
    grid-template-columns: 1fr;
    background: var(--accent-blue-light);
    box-shadow: none;
  }

  .dropdown-menu li a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .dropdown-menu li:last-child a { border-bottom: none; }

  .language-switcher {
    order: -1;
    margin-left: 0;
    margin-right: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .site-header { padding: 1.25rem 3rem; }
  .main-nav ul li { margin: 0 1rem; }
  .main-nav ul li a { padding: 1rem 0.75rem; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .dropdown-menu { padding: 2rem 3rem; gap: 2rem; }
  .site-footer-content { padding: 2rem 3rem; }
}

/* Touch devices - override hover behavior */
@media (max-width: 1024px) {
  .has-dropdown .dropdown-menu.is-open { display: grid; }
}

@media (min-width: 1025px) {
  .site-footer { margin-top: var(--spacing-xl); }
}
