/*
 * Site-specific additions layered on top of the pifoxen template.
 * Keep template files untouched and add overrides here.
 */

/* --------------------------------------------------
 * Departments dropdown in the main navigation
 * -------------------------------------------------- */

.main-menu .main-menu__list > li.dropdown > a::after,
.stricky-header .main-menu__list > li.dropdown > a::after {
  content: "\f107"; /* fa-angle-down */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 13px;
  margin-left: 6px;
  position: relative;
  top: 1px;
}

.main-menu .main-menu__list > li > ul.main-menu__departments,
.stricky-header .main-menu__list > li > ul.main-menu__departments {
  min-width: 290px;
}

.main-menu .main-menu__list > li > ul.main-menu__departments > li > a,
.stricky-header .main-menu__list > li > ul.main-menu__departments > li > a {
  line-height: 26px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/*
 * Group headings inside the dropdown ("Directorates", "Where We Work").
 * These are labels rather than links, so they opt out of the hover styling
 * and the 1px divider the template puts between sibling items.
 */
.main-menu__departments-heading > span {
  display: block;
  padding: 14px 20px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pifoxen-base);
  white-space: nowrap;
}

.main-menu .main-menu__list > li > ul > li.main-menu__departments-heading,
.stricky-header .main-menu__list > li > ul > li.main-menu__departments-heading {
  border-top: 1px solid RGBA(var(--pifoxen-black), 0.1);
}

.main-menu .main-menu__list > li > ul > li.main-menu__departments-heading:first-child,
.stricky-header .main-menu__list > li > ul > li.main-menu__departments-heading:first-child {
  border-top: 0;
}

.main-menu .main-menu__list > li > ul > li.main-menu__departments-heading:hover,
.stricky-header .main-menu__list > li > ul > li.main-menu__departments-heading:hover {
  background-color: transparent;
}

/* The mobile drawer restyles menu items; keep the headings legible there too */
.mobile-nav__container .main-menu__departments-heading > span {
  padding-left: 0;
  color: var(--pifoxen-base);
}

/* The mobile drawer builds its own toggle button, so hide the desktop caret */
.mobile-nav__container .main-menu__list > li.dropdown > a::after {
  content: none;
}

/* Top-level labels must never break mid-word */
.main-menu .main-menu__list > li > a,
.stricky-header .main-menu__list > li > a {
  white-space: nowrap;
}

/*
 * The header's right-hand section (avatar toggler and donate button) has been
 * removed, leaving the inner-page wrapper with just the logo block and the
 * menu. The template laid that row out with floats and a fixed 58%/82% menu
 * width sized around the buttons that are now gone, which left the links
 * crowded up against the logo.
 *
 * Lay the row out with flex instead: the logo block keeps its natural width
 * and the menu takes whatever remains, aligned to the far right. This gives
 * the links the same breathing room the homepage header gets from the 190px
 * margin on its logo, and it applies at every breakpoint -- below 1200px the
 * menu is just the hamburger toggler, which now sits at the right edge rather
 * than beside the logo.
 */
.main-menu-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-menu-wrapper__left,
.main-menu-wrapper__main-menu {
  float: none;
}

.main-menu-wrapper__main-menu {
  flex: 1 1 auto;
  width: auto;
  justify-content: flex-end;
  margin-left: 60px;
}

@media only screen and (max-width: 1199px) {
  .main-menu-wrapper__main-menu {
    margin-left: 30px;
  }
}

/*
 * The template spaces top-level items 55px apart, which was tight on smaller
 * desktops once a ninth item was added. With the right-hand section gone there
 * is more room, so only a modest tightening is needed before the menu
 * collapses into the mobile drawer at 1200px.
 */
@media only screen and (min-width: 1200px) and (max-width: 1599px) {
  .main-menu .main-menu__list > li + li,
  .stricky-header .main-menu__list > li + li {
    margin-left: 34px;
  }
}

/* --------------------------------------------------
 * Department pages
 * -------------------------------------------------- */

.department__intro {
  padding-top: 60px;
  padding-bottom: 20px;
}

.department__band {
  background-color: var(--pifoxen-extra-two);
  padding: 70px 0;
}

.department__band--dark {
  background-color: #f4f8fd;
}

.department__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.department__list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 14px;
  font-size: 17px;
  line-height: 30px;
  color: var(--pifoxen-gray);
}

.department__list li::before {
  content: "\f00c"; /* fa-check */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 12px;
  color: var(--pifoxen-white);
  background-color: var(--pifoxen-base);
  border-radius: 50%;
  height: 22px;
  width: 22px;
  line-height: 22px;
  text-align: center;
  position: absolute;
  left: 0;
  top: 4px;
}

.department__card {
  background-color: var(--pifoxen-white);
  border-radius: var(--pifoxen-bdr-radius);
  box-shadow: 0px 10px 60px 0px rgba(0, 0, 0, 0.07);
  padding: 32px 30px;
  height: 100%;
  transition: all 400ms ease;
}

.department__card:hover {
  transform: translateY(-6px);
}

.department__card-icon {
  font-size: 42px;
  line-height: 1;
  color: var(--pifoxen-base);
  display: block;
  margin-bottom: 18px;
}

.department__card-title {
  font-size: 20px;
  line-height: 30px;
  margin-bottom: 12px;
  color: var(--pifoxen-black);
}

.department__card-title a {
  color: inherit;
  transition: all 400ms ease;
}

.department__card-title a:hover {
  color: var(--pifoxen-base);
}

.department__card-text {
  font-size: 16px;
  line-height: 28px;
  margin: 0;
}

.department__step {
  background-color: var(--pifoxen-white);
  border-left: 5px solid var(--pifoxen-base);
  border-radius: var(--pifoxen-bdr-radius);
  box-shadow: 0px 6px 30px 0px rgba(0, 0, 0, 0.06);
  padding: 26px 26px 24px;
  height: 100%;
}

.department__step-number {
  background-color: var(--pifoxen-base);
  color: var(--pifoxen-white);
  border-radius: 50%;
  height: 38px;
  width: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-right: 14px;
}

.department__step-title {
  font-size: 18px;
  line-height: 28px;
  margin: 0;
  color: var(--pifoxen-black);
}

.department__quote {
  position: relative;
  padding: 40px 30px;
  text-align: center;
}

.department__quote p {
  font-size: 20px;
  line-height: 36px;
  font-style: italic;
  color: var(--pifoxen-black);
  margin-bottom: 10px;
}

.department__quote cite {
  font-style: normal;
  font-weight: 700;
  color: var(--pifoxen-base);
}

.department__cta {
  background-color: var(--pifoxen-base);
  border-radius: var(--pifoxen-bdr-radius);
  padding: 55px 45px;
  text-align: center;
}

.department__cta h3 {
  color: var(--pifoxen-white);
  font-size: 30px;
  line-height: 44px;
  margin-bottom: 14px;
}

.department__cta p {
  color: RGBA(var(--pifoxen-white-rgb), 0.9);
  margin-bottom: 26px;
}

.department__cta .thm-btn {
  background-color: var(--pifoxen-white);
  color: var(--pifoxen-base);
  margin: 0 6px 10px;
}

.department__cta .thm-btn:hover {
  background-color: var(--pifoxen-black);
  color: var(--pifoxen-white);
}

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

.department__gallery-caption {
  font-size: 15px;
  line-height: 26px;
  color: var(--pifoxen-gray);
  margin: 14px 0 0;
}

/* Keep every thumbnail the same shape whatever the source photo's aspect */
.department__gallery-item .two-section__gallery-img-inner img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
}

.department__band-heading {
  color: var(--pifoxen-white);
}

@media (max-width: 767px) {
  .department__cta {
    padding: 40px 24px;
  }

  .department__cta h3 {
    font-size: 24px;
    line-height: 36px;
  }
}

/* --------------------------------------------------
 * Home: "Join our Global Team" — directorates & fields
 * -------------------------------------------------- */

.we-use__lead {
  color: RGBA(var(--pifoxen-white-rgb), 0.85);
  margin: 18px 0 0;
  font-size: 17px;
}

.we-use__departments {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px auto 38px;
  max-width: 960px;
}

.we-use__department {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 50px;
  background-color: RGBA(var(--pifoxen-white-rgb), 0.1);
  border: 1px solid RGBA(var(--pifoxen-white-rgb), 0.2);
  color: var(--pifoxen-white);
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
  transition: all 400ms ease;
}

.we-use__department:hover {
  background-color: var(--pifoxen-base);
  border-color: var(--pifoxen-base);
  color: var(--pifoxen-white);
  transform: translateY(-3px);
}

.we-use__department-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--pifoxen-primary);
  transition: color 400ms ease;
}

.we-use__department:hover .we-use__department-icon {
  color: var(--pifoxen-white);
}

@media (max-width: 767px) {
  .we-use__department {
    padding: 10px 16px;
    font-size: 14px;
  }

  .we-use__departments {
    gap: 10px;
    margin: 24px auto 30px;
  }
}

/* --------------------------------------------------
 * Home: "Where Your Giving Goes" — Kenya & MK Fund
 * -------------------------------------------------- */

/* This column starts on the section's dark band, so the heading is inverted */
.helping-hands__heading {
  color: var(--pifoxen-white);
}

.helping-hands__causes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 34px;
}

/*
 * White cards, because this column straddles the boundary between the dark
 * band at the top of the section and the light page background below it.
 */
.helping-hands__cause {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background-color: var(--pifoxen-white);
  border-radius: var(--pifoxen-bdr-radius);
  box-shadow: 0px 10px 40px 0px rgba(0, 0, 0, 0.12);
  padding: 26px 28px;
  transition: all 400ms ease;
}

.helping-hands__cause:hover {
  transform: translateY(-5px);
  box-shadow: 0px 16px 50px 0px rgba(0, 0, 0, 0.18);
}

.helping-hands__cause-icon {
  font-size: 34px;
  line-height: 1;
  color: var(--pifoxen-base);
  flex-shrink: 0;
  margin-top: 4px;
}

.helping-hands__cause-title {
  font-size: 19px;
  line-height: 28px;
  color: var(--pifoxen-black);
  margin: 0 0 8px;
}

.helping-hands__cause-text {
  font-size: 15px;
  line-height: 26px;
  color: var(--pifoxen-gray);
  margin: 0 0 10px;
}

.helping-hands__cause-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--pifoxen-base);
}

.helping-hands__cause-link i {
  margin-left: 4px;
  transition: transform 400ms ease;
}

.helping-hands__cause:hover .helping-hands__cause-link i {
  transform: translateX(4px);
}

@media (max-width: 575px) {
  .helping-hands__cause {
    flex-direction: column;
    gap: 12px;
    padding: 22px 20px;
  }
}
