/* ===== RESET / BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f5f2;
  color: #111;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

/* Simple container */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== AFRICAN-INSPIRED ACCENT BAR ===== */
.header-accent-bar {
  height: 11px;
  background-image: repeating-linear-gradient(
    135deg,
    #0e75c2,
    #0e75c2 10px,
    #0e75c2 10px,
    #0e75c2 20px,
    #0e75c2 20px,
    #0e75c2 30px,
    #0e75c2 30px,
    #0e75c2 40px
  );
  position: sticky;
  top: 0;
  z-index: 998;
}

/* ===== HEADER & BRAND ===== */
.site-header {
  position: sticky;
  top: 0;
  height: auto;
  z-index: 999;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.6rem;
}
/* Hidden by default on desktop, used in mobile drawer */
.mobile-nav-header,
.mobile-nav-accent {
  display: none;
}

.brand-mark {
  background: linear-gradient(135deg, #0a9446, #4bb4e6);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== LOGO ===== */
.brand-logo {
  height: 75px;
  width: auto;
  display: inline;
}

@media (max-width: 960px) {
  .brand-logo {
    height: 34px; /* smaller on mobile */
  }
}

/* ===== NAV LIST (DESKTOP DEFAULT) ===== */
.site-nav {
  /* desktop: inline; mobile: becomes drawer */
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  border-radius: 0 !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111;
  padding: 1.2rem 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover: underline only, no bg, NGO clean style */
.nav-link:hover {
  background: none;
  color: #0e75c2;
  box-shadow: none;
  border-bottom: 3px solid #0e75c2;
  border-radius: 0;
  padding-bottom: calc(1.2rem - 3px); /* keep heights equal after underline */
}


/* Active tab uses underline style */
.nav-link.active {
  background: none;
  color: #0e75c2;
  border-bottom: 3px solid #0e75c2;
  border-radius: 0;
}


/* Caret icon */
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #111;
  transition: transform 0.2s ease;
}

.has-dropdown.open > .nav-link .caret {
  transform: rotate(180deg);
}

/* ===== DROPDOWN MENUS (DESKTOP) ===== */
.dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  min-width: 220px;
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  color: #111;
  text-decoration: none;
  border-radius: 0.5rem;
}

/* Clean underline hover inside dropdown */
.dropdown-menu li a:hover {
  background: none;
  color: #0e75c2;
  border-bottom: 2px solid #0e75c2;
  padding-bottom: calc(0.5rem - 2px);
}


/* Show dropdown on hover (desktop) */
.has-dropdown:hover > .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== MOBILE TOGGLE BUTTON ===== */
.nav-toggle {
  display: none;
  border: none;
  background: #0a9446;
  border-radius: 999px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hamburger to X when active */
.nav-toggle.is-active .bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle.is-active .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ===== NAV OVERLAY (MOBILE) ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ===== MOBILE / TABLET STYLES ===== */
/* ========== MOBILE / SMALL SCREEN NAV (<= 960px) ========== */
@media (max-width: 960px) {
  /* Top bar compact brand text */
  .brand-text {
    display: none;
  }

  /* Show hamburger toggle */
  .nav-toggle {
    display: inline-flex;
  }

  /* Left drawer container */
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    max-height: 100vh;
    background-color: #fdfaf5; /* light/off-white theme */
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 6px 0 18px rgba(0, 0, 0, 0.2);
    z-index: 30;

    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* When nav is open */
  body.nav-open .site-nav {
    transform: translateX(0);
  }

  /* Large logo at top of mobile drawer */
  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background-color: #ffffff;
  }

  .mobile-nav-logo {
    max-height: 90px;
    width: auto;
    display: block;
  }

  /* Nav list: scrollable column */
  .nav-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;  /* allow scrolling if menu grows */
  }

  /* Flat links: no background colors or border radius (same as desktop) */
  .nav-link {
    width: 100%;
    justify-content: space-between;
    color: #111;
    padding: 0.6rem 0;
    background: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.98rem;
  }

  .nav-link:hover {
    background: none;
    color: #0e75c2;
    border-bottom-color: #0e75c2;
    box-shadow: none;
  }

  .nav-link.active {
    background: none;
    color: #0e75c2;
    border-bottom-color: #0e75c2;
  }

  .caret {
    border-top-color: #111;
  }

  /* Dropdowns: flat, indented, scrollable if many */
  .dropdown-menu {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-left: 0.75rem;
    margin-bottom: 0.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
  }

  .has-dropdown.open > .dropdown-menu {
    max-height: 500px; /* enough to show all items */
    opacity: 1;
  }

  .dropdown-menu li a {
    padding: 0.4rem 0;
    font-size: 0.92rem;
    color: #333;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  }

  .dropdown-menu li a:hover {
    background: none;
    color: #0e75c2;
    border-bottom-color: #0e75c2;
  }

  /* African accent with Tanzania flag at the bottom */
  .mobile-nav-accent {
    display: block;
    flex: 0 0 16px;
    width: 100%;
    background-image: repeating-linear-gradient(
      135deg,
      #0a9446,
      #0a9446 12px,
      #0e75c2 12px,
      #0e75c2 24px,
      #000000 24px,
      #000000 36px,
      #0e75c2 36px,
      #0e75c2 48px
    );
  }

  /* Overlay covers rest of page when menu is open */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===== PAGE CONTENT DUMMY ===== */
.page-content {
  padding: 2.5rem 1rem;
}

.page-content h1 {
  color: #0a9446;
  margin-bottom: 0.75rem;
}

.page-content p {
  max-width: 640px;
  font-size: 0.98rem;
}
