/* Barra del sito, uguale in tutte le pagine (generata da strumenti/barra.py).
 *
 * Da 1280px: logo a sinistra, menu al centro, lingua e Accedi/foto a destra.
 * Da 840 a 1279px il menu resta nella barra, piu' stretto: misurato il 14/9
 * nelle cinque lingue, a 1024 avanzano 43px (tedesco), a 840 31px.
 * Sotto 840px il menu va nella tendina.
 * "html body" davanti: 49 pagine hanno regole inline sulla barra con !important.
 */
@media (min-width: 840px) and (max-width: 1279.98px) {
  html body .onmake-header .onmake-header-inner { gap: .75rem !important; }
  html body .onmake-header .onmake-header-inner > div:first-child { width: 150px !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] { display: flex !important; flex: 0 1 auto !important; justify-content: center !important; gap: .7rem !important; padding: 0 .25rem !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] > a:nth-of-type(n+3) { font-size: 1.05rem !important; }
  html body #mobile-menu-btn { display: none !important; }
}
@media (min-width: 840px) and (max-width: 1023.98px) {
  html body .onmake-header .onmake-header-inner { padding: 0 1rem !important; gap: .5rem !important; }
  html body .onmake-header .onmake-header-inner > div:first-child { width: 120px !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] { gap: .6rem !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] > .w-px { display: none !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] > a { font-size: .8rem !important; }
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] > a:nth-of-type(n+3) { font-size: .92rem !important; }
  html body .om-destra { gap: .5rem !important; }
}
@media (max-width: 839.98px) {
  html body .onmake-header .onmake-header-inner nav[class~="lg:flex"] { display: none !important; }
  html body #mobile-menu-btn { display: inline-flex !important; }
  html body #mobile-menu:not(.hidden) { display: block !important; }
}

@media (min-width: 1280px) {
  .onmake-header-inner {
    max-width: 88rem !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem !important;
  }
  .onmake-header-inner > div:first-child { justify-self: start; }
  .onmake-header-inner nav.lg\:flex { justify-self: center; flex: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  .onmake-header-inner > .om-destra { justify-self: end; }
}

/* Destra: tasto della pagina aperta, lingua e Accedi/foto */
.om-destra { display: flex; align-items: center; gap: .9rem; }
.om-pagina {
  display: inline-flex; align-items: center; height: 2.25rem; padding: 0 1rem; border-radius: 999px;
  background: #0f172a; color: #fff !important; font-size: .85rem; font-weight: 700; white-space: nowrap;
  text-decoration: none; box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .6);
}
.om-pagina:hover { background: #1e293b; }
@media (max-width: 1279.98px) { .om-pagina { display: none; } }
/* Voce del menu della pagina aperta */
.onmake-header nav a[aria-current="page"] { position: relative; }
.onmake-header nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.55rem; height: 3px; border-radius: 3px; background: #A6CE39;
}
#mobile-menu a[aria-current="page"] { background: #f1f5f9; }
#mobile-menu a.om-pagina-mob { background: #0f172a; color: #fff; }
.om-accedi { font-size: .875rem; font-weight: 600; color: #475569; text-decoration: none; white-space: nowrap; }
.om-accedi:hover { color: #0f172a; }

.om-lingua { position: relative; }
.om-lingua-btn {
  display: inline-flex; align-items: center; gap: .3rem; height: 2.25rem; padding: 0 .55rem;
  border: 1px solid #e2e8f0; border-radius: .6rem; background: #fff; cursor: pointer;
  font-size: 1.15rem; line-height: 1; color: #475569;
}
.om-lingua-btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.om-lingua-btn:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
.om-lingua-btn svg { width: 12px; height: 12px; transition: transform .15s ease; }
.om-lingua-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.om-lingua-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; min-width: 11.5rem;
  background: #fff; border: 1px solid #e2e8f0; border-radius: .8rem; padding: .35rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
.om-lingua-menu[hidden] { display: none !important; }
.om-lingua-menu a {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: .5rem;
  font-size: 14px; font-weight: 500; color: #334155; text-decoration: none; white-space: nowrap;
}
.om-lingua-menu a span { font-size: 1.15rem; line-height: 1; }
.om-lingua-menu a:hover { background: #f1f5f9; color: #0f172a; }
.om-lingua-menu a[aria-current="true"] { font-weight: 700; color: #0f172a; background: #f8fafc; }

/* Avviso "pagina solo in italiano" per chi ha scelto un'altra lingua */
.om-avviso-lingua {
  position: fixed; top: 5rem; left: 0; right: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  padding: .55rem 3rem .55rem 1rem; background: #fffbeb; border-bottom: 1px solid #fde68a;
  color: #92400e; font: 500 13.5px/1.4 Inter, system-ui, sans-serif; text-align: center;
}
.om-avviso-lingua button {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; background: transparent;
  color: #92400e; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.om-avviso-lingua button:hover { background: #fef3c7; }

/* Telefono: margini stretti */
@media (max-width: 480px) {
  .onmake-header-inner { padding: 0 .9rem !important; gap: .5rem !important; }
  .onmake-header-inner > div:first-child { width: 128px !important; }
  .om-destra { gap: .5rem; }
  .om-lingua-btn { padding: 0 .4rem; }
  #mobile-menu-btn { margin-left: 0 !important; padding: .4rem !important; }
}

/* Pagine con una regola generica sui link (per esempio amministrazione.onmake.it,
 * a{color:arancio}): i link della barra tengono il colore della barra. Le voci con
 * una classe di colore Tailwind (prodotti, Contatti) restano come sono. */
.onmake-header a:not([class*="text-"]):not(.om-accedi) { color: inherit; }

/* 28/9/2026: sul telefono stretto la testata non deve uscire a destra con le parole lunghe (de, fr). */
@media (max-width: 420px) {
  html body .onmake-header .onmake-header-inner { padding: 0 .75rem !important; gap: .4rem !important; }
  html body .onmake-header .onmake-header-inner > div:first-child { width: auto !important; flex: 0 1 auto !important; min-width: 0 !important; }
  html body .onmake-header .om-destra { min-width: 0 !important; gap: .35rem !important; }
  html body .onmake-header .om-accedi { padding-left: .35rem !important; padding-right: .35rem !important; font-size: 12px !important; white-space: nowrap !important; }
}
/* etichette maiuscole spaziate: a capo anche dentro le parole lunghe tedesche */
@media (max-width: 480px) {
  .uppercase[class*="tracking-"] { overflow-wrap: anywhere; hyphens: auto; }
}
/* titoli con parole lunghe (Datenschutzerklärung): sillabati, mai oltre il bordo */
@media (max-width: 480px) { h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; } }

/* schede cliccabili intere (assets/schede.js), 28/9/2026 */
.om-scheda-intera { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.om-scheda-intera:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -26px rgba(15,23,42,.45); }
.om-scheda-intera:has(a:focus-visible) { outline: 2px solid #2563eb; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .om-scheda-intera:hover { transform: none; } }
/* contorno del focus solo da tastiera, mai dopo un clic del mouse (tutto il sito) */
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

/* contrasto >= 4,5:1 (controllo ONMAKE AI 28/9/2026: RIP-LAU9, RIP-73YH, RIP-9QC6) */
:root { --om-nota: #5b606b; --om-etichetta: #475569; --om-arancio-testo: #c2410c; }
footer .om-nota-ai { color: var(--om-nota) !important; }
footer[style*="111113"] .om-nota-ai, footer[style*="0a0a"] .om-nota-ai { color: #a1a1aa !important; }
.om-suite-eg-t { color: var(--om-etichetta) !important; }
a.text-\[\#FF6B1A\].text-sm, a.text-\[\#ff6b1a\].text-sm { color: var(--om-arancio-testo) !important; }
a.text-\[\#FF6B1A\].text-sm:hover, a.text-\[\#ff6b1a\].text-sm:hover { color: #0f172a !important; }

.om-scheda-intera a:focus-visible { outline: none !important; box-shadow: none !important; }

/* contrasto, secondo giro ONMAKE AI 28/9 (RIP-73YH, Z4XM, PY7N, 9QC6, TZM3, 9QAA, L5GR, BAJZ) */
:root { --om-grigio-testo: #475569; --om-grigio-scuro-fondo: #a3adbd; }
.om-suite-eg-n, .om-suite-eg-t, .om-suite-plat span { color: var(--om-grigio-testo) !important; }
#rd > h3 { color: #5b6574 !important; }
.x-trace-bar span { color: #5b6574 !important; }
.rp-num { color: var(--om-arancio-testo) !important; }
.rp-btn.rp-btn-p { background: var(--om-arancio-testo) !important; border-color: var(--om-arancio-testo) !important; color: #fff !important; }
.space-y-8 h5.text-sm.font-bold[class*="text-orange"], .space-y-8 h5.text-sm.font-bold[class*="ea580c"] { color: var(--om-arancio-testo) !important; }
.rp-item p { color: var(--om-grigio-scuro-fondo) !important; }

/* slate-500 sui fondi chiari: 4,43 -> sopra 5 */
section:not(.vivo-notte):not([style*="#0"]) .text-slate-500 { color: #56637a !important; }

/* contrasto, terzo giro ONMAKE AI 28/9 10:52 (RIP-73YH, 9QC6, VWBZ, LTUC, JXX5, QGLQ, M4ZK, Q8LR) */
.x-shot-bar span { color: #5b6474 !important; }
section:not(.vivo-notte):not([style*="#0"]) a[class*="FF6B1A"], section:not(.vivo-notte):not([style*="#0"]) a[class*="ff6b1a"] { color: var(--om-arancio-testo) !important; }
.rp-item p { color: #475569 !important; }
.vivo-notte .rp-item p, section[style*="#0"] .rp-item p, section[style*="#1"] .rp-item p { color: #a3adbd !important; }
.vivo-notte .rp-num, section[style*="#0"] .rp-num, section[style*="#1"] .rp-num { color: #fb923c !important; }
.vista-et { background: #ffffff !important; backdrop-filter: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .vista-et { background: #0f172a !important; } }

/* slate-400 sui fondi chiari (sostieni lo sviluppo): 2,43 -> 5,4 */
section:not(.vivo-notte):not([style*="#0"]) p.text-slate-400 { color: #56637a !important; }

/* quarto giro ONMAKE AI 14:18: RIP-HGJL, 9QAA, QPUC */
.om-he { white-space: normal !important; overflow-wrap: anywhere; }
.om-gallery figcaption { color: #475569 !important; }
.bg-slate-900 p.text-slate-400, .bg-slate-900 .text-slate-400 { color: #94a3b8 !important; }
.om-he strong { white-space: normal !important; }
section:not(.x):not(.y) .bg-slate-900 p.text-slate-400.text-slate-400 { color: #94a3b8 !important; }

/* Telefono (8/10/2026, controllo a 375 con il tocco): bersagli di almeno 44 px, testi del piede leggibili. */
#mobile-menu-btn{-webkit-appearance:none;appearance:none;border:0;background:transparent;min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
@media (max-width:640px){
.om-accedi{display:inline-flex!important;align-items:center;min-height:44px;padding:0 .5rem!important}
footer ul li a,footer ul li button{display:inline-flex!important;align-items:center;min-height:44px}
footer ul li{margin:0!important}
footer p[style*="text-transform:uppercase"]{font-size:.8rem!important}
}
/* Seconda passata (8/10/2026, prova-sito.mjs): niente testi sotto 12 px, comandi da telefono almeno 44 px. */
footer p[style*="text-transform:uppercase"]{font-size:.8rem!important}
.om-nota-ai{font-size:.78rem!important}
@media (max-width:640px){
.onmake-header a.hover\:opacity-80,.onmake-header .om-lingua-btn{display:inline-flex!important;align-items:center;min-height:44px;min-width:44px}
#om-pref-cookie,footer a{display:inline-flex!important;align-items:center;min-height:44px}
}
