/* VINX MOBILE STRUCTURE FIX 2026-10-24
   Fix root cause: site.css applies its generic `nav` mobile positioning
   to the LANGUAGE selector, which is itself a <nav> inside the header.
   The scoped rules below restore the element to header flow.
   Desktop layout and colors remain under the existing theme rules.
*/
@media screen and (max-width: 800px) {
  .site-header:not(.site-header-home) > .header-main .header-actions > nav.lang-switch {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0.1rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    z-index: auto !important;
  }

  .site-header:not(.site-header-home) > .header-main .lang-switch button,
  .site-header:not(.site-header-home) > .header-main .lang-switch span {
    color: inherit !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
  }
  .site-header:not(.site-header-home) > .header-main .lang-switch button:not(.active) {
    opacity: .62 !important;
  }
  .site-header:not(.site-header-home) > .header-main .lang-switch button.active {
    opacity: 1 !important;
  }

  /* Compact internal detail pages. Existing desktop styling remains unchanged. */
  main > article > section.pagehead {
    padding-top: clamp(20px, 5vw, 30px) !important;
    padding-bottom: clamp(18px, 4vw, 28px) !important;
  }
  main > article > section.pagehead .eyebrow {
    margin-top: .7rem;
    margin-bottom: .8rem;
  }
  main > article > section.pagehead h1 {
    line-height: .96 !important;
    overflow-wrap: break-word;
    hyphens: manual;
  }
  main > article > section.prose {
    padding-top: clamp(22px, 5vw, 36px) !important;
    padding-bottom: clamp(40px, 7vw, 64px) !important;
    font-size: clamp(1rem, 3.8vw, 1.125rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  main > article > section.prose > h2:first-child,
  main > article > section.prose > .vinx-body-it > h2:first-child,
  main > article > section.prose > .vinx-body-en > h2:first-child {
    margin-top: 0;
  }
  main > article > .wide-media:empty {
    display: none;
  }
  main > article .wide-media img,
  main > article .wide-media iframe {
    max-width: 100%;
  }
}

@media screen and (max-width: 360px) {
  .site-header:not(.site-header-home) > .header-main {
    padding-right: 12px !important;
    padding-left: 12px !important;
    gap: .25rem !important;
  }
  .site-header:not(.site-header-home) > .header-main > .brand {
    font-size: .69rem !important;
  }
  .site-header:not(.site-header-home) .header-actions {
    gap: .2rem !important;
  }
  .site-header:not(.site-header-home) .header-actions .nav-toggle {
    padding: 6px !important;
  }
}
