.site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  background: #f4efe8;
  border-bottom: 1px solid rgba(31, 31, 31, 0.1);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;

  .site-header__inner {
    min-height: 88px;
    transition: min-height 0.3s ease;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 36px;
  }

  .site-logo {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 12px;
    color: #181513;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;

    img {
      height: 52px;
      width: auto;
      transition:
        height 0.3s ease,
        filter 0.3s ease;
    }

    .site-logo__mark {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      background: #181513;
      color: #f4efe8;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.1rem;
      font-weight: 400;
    }

    .site-logo__text {
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-size: 0.78rem;
    }
  }

  .main-nav {
    justify-self: center;

    > ul {
      display: flex;
      align-items: center;
      gap: 30px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    li {
      position: relative;
    }

    a {
      position: relative;
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 33px 0 31px;
      color: #312c28;
      text-decoration: none;
      font-size: 0.92rem;
      font-weight: 600;
      letter-spacing: 0.025em;
      transition: color 0.2s ease;

      &::after {
        content: "";
        position: absolute;
        left: 0;
        right: 100%;
        bottom: 25px;
        height: 1px;
        background: var(--color-primary);
        transition: right 0.25s ease;
      }

      &:hover {
        color: var(--color-primary);

        &::after {
          right: 0;
        }
      }
    }

    > ul > li.is-active > a {
      color: var(--color-primary);

      &::after {
        right: 0;
      }
    }

    .menu-chevron {
      width: 6px;
      height: 6px;
      margin-top: -3px;
      border-right: 1px solid currentColor;
      border-bottom: 1px solid currentColor;
      transform: rotate(45deg);
      transition: transform 0.2s ease;
    }

    .has-children:hover {
      > a .menu-chevron {
        transform: translateY(3px) rotate(225deg);
      }
    }

    .sub-menu {
      position: absolute;
      top: calc(100% - 8px);
      left: -22px;
      min-width: 220px;
      margin: 0;
      padding: 10px;
      list-style: none;
      background: #fff;
      border: 1px solid rgba(31, 31, 31, 0.08);
      box-shadow: 0 24px 60px rgba(26, 20, 16, 0.14);

      opacity: 0;
      visibility: hidden;
      transform: translateY(8px);
      transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

      a {
        padding: 11px 12px;
        font-size: 0.8rem;

        &::after {
          display: none;
        }

        &:hover {
          background: #f7f3ee;
        }
      }
    }

    .has-children {
      &:hover {
        > .sub-menu {
          opacity: 1;
          visibility: visible;
          transform: translateY(0);
        }
      }
    }
  }

  .header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .language-switcher {
    position: relative;
    z-index: 6;

    &[open] {
      .language-switcher__chevron {
        transform: rotate(225deg) translate(-1px, -1px);
      }

      .language-switcher__menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
      }
    }
  }

  .language-switcher__trigger {
    height: 36px;
    min-width: 72px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(31, 31, 31, 0.14);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.34);
    color: #28231f;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    transition:
      background 0.2s ease,
      border-color 0.2s ease,
      color 0.2s ease,
      transform 0.2s ease;

    &::-webkit-details-marker {
      display: none;
    }

    &:hover {
      border-color: rgba(31, 31, 31, 0.28);
      background: rgba(255, 255, 255, 0.74);
      transform: translateY(-1px);
    }
  }

  .language-switcher__globe {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.78;
  }

  .language-switcher__chevron {
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .language-switcher__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 218px;
    padding: 8px;
    border: 1px solid rgba(31, 31, 31, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 60px rgba(26, 20, 16, 0.16);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.985);
    transform-origin: top right;
    pointer-events: none;
    transition:
      opacity 0.18s ease,
      visibility 0.18s ease,
      transform 0.18s ease;
  }

  .language-switcher__eyebrow {
    padding: 7px 10px 6px;
    color: #9a8f85;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .language-switcher__option {
    min-height: 42px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 1fr auto 16px;
    align-items: center;
    gap: 9px;
    border-radius: 5px;
    color: #302a25;
    text-decoration: none;
    transition:
      background 0.18s ease,
      color 0.18s ease;

    &:hover {
      background: #f6f1eb;
      color: var(--color-primary);
    }

    &.is-active {
      background: #f4efe8;
      color: #181513;
    }
  }

  .language-switcher__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 650;
  }

  .language-switcher__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 21px;
    padding: 0 6px;
    border: 1px solid rgba(31, 31, 31, 0.1);
    border-radius: 999px;
    background: #fff;
    color: #8a7f75;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .language-switcher__check {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .header-reservation {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 0 18px;
    background: #181513;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
      background 0.2s ease,
      transform 0.2s ease;
    svg {
      width: 15px;
      height: 15px;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.4;
      stroke-linecap: round;
      stroke-linejoin: round;
      transition: transform 0.2s ease;
    }

    &:hover {
      background: var(--color-primary);
      transform: translateY(-1px);

      svg {
        transform: translate(2px, -2px);
      }
    }
  }

  &.site-header--overlay {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(
      to bottom,
      rgba(13, 11, 10, 0.68) 0%,
      rgba(13, 11, 10, 0.26) 62%,
      transparent 100%
    );
    border-bottom-color: rgba(255, 255, 255, 0.16);

    .main-nav {
      > ul > li > a {
        color: #fff;

        &::after {
          background: #fff;
        }
      }
    }

    .site-logo img {
      filter: brightness(0) invert(1);
    }

    .language-switcher__trigger {
      border-color: rgba(255, 255, 255, 0.34);
      background: rgba(16, 14, 12, 0.18);
      color: #fff;

      &:hover {
        border-color: rgba(255, 255, 255, 0.62);
        background: rgba(16, 14, 12, 0.32);
      }
    }

    .header-reservation {
      background: rgba(255, 255, 255, 0.96);
      color: #181513;

      &:hover {
        background: #fff;
        color: var(--color-primary);
      }
    }

    .nav-toggle {
      border-color: rgba(255, 255, 255, 0.45);

      span {
        background: #fff;
      }
    }

    &.is-scrolled {
      position: fixed;
      background: rgba(244, 239, 232, 0.96);
      border-bottom-color: rgba(31, 31, 31, 0.1);
      box-shadow: 0 12px 36px rgba(26, 20, 16, 0.08);
      backdrop-filter: blur(16px);

      .site-header__inner {
        min-height: 72px;
      }

      .site-logo img {
        height: 42px;
        filter: none;
      }

      .main-nav {
        > ul > li > a {
          padding-top: 25px;
          padding-bottom: 23px;
          color: #312c28;

          &::after {
            bottom: 18px;
            background: var(--color-primary);
          }
        }

        > ul > li.is-active > a {
          color: var(--color-primary);
        }
      }

      .language-switcher__trigger {
        border-color: rgba(31, 31, 31, 0.14);
        background: rgba(255, 255, 255, 0.58);
        color: #28231f;

        &:hover {
          border-color: rgba(31, 31, 31, 0.28);
          background: #fff;
        }
      }

      .header-reservation {
        background: #181513;
        color: #fff;

        &:hover {
          background: var(--color-primary);
          color: #fff;
        }
      }

      .nav-toggle {
        border-color: rgba(31, 31, 31, 0.14);

        span {
          background: #181513;
        }
      }
    }
  }

  .nav-toggle {
    display: none;
    position: relative;
    width: 46px;
    height: 46px;
    padding: 10px;
    border: 1px solid rgba(31, 31, 31, 0.14);
    background: transparent;
    cursor: pointer;

    span {
      position: absolute;
      left: 10px;
      width: 24px;
      height: 1px;
      margin: 0;
      background: #181513;
      transform-origin: center;
      transition:
        top 0.28s ease,
        transform 0.28s ease,
        opacity 0.2s ease;
    }

    span:nth-child(1) {
      top: 15px;
    }

    span:nth-child(2) {
      top: 22px;
    }

    span:nth-child(3) {
      top: 29px;
    }

    &.is-active {
      span:nth-child(1) {
        top: 22px;
        transform: rotate(45deg);
      }

      span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
      }

      span:nth-child(3) {
        top: 22px;
        transform: rotate(-45deg);
      }
    }
  }
}

@media (max-width: 980px) {
  .site-header {
    .site-header__inner {
      min-height: 76px;
      grid-template-columns: 1fr auto;
    }

    .header-reservation {
      display: none;
    }

    .language-switcher__trigger {
      height: 40px;
      min-width: 68px;
      padding: 0 10px;
      background: rgba(255, 255, 255, 0.58);
    }

    .language-switcher__menu {
      top: calc(100% + 8px);
      width: min(218px, calc(100vw - 32px));
    }

    .nav-toggle {
      display: block;
    }

    .main-nav {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      width: 100%;
      justify-self: stretch;
      background: #f4efe8;
      border-top: 1px solid rgba(31, 31, 31, 0.08);
      border-bottom: 1px solid rgba(31, 31, 31, 0.12);
      box-shadow: 0 24px 50px rgba(26, 20, 16, 0.1);
      opacity: 0;
      visibility: hidden;
      transform: translateY(-12px);
      pointer-events: none;
      transition:
        opacity 0.28s ease,
        visibility 0.28s ease,
        transform 0.28s ease;

      &.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
      }

      > ul {
        width: min(
          calc(100% - (var(--container-padding) * 2)),
          var(--container-width)
        );
        margin-inline: auto;
        padding: 12px 0 18px;
        display: block;

        > li {
          border-bottom: 1px solid rgba(31, 31, 31, 0.08);

          &:last-child {
            border-bottom: 0;
          }

          > a {
            padding: 14px 0;
            font-size: 0.92rem;

            &::after {
              display: none;
            }
          }
        }
      }

      .sub-menu {
        position: static;
        min-width: 0;
        padding: 0 0 10px 14px;
        border: 0;
        box-shadow: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;

        a {
          padding: 9px 0;
        }
      }
    }

    &.site-header--overlay {
      .main-nav {
        > ul > li > a {
          color: #312c28;

          &::after {
            background: var(--color-primary);
          }
        }

        > ul > li.is-active > a {
          color: var(--color-primary);
        }
      }

      &.is-scrolled {
        .site-header__inner {
          min-height: 68px;
        }
      }
    }
  }
}

@media (max-width: 520px) {
  .site-header {
    .site-logo {
      .site-logo__text {
        max-width: 150px;
        font-size: 0.7rem;
      }
    }
  }
}

.site-logo__name { display:block; color:inherit; font-size:1.1rem; font-weight:700; line-height:1.15; }
