/* Barra di navigazione fissa in basso su smartphone e tablet (partials/bottom-bar.php). */
.bottom-bar { display: none; }

@media (max-width: 900px) {
  .bottom-bar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: 0 -8px 24px rgba(10, 30, 45, 0.08);
  }
  .bottom-bar__list {
    list-style: none; margin: 0 auto; padding: 0; max-width: 560px;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  }
  .bottom-bar__link {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 54px; padding: 6px 4px; border-radius: 14px;
    color: var(--color-muted, #555); text-decoration: none;
    font-size: 0.72rem; font-weight: 500; line-height: 1.1; letter-spacing: 0.01em; text-align: center;
    transition: color 0.2s ease, background-color 0.2s ease;
  }
  .bottom-bar__icon { width: 22px; height: 22px; transition: transform 0.2s ease; }
  .bottom-bar__link:hover, .bottom-bar__link:focus-visible { color: var(--color-text, #111); background: rgba(17, 17, 17, 0.04); }
  .bottom-bar__link:focus-visible { outline: 2px solid var(--color-accent, #fd4621); outline-offset: 1px; }
  .bottom-bar__link:active .bottom-bar__icon { transform: scale(0.9); }
  .bottom-bar__link.is-active { color: var(--color-cta, #c73737); }
  .bottom-bar__link.is-active::before {
    content: ""; position: absolute; top: 2px; left: 50%; width: 22px; height: 3px; margin-left: -11px;
    border-radius: 3px; background: var(--color-accent, #fd4621);
  }

  /* spazio in fondo alla pagina e banner dei cookie sopra la barra */
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .cookie-banner { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-bar__link, .bottom-bar__icon { transition: none; }
}
@media print { .bottom-bar { display: none !important; } }

/* Selettore lingua accanto al burger su smartphone: compatto (bandiera + sigla) */
@media (max-width: 640px) {
  .site-header__actions { gap: 6px; }
  .site-header .lang-switch { display: block; }
  .site-header .lang-switch__button { gap: 6px; min-height: 44px; padding: 6px 10px; font-size: 0.82rem; }
  .site-header .lang-switch__button .icon { display: none; }
  .site-header .lang-switch__list { right: -52px; }
}
@media (max-width: 360px) {
  .site-header .lang-switch__code { display: none; }
}
