/* Responsive fixes for phone and tablet layouts. Linked last in <head> on every page. */

/* Footer credit logo: the lazy-load "width:auto" rule let it render at its natural (large) size. */
.et_pb_text_2_tb_footer img {
  width: 40px !important;
  height: auto !important;
  display: inline-block;
  vertical-align: middle;
}

/* Desktop header: 180px margin + 85% width overflowed the viewport below ~1200px.
   The .et-db #et-boc variant matches the higher-specificity rules on 404.html. */
@media only screen and (min-width: 981px) {
  .et_pb_menu_0_tb_header,
  .et-db #et-boc .et-l .et_pb_menu_0_tb_header {
    width: calc(100% - 180px) !important;
  }
}

@media only screen and (min-width: 981px) and (max-width: 1200px) {
  .et_pb_menu_0_tb_header,
  .et-db #et-boc .et-l .et_pb_menu_0_tb_header {
    margin-left: 20px !important;
    width: calc(100% - 40px) !important;
  }
  .et_pb_menu_0_tb_header .et-menu > li {
    padding-right: 14px;
  }
  .et_pb_menu_0_tb_header.et_pb_menu ul li a {
    font-size: 14px;
  }
}

/* Tablet and phone */
@media only screen and (max-width: 980px) {
  /* Header logo was 200px tall on tablets. */
  .et_pb_menu_1_tb_header .et_pb_menu__logo img {
    max-width: 90px !important;
  }

  /* Home page: 5px-wide vertical divider images scale to ~18,000px tall once columns stack. */
  .home .et_pb_image_0,
  .home .et_pb_image_1,
  .home .et_pb_image_2 {
    display: none !important;
  }

  /* Footer bottom bar: text touched the screen edge; centre text and icons. */
  .et_pb_row_1_tb_footer {
    width: 90% !important;
  }
  .et_pb_row_1_tb_footer .et_pb_column {
    margin-bottom: 0 !important;
  }
  .et_pb_text_2_tb_footer,
  .et_pb_text_2_tb_footer p {
    text-align: center !important;
  }
  .et_pb_code_5_tb_footer {
    width: 100% !important;
  }
  .et_pb_code_5_tb_footer .social-icons {
    justify-content: center;
  }

  /* Mobile menu: toggle button for sub-menus (added by js/responsive.js). */
  .et_mobile_menu .menu-item-has-children {
    position: relative;
  }
  .et_mobile_menu .menu-item-has-children > a {
    padding-right: 52px !important;
  }
  .et_mobile_menu .submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #bc5204;
    font-size: 20px;
    line-height: 46px;
    cursor: pointer;
  }
  /* Chevron arrow: points down when closed, up when open. */
  .et_mobile_menu .submenu-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -6px 0 0 -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease, margin 0.2s ease;
  }
  .et_mobile_menu .submenu-toggle[aria-expanded="true"]::before {
    margin-top: -2px;
    transform: rotate(-135deg);
  }
  .et_mobile_menu .sub-menu.visible {
    padding-left: 15px !important;
  }
}

/* Phone */
@media only screen and (max-width: 767px) {
  .et_pb_menu_1_tb_header .et_pb_menu__logo img {
    max-width: 70px !important;
  }
}
