/* =========================================================
   NIVEAU GMBH
   Mobile Navigation
   ========================================================= */


/* Desktop: mobile controls hidden */

.mobile-nav-toggle,
.mobile-nav-backdrop {
  display: none;
}


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

@media (max-width: 760px) {

  :root {
    --mobile-header-height: 82px;
  }


  /* -------------------------------------------------------
     HEADER
     ------------------------------------------------------- */

  .header {
    position: sticky;
    top: 0;

    z-index: 1300;

    height: var(--mobile-header-height);

    background:
      rgba(255, 255, 255, 0.98);

    border-bottom:
      1px solid rgba(0, 0, 0, 0.065);

    box-shadow:
      0 4px 24px rgba(0, 20, 38, 0.035);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }


  .header-inner {
    position: relative;

    width: min(92%, 1320px);
    height: 100%;
    min-height: 0;

    margin-inline: auto;

    padding: 0;

    display: flex;
    flex-direction: row;

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

    gap: 0;
  }


  .logo {
    position: relative;

    z-index: 1305;

    display: inline-flex;

    align-items: center;

    flex-shrink: 0;
  }


  .logo img {
    width: auto;
    height: 48px;
  }



  /* -------------------------------------------------------
     HAMBURGER BUTTON
     ------------------------------------------------------- */

  .mobile-nav-toggle {
    position: relative;

    z-index: 1310;

    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;

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

    padding: 0;

    border:
      1px solid rgba(0, 20, 38, 0.14);

    border-radius: 50%;

    color:
      var(--niveau-navy);

    background:
      rgba(255, 255, 255, 0.96);

    cursor: pointer;

    transition:
      border-color 180ms ease,
      background 180ms ease,
      transform 180ms ease;
  }


  .mobile-nav-toggle:hover {
    border-color:
      rgba(0, 20, 38, 0.28);

    background: #ffffff;
  }


  .mobile-nav-toggle:active {
    transform: scale(0.96);
  }


  .mobile-nav-toggle-lines {
    position: relative;

    width: 19px;
    height: 15px;

    display: block;
  }


  .mobile-nav-toggle-line {
    position: absolute;

    left: 0;

    width: 19px;
    height: 1.5px;

    display: block;

    background:
      var(--niveau-navy);

    transform-origin: center;

    transition:
      top 220ms ease,
      transform 220ms ease,
      opacity 160ms ease;
  }


  .mobile-nav-toggle-line:nth-child(1) {
    top: 1px;
  }


  .mobile-nav-toggle-line:nth-child(2) {
    top: 7px;
  }


  .mobile-nav-toggle-line:nth-child(3) {
    top: 13px;
  }


  body.mobile-menu-open
  .mobile-nav-toggle-line:nth-child(1) {
    top: 7px;

    transform:
      rotate(45deg);
  }


  body.mobile-menu-open
  .mobile-nav-toggle-line:nth-child(2) {
    opacity: 0;
  }


  body.mobile-menu-open
  .mobile-nav-toggle-line:nth-child(3) {
    top: 7px;

    transform:
      rotate(-45deg);
  }



  /* -------------------------------------------------------
     BACKDROP
     ------------------------------------------------------- */

  .mobile-nav-backdrop {
    position: fixed;

    z-index: 1180;

    top: var(--mobile-header-height);
    right: 0;
    bottom: 0;
    left: 0;

    display: block;

    background:
      rgba(0, 20, 38, 0.48);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    transition:
      opacity 260ms ease,
      visibility 260ms ease;
  }


  body.mobile-menu-open
  .mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
  }



  /* -------------------------------------------------------
     DRAWER / MOBILE NAVIGATION
     ------------------------------------------------------- */

  .main-nav {
    position: fixed;

    z-index: 1320;

    top: var(--mobile-header-height);
    right: 0;

    width:
      min(88vw, 420px);

    height:
      calc(100vh - var(--mobile-header-height));

    height:
      calc(100dvh - var(--mobile-header-height));

    display: block;

    padding:
      25px 28px 42px;

    overflow-x: hidden;
    overflow-y: auto;

    color:
      var(--text-main);

    background:
      rgba(255, 255, 255, 0.995);

    box-shadow:
      -20px 30px 70px
      rgba(0, 20, 38, 0.15);

    transform:
      translateX(105%);

    visibility: hidden;

    transition:
      transform
      330ms
      cubic-bezier(0.22, 1, 0.36, 1),
      visibility 330ms ease;

    overscroll-behavior: contain;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }


  body.mobile-menu-open
  .main-nav {
    transform:
      translateX(0);

    visibility: visible;
  }



  /* -------------------------------------------------------
     TOP LEVEL LINKS
     ------------------------------------------------------- */

  .main-nav > a {
    position: relative;

    width: 100%;

    display: flex;

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

    padding:
      16px 1px;

    border-bottom:
      1px solid #e5e7e8;

    color:
      #1d252b;

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

    letter-spacing: 0.055em;

    text-decoration: none;
  }


  .main-nav > a:first-child {
    border-top:
      1px solid #e5e7e8;
  }


  .main-nav > a.active {
    color:
      var(--niveau-red);
  }


  .main-nav > a::after,
  .nav-dropdown-button::after {
    display: none;
  }



  /* -------------------------------------------------------
     SERVICES DROPDOWN
     ------------------------------------------------------- */

  .nav-dropdown {
    position: relative;

    width: 100%;

    border-bottom:
      1px solid #e5e7e8;
  }


  .nav-dropdown-button {
    position: relative;

    width: 100%;

    display: flex;

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

    gap: 20px;

    padding:
      16px 1px;

    border: 0;

    color:
      #1d252b;

    background:
      transparent;

    font: inherit;
    font-size: 0.91rem;
    font-weight: 500;

    letter-spacing: 0.055em;

    text-align: left;

    cursor: pointer;
  }


  .nav-dropdown-button:hover {
    color:
      var(--niveau-red);
  }


  .nav-arrow {
    position: relative;

    top: 0;

    width: 27px;
    height: 27px;

    flex: 0 0 27px;

    display: flex;

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

    border:
      1px solid #dfe2e3;

    border-radius: 50%;

    color:
      #5d666c;

    font-size: 0.94rem;

    transition:
      transform 200ms ease,
      border-color 180ms ease;
  }


  .nav-dropdown.open
  .nav-arrow {
    transform:
      rotate(180deg);
  }



  /* -------------------------------------------------------
     MOBILE SUBMENU
     ------------------------------------------------------- */

  .nav-dropdown-menu {
    position: static;

    top: auto;
    left: auto;

    width: 100%;
    min-width: 0;
    max-height: 0;

    margin: 0;

    padding:
      0 0 0 12px;

    overflow: hidden;

    border: 0;
    border-radius: 0;

    background:
      transparent;

    box-shadow: none;

    opacity: 1;
    visibility: visible;

    transform: none;

    transition:
      max-height 300ms ease,
      padding-bottom 300ms ease;
  }


  .nav-dropdown.open
  .nav-dropdown-menu {
    max-height: 380px;

    padding-bottom: 13px;

    transform: none;
  }


  .nav-dropdown-menu a {
    position: relative;

    display: block;

    padding:
      11px 6px 11px 17px;

    border-left:
      1px solid #dcdfe0;

    border-radius: 0;

    color:
      #656e74;

    background:
      transparent;

    font-size: 0.82rem;
    font-weight: 400;

    line-height: 1.45;

    text-decoration: none;

    transition:
      color 180ms ease;
  }


  .nav-dropdown-menu a::before {
    content: "";

    position: absolute;

    left: -2px;
    top: 50%;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background:
      #adb2b5;

    transform:
      translateY(-50%);
  }


  .nav-dropdown-menu a:hover {
    color:
      var(--niveau-red);

    background:
      transparent;
  }



  /* -------------------------------------------------------
     LANGUAGE SWITCHER
     ------------------------------------------------------- */

  .language-switcher {
    width: 100%;

    display: flex;

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

    gap: 9px;

    margin:
      27px 0 0;

    padding:
      20px 1px 0;

    border-top:
      1px solid #e5e7e8;

    color:
      #8a9196;

    font-size: 0.78rem;

    letter-spacing: 0.1em;
  }


  .language-switcher a {
    padding: 5px 0;

    color:
      #747b80;

    text-decoration: none;
  }


  .language-switcher a:hover {
    color:
      var(--niveau-red);
  }


  .language-switcher
  .active-language {
    color:
      var(--niveau-red);

    font-weight: 600;
  }



  /* -------------------------------------------------------
     BODY LOCK
     ------------------------------------------------------- */

  body.mobile-menu-open {
    overflow: hidden;
  }

}



/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 430px) {

  :root {
    --mobile-header-height: 76px;
  }


  .logo img {
    height: 43px;
  }


  .mobile-nav-toggle {
    width: 43px;
    height: 43px;

    flex-basis: 43px;
  }


  .main-nav {
    width: 92vw;

    padding:
      21px 23px 35px;
  }

}



/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .main-nav,
  .mobile-nav-backdrop,
  .mobile-nav-toggle-line,
  .nav-dropdown-menu,
  .nav-arrow {
    transition: none !important;
  }

}
