/* Bilingual switcher: quiet enough to match Mamera's existing typography. */
.language-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 10px;
  border-left: 1px solid currentColor;
  padding-left: 15px;
  font: 600 11px/1 'DM Sans', sans-serif;
  letter-spacing: .04em;
  text-transform: none;
  white-space: nowrap;
}
.language-switch a { text-decoration: none; opacity: .65; }
.language-switch a[aria-current='page'] { opacity: 1; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.language-switch a:hover { opacity: 1; }
/* The Journey has an older rule targeting the last navigation link. */
.nav .navlinks .language-switch a { border: 0; padding: 0; }
.nav .navlinks .language-switch a[aria-current='page'] { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 760px) {
  .language-switch { margin-left: 0; padding-left: 10px; gap: 5px; }
}

/* Compact mobile navigation: desktop headers are untouched. */
.mobile-menu-toggle { display: none; }
@media (max-width: 760px) {
  .mamera-has-mobile-menu.site-head,
  .mamera-has-mobile-menu.head,
  .mamera-has-mobile-menu.nav {
    min-height: 0;
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 5.5%;
  }
  .mamera-has-mobile-menu .logo,
  .mamera-has-mobile-menu .brand {
    margin: 0 !important;
    flex-shrink: 0;
  }
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-left: auto;
    color: #f7f2e9;
    background: rgba(15, 26, 20, .58);
    border: 1px solid rgba(215, 181, 140, .75);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    z-index: 22;
  }
  .mobile-menu-toggle:focus-visible {
    outline: 2px solid #e2bf91;
    outline-offset: 3px;
  }
  .mobile-menu-icon { display: flex; flex-direction: column; gap: 5px; width: 20px; }
  .mobile-menu-icon > span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform .2s ease, opacity .2s ease;
  }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon > span:first-child { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon > span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-icon > span:last-child { transform: translateY(-7px) rotate(-45deg); }

  .mamera-has-mobile-menu.site-head nav,
  .mamera-has-mobile-menu.head nav,
  .mamera-has-mobile-menu.nav .navlinks {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 21;
    width: 100%;
    margin: 0 !important;
    padding: 14px 5.5% 25px !important;
    background: #15231b;
    color: #f7f2e9;
    box-shadow: 0 20px 35px rgba(0, 0, 0, .32);
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    text-align: left;
    font-size: 14px !important;
    letter-spacing: .03em;
  }
  .mamera-has-mobile-menu.mamera-menu-open.site-head nav,
  .mamera-has-mobile-menu.mamera-menu-open.head nav,
  .mamera-has-mobile-menu.mamera-menu-open.nav .navlinks { display: flex !important; }

  .mamera-has-mobile-menu.site-head nav > a,
  .mamera-has-mobile-menu.head nav > a,
  .mamera-has-mobile-menu.nav .navlinks > a {
    display: block !important;
    width: 100%;
    padding: 13px 7px !important;
    margin: 0;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, .16) !important;
    text-align: left;
    font-size: 14px;
    white-space: normal;
  }
  .mamera-has-mobile-menu nav > a[aria-current="page"],
  .mamera-has-mobile-menu .navlinks > a[aria-current="page"] { color: #d5b48a; }
  .mamera-has-mobile-menu .nav-contact,
  .mamera-has-mobile-menu .contact-link,
  .mamera-has-mobile-menu .navlinks > a[href*="contatti"] {
    border: 1px solid #b49068 !important;
    margin: 14px 0 8px !important;
    padding: 12px !important;
    text-align: center !important;
  }
  .mamera-has-mobile-menu .language-switch {
    align-self: flex-start;
    margin: 15px 0 0;
    padding: 7px;
    border: 0;
    font-size: 13px;
  }
  /* The old multi-row menu needed extra room above the hero text. */
  .mamera-has-mobile-menu.nav + .hero .hero-inner,
  .mamera-has-mobile-menu.nav + main .hero-inner { padding-top: 95px !important; }
  .mamera-has-mobile-menu.site-head:has(+ main .hero) + main .hero .hero-copy { margin-top: 105px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-icon > span { transition: none; }
}

/* Homepage: the two hero actions should share the same visual baseline. */
.hero .actions {
  align-items: stretch;
}
.hero .actions > a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}
.hero .actions > .textlink {
  padding-top: 16px;
  padding-bottom: 16px;
}
