/* =========================================================
   LOWASTE MOBILE + TABLET NAVIGATION
   Breakpoint: <= 1024px
   Completely isolated from old navigation
   ========================================================= */


/* Desktop: hidden */
.lw-mobile-nav {
  display: none;
}


/* =========================================================
   MOBILE + TABLET
   ========================================================= */

@media (max-width: 1024px) {

  body.lw-mobile-nav-open {
    overflow: hidden;
  }


  /* Hide old navigation on mobile/tablet */
  .contact-header,
  .contact-drawer,
  .gallery-header {
    display: none !important;
  }


  .lw-mobile-nav {
    display: block;
  }


  /* =======================================================
     TOP BAR
     ======================================================= */

  .lw-mobile-nav__bar {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 68px;

    padding: 0 16px;

    background: #ffffff;

    border-bottom: 1px solid rgba(16, 24, 32, .06);
  }


  /* =======================================================
     LOGO
     ======================================================= */

  .lw-mobile-nav__logo {
    display: flex;

    align-items: center;

    flex: 0 0 auto;

    text-decoration: none;
  }


  .lw-mobile-nav__logo img {
    display: block;

    width: auto;
    height: 22px;

    max-width: none;
  }


  /* =======================================================
     BURGER
     ======================================================= */

  .lw-mobile-nav__burger {
    -webkit-appearance: none;
    appearance: none;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 36px;
    height: 36px;

    min-width: 36px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 8px;

    background: #f3f3f3;

    cursor: pointer;
  }


  .lw-mobile-nav__burger span {
    display: block;

    width: 23px;
    height: 2px;

    border-radius: 100px;

    background: #101820;

    transform-origin: center;

    transition:
      transform .25s ease,
      opacity .2s ease;
  }


  body.lw-mobile-nav-open
  .lw-mobile-nav__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }


  body.lw-mobile-nav-open
  .lw-mobile-nav__burger span:nth-child(2) {
    opacity: 0;
  }


  body.lw-mobile-nav-open
  .lw-mobile-nav__burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }


  /* =======================================================
     MAIN DRAWER
     ======================================================= */

  .lw-mobile-nav__drawer {
    position: fixed;

    top: 68px;
    right: 0;
    bottom: 0;
    left: 0;

    z-index: 999;

    display: flex;

    flex-direction: column;
    justify-content: space-between;

    width: 100%;
    height: calc(100dvh - 68px);

    padding: 18px 20px 26px;

    overflow-y: auto;

    color: #101820;

    background: #ffffff;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform: translateY(-10px);

    transition:
      opacity .25s ease,
      visibility .25s ease,
      transform .25s ease;
  }


  body.lw-mobile-nav-open
  .lw-mobile-nav__drawer {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform: translateY(0);
  }


  /* =======================================================
     MAIN LINKS
     ======================================================= */

  .lw-mobile-nav__links {
    display: grid;

    width: 100%;
  }


  .lw-mobile-nav__links > a {
    display: flex;

    align-items: center;

    width: 100%;
    min-height: 55px;

    padding: 0 5px;

    border-bottom: 1px solid #edf0ee;

    color: #15201b;

    font-family: "DM Sans", sans-serif;

    font-size: 1rem;
    font-weight: 500;

    line-height: 1.2;

    text-decoration: none;

    transition: color .2s ease;
  }


  .lw-mobile-nav__links > a:hover,
  .lw-mobile-nav__links > a:focus-visible {
    color: #19815a;
  }


  /* =======================================================
     MORE
     ======================================================= */

  .lw-mobile-nav__more {
    width: 100%;

    border-bottom: 1px solid #edf0ee;
  }


  .lw-mobile-nav__more-toggle {
    -webkit-appearance: none;
    appearance: none;

    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 55px;

    margin: 0;
    padding: 0 5px;

    border: 0;

    color: #15201b;

    background: transparent;

    font-family: "DM Sans", sans-serif;

    font-size: 1rem;
    font-weight: 500;

    text-align: left;

    cursor: pointer;
  }


  /* Chevron circle */

  .lw-mobile-nav__more-icon {
    display: grid;

    place-items: center;

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    border-radius: 50%;

    color: #19815a;

    background: #edf7f2;

    transition:
      color .25s ease,
      background-color .25s ease;
  }


  .lw-mobile-nav__more-icon svg {
    width: 15px;
    height: 15px;

    transition: transform .3s ease;
  }


  .lw-mobile-nav__more.is-open
  .lw-mobile-nav__more-icon {
    color: #ffffff;

    background: #19815a;
  }


  .lw-mobile-nav__more.is-open
  .lw-mobile-nav__more-icon svg {
    transform: rotate(180deg);
  }


  /* =======================================================
     MORE ANIMATION
     ======================================================= */

  .lw-mobile-nav__more-wrap {
    display: grid;

    grid-template-rows: 0fr;

    margin-bottom: 0;

    opacity: 0;

    transition:
      grid-template-rows .32s ease,
      opacity .2s ease,
      margin-bottom .32s ease;
  }


  .lw-mobile-nav__more-wrap >
  .lw-mobile-nav__more-menu {
    overflow: hidden;
  }


  .lw-mobile-nav__more.is-open
  .lw-mobile-nav__more-wrap {
    grid-template-rows: 1fr;

    margin-bottom: 14px;

    opacity: 1;
  }


  /* =======================================================
     MORE PANEL
     ======================================================= */

  .lw-mobile-nav__more-menu {
    display: grid;

    gap: 3px;

    padding: 6px;

    border: 1px solid #e4ece8;
    border-radius: 14px;

    background: #f7faf8;
  }


  /* =======================================================
     SUBMENU ITEMS
     ======================================================= */

  .lw-mobile-nav__more-menu a {
    display: grid;

    grid-template-columns: 36px minmax(0, 1fr);

    align-items: center;

    gap: 12px;

    min-height: 62px;

    padding: 9px 11px;

    border-radius: 10px;

    color: #26312c;

    text-decoration: none;

    transition:
      background-color .2s ease,
      transform .2s ease;
  }


  .lw-mobile-nav__more-menu a:hover,
  .lw-mobile-nav__more-menu a:focus-visible {
    background: #ffffff;

    transform: translateX(2px);
  }


  /* Number box */

  .lw-mobile-nav__submenu-number {
    display: grid;

    place-items: center;

    width: 36px;
    height: 36px;

    border-radius: 9px;

    color: #19815a;

    background: #e7f3ed;

    font-family: "DM Sans", sans-serif;

    font-size: .68rem;
    font-weight: 700;
  }


  /* Text */

  .lw-mobile-nav__submenu-copy {
    display: grid;

    gap: 3px;

    min-width: 0;
  }


  .lw-mobile-nav__submenu-copy strong {
    color: #18221d;

    font-family: "DM Sans", sans-serif;

    font-size: .88rem;
    font-weight: 600;

    line-height: 1.25;
  }


  .lw-mobile-nav__submenu-copy small {
    color: #7d8882;

    font-family: "DM Sans", sans-serif;

    font-size: .69rem;
    font-weight: 400;

    line-height: 1.3;
  }


  /* =======================================================
     LOGIN AREA
     ======================================================= */

  .lw-mobile-nav__footer {
    width: 100%;

    padding-top: 28px;
  }


  .lw-mobile-nav__login {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 46px;

    padding: 0 16px;

    border-radius: 8px;

    color: #ffffff;

    background: #19815a;

    font-family: "DM Sans", sans-serif;

    font-size: .86rem;
    font-weight: 600;

    text-decoration: none;

    transition: background-color .2s ease;
  }


  .lw-mobile-nav__login:hover {
    background: #116c4b;
  }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {

  .lw-mobile-nav__drawer {
    padding-inline: 16px;
  }


  .lw-mobile-nav__more-menu a {
    grid-template-columns: 32px minmax(0, 1fr);

    gap: 10px;

    min-height: 58px;

    padding: 8px 9px;
  }


  .lw-mobile-nav__submenu-number {
    width: 32px;
    height: 32px;

    border-radius: 8px;
  }


  .lw-mobile-nav__submenu-copy strong {
    font-size: .82rem;
  }


  .lw-mobile-nav__submenu-copy small {
    font-size: .65rem;
  }

}


/* =========================================================
   DESKTOP MORE DROPDOWN (ALL NAVBARS)
   ========================================================= */
@media (min-width: 761px) {

  .contact-nav__more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
  }

  .contact-nav__more {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
    font-family: inherit;
    font-size: .76rem;
    font-weight: 400;
    cursor: pointer;
  }

  .contact-nav__more svg {
    width: 13px;
    height: 13px;
    transition: transform .25s ease;
  }

  /* rotate arrow when open */
  .contact-nav__more-wrap.is-open .contact-nav__more svg {
    transform: rotate(180deg);
  }

  /* DROPDOWN */
  .contact-nav__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    width: 290px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    text-align: left;
  }

  /* OPEN */
  .contact-nav__more-wrap.is-open .contact-nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  /* DROPDOWN LINKS */
  .contact-nav__dropdown a {
    position: relative;
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    color: #101820 !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 400;
    transition: color .2s ease, background-color .2s ease;
  }

  /* remove normal nav underline */
  .contact-nav__dropdown a::after {
    display: none !important;
  }

  .contact-nav__dropdown a:hover {
    color: var(--contact-green, #1a815a) !important;
    background: #f3f8f5 !important;
  }

}