/* ══════════════════════════════
   MODULO: Header
   Desktop, tablet, mobile
══════════════════════════════ */

/* ── Header desktop + tablet ── */
.header-main { position: relative; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--border); flex-shrink: 0; transition: background .4s; }
.header-mobile { display: none; }
.header-inner { display: flex; align-items: stretch; height: 64px; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0 20px; align-self: center; flex-shrink: 0; }
.burger span { width: 20px; height: 1.5px; background: var(--text); }

/* Nav desktop */
.header-nav { flex: 1; display: flex; align-items: center; padding: 0 28px; }
.header-nav ul { display: flex; gap: 4px; list-style: none; }
.header-nav ul a { display: block; padding: 6px 12px; position: relative; transition: color .2s; }
.header-nav ul a::after { content: ''; position: absolute; bottom: 3px; left: 12px; right: 12px; height: 1px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.header-nav ul a:hover { color: var(--text); }
.header-nav ul a:hover::after, .header-nav ul a.active::after { transform: scaleX(1); }
.header-nav ul a.active { color: var(--text); }

/* Spaziatore sinistro (ricentra il logo dopo la rimozione del menu) */
.header-spacer-left { flex: 1; }

/* Logo */
.logo { flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 0 40px; text-align: center; }
.logo a { display: flex; flex-direction: column; align-items: center; gap: 3px; }

/* Social */
.header-social { flex: 1; display: flex; align-items: center; justify-content: flex-end; padding: 0 28px; gap: 18px; }
.header-social a { font-size: 13px; color: var(--muted); transition: color .2s; }
.header-social a:hover { color: var(--accent); }

/* Menu dropdown */
.mobile-menu { display: none; flex-direction: column; background: var(--bg); border-top: 1px solid var(--border); padding: 14px 24px; gap: 12px; position: absolute; left: 0; right: 0; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.05); transition: background .4s; }
.mobile-menu.open { display: flex; }

/* ── Header mobile ── */
.header-mobile-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; }
.header-mobile .logo { flex: 1; text-align: center; padding: 0; }
.header-spacer { width: 44px; flex-shrink: 0; }
.header-logo-img { display: flex; align-items: center; flex-shrink: 0; margin-left: 16px; }
.header-logo-img img { height: 44px; width: auto; border-radius: 0; object-fit: contain; transition: opacity .2s; }
.header-logo-img img:hover { opacity: .8; }
.header-mobile .burger { display: flex; padding: 0; }

/* ── Avviso rotazione tablet ── */
.rotate-notice { display: none; position: fixed; inset: 0; z-index: 9999; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; padding: 40px; }
.rotate-notice.visible { display: flex; }
.rotate-notice i { font-size: 48px; color: var(--accent); animation: rotateHint 2s ease-in-out infinite; }
.rotate-notice p { font-size: 16px; font-weight: 300; color: var(--muted); line-height: 1.7; }