/* =====================================================================
   Mother's Heart Uganda - site-wide custom styles
   Loaded on every page, last (after sections.css).
   Rule order matters (later rules win), so keep the order below.
   ===================================================================== */


/* ---------- .wrap - centred page column ----------
   Full width on phones, then 540 / 720 / 960 / 1140px wide on bigger
   screens, with 15px space on each side. */

.wrap {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  word-wrap: break-word;
}
@media (min-width: 576px)  { .wrap { max-width: 540px; } }
@media (min-width: 768px)  { .wrap { max-width: 720px; } }
@media (min-width: 992px)  { .wrap { max-width: 960px; } }
@media (min-width: 1200px) { .wrap { max-width: 1140px; } }


/* ---------- Top menu (fixed at the top of every page) ----------
   Desktop (992px+): logo + name on the left, links on the right,
   dropdowns open on hover.
   Phones/tablets: logo + name, and a 4-line "hamburger" button that
   opens the links as a white panel on the right (class "opened").
   site.js adds "scrolled" once the page is scrolled (slimmer bar)
   and "open" to a dropdown while it is showing. */

/* Height of the menu bar. Between 993 and 1269px the links don't fit
   on one line and the bar becomes taller. A section with class
   "page-top" (first section of a page) adds this as space on top, so
   nothing hides behind the menu. */
:root { --menu-height: 82px; }
@media (min-width: 768px) { :root { --menu-height: 77px; } }
@media (min-width: 993px) and (max-width: 1269px) { :root { --menu-height: 124px; } }

.site-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  flex-wrap: wrap;           /* links drop below the logo when they don't fit */
  align-items: center;
  min-height: 77px;
  padding: .5rem 1rem;
  background: #ffffff;
  transition: all .3s;
}
.site-menu.scrolled {
  min-height: 60px;
}

/* logo + name */
.menu-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 1;
  font-size: 1.25rem;
  white-space: nowrap;
  word-break: break-word;
  text-decoration: none !important;
  transition: all .3s;
}
.menu-brand img {
  display: block;
  height: 3.8rem;
  margin-right: .8rem;
  transition: all .3s ease-in-out;
}
.site-menu.scrolled .menu-brand img {
  height: 3rem;
  margin-right: .5rem;
}
.menu-brand span {
  font-weight: 700;
  line-height: 1.5;
  white-space: normal;
  color: #000000;
}
.menu-brand span:hover {
  color: #4d4d4d;
}

/* the links */
.menu-panel {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: flex-end;
  z-index: 1;
}
.menu-links {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .75rem;
  font-weight: 500;
}
.menu-links > li > a,
.menu-links > li > button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: .667em 1.667em;
  border: 0;
  background: none;
  color: #000000;
  font-weight: 500;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: color .2s ease-in-out;
}
.menu-links > li > :focus {
  color: #4d4d4d;
}
.menu-links > li > :hover {
  color: #c1c1c1;
}

/* dropdowns ("OUR WORK", "GET INVOLVED", ...) */
.menu-dropdown {
  position: relative;
}
.menu-dropdown > button {
  white-space: nowrap;
}
.menu-dropdown > button::after {    /* small triangle */
  content: "";
  display: inline-block;
  margin-left: .25rem;
  border-top: .35em solid;
  border-right: .35em solid transparent;
  border-bottom: 0;
  border-left: .35em solid transparent;
}
.menu-dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 10rem;
  margin: 0;
  padding: 1.25rem 0;
  background: #ffffff;
  background-clip: padding-box;
  font-size: 1rem;
  text-align: left;
}
.menu-dropdown.open > .menu-dropdown-list {
  display: block;
}
.menu-dropdown-list a {
  display: block;
  position: relative;
  width: 100%;
  padding: .25rem 1.5rem;
  color: #000000;
  font-weight: 500;
  line-height: 2;
  white-space: nowrap;
  text-align: inherit;
  text-decoration: none;
  transition: color .2s ease-in-out, background-color .2s ease-in-out;
}
.menu-dropdown-list a:focus {
  color: #4d4d4d;
  outline: 0;
}
.menu-dropdown-list a:hover {
  color: #c1c1c1;
}

/* hamburger button (phones/tablets only) */
.menu-button {
  display: none;
}
.menu-button span {
  position: absolute;
  right: 0;
  width: 30px;
  height: 2px;
  background-color: #000000;
}
.menu-button span:nth-child(1) { top: 0;    transition: all .2s; }
.menu-button span:nth-child(2) { top: 8px;  transition: all .15s; }
.menu-button span:nth-child(3) { top: 8px;  transition: all .15s; }
.menu-button span:nth-child(4) { top: 16px; transition: all .2s; }
/* lines turn into an X when the panel is open */
.site-menu.opened .menu-button span:nth-child(1),
.site-menu.opened .menu-button span:nth-child(4) {
  top: 8px;
  width: 0;
  opacity: 0;
  right: 50%;
  transition: all .2s;
}
.site-menu.opened .menu-button span:nth-child(2) { transform: rotate(45deg);  transition: all .25s; }
.site-menu.opened .menu-button span:nth-child(3) { transform: rotate(-45deg); transition: all .25s; }

@media (max-width: 991px) {
  .site-menu {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .menu-brand {
    flex-shrink: 1;
  }
  .menu-button {
    display: block;
    position: relative;
    align-self: center;
    width: 31px;
    height: 20px;
    padding: .25rem .75rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    outline: none;
    transition: all .2s;
  }
  .menu-panel {
    display: none;
  }
  .menu-links {
    flex-direction: column;
  }
  .menu-links li {
    margin: auto;
  }
  .menu-dropdown-list {
    position: relative;
    top: 0;
    background: transparent;
  }
  .menu-dropdown-list a {
    text-align: center;
  }

  /* panel open */
  .site-menu.opened {
    flex-direction: column;
    justify-content: flex-start;
    max-width: 20rem;
    height: 100vh;
    margin-left: auto;
    text-align: center;
  }
  .site-menu.opened .menu-button {
    order: -1;
    margin: 1rem 0 0;
    align-self: flex-end;
  }
  .site-menu.opened .menu-panel {
    display: block;
    max-height: 100vh;
    overflow: auto;
  }
}


/* ---------- Donate popup (opened by the DONATE button in the menu) ---------- */

.donate-popup {
  display: none;              /* site.js shows it */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  outline: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.donate-popup-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 40%;
  height: 90%;
  margin: 2% auto;
  padding: 20px;
  overflow-y: auto;
  background-color: #fefefe;
  background-clip: padding-box;
  border: 1px solid #888;
  border-radius: .3rem;
  outline: 0;
}
@media (max-width: 768px) {
  .donate-popup-box {
    width: 60%;
    height: 75%;
    margin: 25% auto;
  }
}

/* Close (x) */
.donate-popup-close {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #aaa;
  text-shadow: 0 1px 0 #fff;
  opacity: .5;
}
.donate-popup-close:hover,
.donate-popup-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
  opacity: .75;
}

/* Heading with a thin red underline */
.donate-popup h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 300;
  text-align: center;
  color: #222;
  font-variant: small-caps;
  letter-spacing: 0.5px;
  background-image: linear-gradient(to right, #e63946, #ff7c7c);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: bottom;
  padding-bottom: 5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

/* Text under each provider */
.donate-note {
  margin: 0;
}

/* Provider buttons (logo on a coloured bar) */
.donate-provider {
  display: block;
  width: 100%;
  padding: 12px 0;
  margin: 10px 0;
  color: #163300;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  text-align: center;
  transition: background-color 0.3s ease;
}
.donate-provider.worldremit    { background-color: #604685; }
.donate-provider.paypal        { background-color: #003f87; }
.donate-provider.bank-transfer { background-color: black; }
.donate-provider.pesapal       { background-color: #064dae; }


/* ---------- DONATE button in the menu ---------- */

.donate-menu-button {
  outline: none;
  background-color: #e21d1d;
  color: white;
  font-size: 18px;
  font-weight: normal;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.donate-menu-button:hover {
  transition: background-color 0.5s;
  background-color: #91251e;
}


/* ---------- Bank details popup (opens on top of the donate popup) ---------- */

.bank-popup {
  display: none;              /* site.js shows it */
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  justify-content: center;
  align-items: center;
}

.bank-popup-box {
  position: relative;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: popup .2s ease;
}

.bank-popup-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}
.bank-popup-close:hover {
  color: #777;
}

.bank-popup-box p {
  margin: 12px 0;
  line-height: 1.5;
}

@keyframes popup {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}


/* ---------- Old page sections (until they are rewritten) ---------- */

.container {
  margin: auto;
}
