/* Mali custom fixes: homepage hero background + order button placement */

/* 1. Homepage hero background image */
#slider {
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url(/wp/wp-content/uploads/2016/07/HJW_2743.jpg);
  background-size: cover;
  background-position: 50% 50%;
}

/* 1b. Remove blank white strip below the footer (theme leaves a 150px
       body margin for a footer-reveal effect that isn't active) */
body {
  margin-bottom: 0 !important;
}

/* 2. Hide the order buttons in the nav (they wrapped onto a second row
      and overlapped the hero headings); they are re-inserted below the
      hero heading by mali-custom.js */
.primary-menu > .menu-item-1400,
.primary-menu > .menu-item-1166 {
  display: none;
}

/* Order buttons row, placed below the hero heading */
.hero-order-buttons {
  margin-top: 30px;
  text-align: center;
  position: relative;
  z-index: 12;
}
.hero-order-buttons a {
  display: inline-block;
  margin: 8px 10px;
  text-decoration: none;
}
.hero-order-buttons a span {
  display: inline-block;
  background-color: #df2a2e;
  color: #fff;
  padding: 12px 18px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.hero-order-buttons a:hover span {
  background-color: #b81f23;
}

/* Homepage slider: give the (empty) info block a bit of presence so the
   buttons sit nicely in the vertical middle of the hero */
#slider .info .hero-order-buttons {
  margin-top: 0;
}

/* 2b. Cleaner header: logo and menu on one row, vertically centered */
@media (min-width: 992px) {
  .header-v1 .center {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .header-v1 .logo {
    float: none;
    line-height: 0;
    flex-shrink: 0;
    margin: 0;
  }
  .header-v1 .logo img {
    height: 52px;
  }
  .header .primary-menu {
    float: none;
    line-height: 80px;
    white-space: nowrap;
  }
  .primary-menu li > a {
    padding: 0 10px;
  }
  .primary-menu .sub-menu li > a {
    padding: 0 15px;
    white-space: nowrap;
  }
}

/* 3. Bigger inner-page heros with breathing room between the top menu
      and the heading */
#page-header {
  height: 88vmin;
  min-height: 560px;
}
#page-header .center {
  padding-top: 110px; /* clear the transparent header/menu overlay */
  box-sizing: border-box;
}

/* Inner pages: heading is vertically centered in #page-header, so pin
   the buttons just below it (heading center sits at 50% + 55px because
   of the 110px top padding) */
.hero-order-buttons--page-header {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + 130px);
  margin-top: 0;
}

@media (max-width: 600px) {
  .hero-order-buttons a {
    display: block;
    margin: 8px auto;
    max-width: 320px;
  }
}
