/* Loaded after style.css so responsive multilingual header rules stay authoritative. */
@media (max-width: 1199.98px) {
  .header .dropdown-language { margin-right: 0 !important; }

  .dropdown-language .language > .dropdown-toggle {
    width: 48px;
    min-width: 48px;
    min-height: 44px;
    justify-content: center;
    padding: .35rem;
  }

  .language-flag-current {
    width: 30px;
    min-width: 30px;
    font-size: 1.5rem;
  }

  .side-menu {
    width: min(350px, calc(100vw - 44px));
    height: 100vh;
    height: 100dvh;
    padding-right: 2rem;
    padding-left: 2rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .side-menu .side-menu-mobile { margin-top: 72px; }
  .side-language-picker { width: 100%; margin-top: -.5rem; }

  .side-language-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem;
    width: 100%;
  }

  .side-language-option {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .5rem;
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
  }

  .side-language-option.active { color: #fff; background: var(--primary); }
  .side-language-option .language-flag { width: 24px; min-width: 24px; font-size: 1.2rem; }
  .side-language-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .side-language-option[lang|="th"] { font-family: "Noto Sans Thai", "Noto Sans", sans-serif; }
  .side-language-option[lang|="zh"] { font-family: "Noto Sans SC", "Noto Sans", sans-serif; }
  .side-language-option[lang|="ko"] { font-family: "Noto Sans KR", "Noto Sans", sans-serif; }
}

@media (min-width: 1600px) {
  .header-container {
    width: 100%;
    max-width: 1920px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .header .menu-left {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
  }

  .header .logo { grid-column: 2; justify-self: center; margin: 0; }
  .header .logo i { margin: 0; }

  .header .menu-right {
    grid-column: 3;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(1rem, 1fr) auto;
    align-items: center;
    margin-left: 0;
  }

  .header .menu-right > .header-menu { grid-column: 1; justify-self: start; display: flex; }
  .header .menu-right > .menu-right-items { grid-column: 3; justify-self: end; margin-right: 0; }
}
