/* ════════════════════════════════════════════════════════════════════
   VAKYR HEADER UNIFORME (desktop + mobile)
   Caricato su TUTTE le pagine. Iniettato da vakyr-header.js.
   Stile sorgente: estratto da index.html inline + mobile-pro.css.
   2026-05-04
   ════════════════════════════════════════════════════════════════════ */
/* Font Space Grotesk per la scritta VAKYR (coerente con vakyr-design.css).
   Le pagine shell (upgrade/tos/privacy/cookie-policy/contatti) non
   caricano vakyr-design.css, quindi importo qui il font perche' la
   scritta VAKYR sia identica ovunque. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700;800;900&display=swap');

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(60, 80, 120, 0.35);
  padding: 8px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, -apple-system, sans-serif;
}
.header-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}
.header-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.header-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}
.header .logo,
.header .logo > span {
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #00f5ff, #8957e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline-main {
  font-size: 1.05rem;
  font-weight: 800;
  font-style: italic;
  color: #00f5ff;
  letter-spacing: 0.02em;
  margin-top: 6px;
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.25);
}
.hero-tagline-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: #e8eaf3;
  text-align: center;
  max-width: 380px;
  line-height: 1.4;
  margin-top: 1px;
  opacity: 0.85;
}
.header-nav { display: flex; gap: 6px; justify-content: center; margin-top: 6px; flex-wrap: wrap; }
.header-nav a {
  font-size: 0.72rem; font-weight: 700; color: #e6edf3;
  text-decoration: none; padding: 5px 14px; border-radius: 8px;
  transition: all 0.15s; border: 1px solid transparent;
}
.header-nav a:hover { color: #00f5ff; border-color: rgba(0, 245, 255, 0.4); }
.header-nav a.active { color: #00f5ff; border-color: #00f5ff; }
.header-nav a.nav-premium {
  background: linear-gradient(180deg, #d4af37, #b8902a) !important;
  color: #0a0e1a !important;
  font-weight: 800 !important;
  border-radius: 7px !important;
  padding: 6px 14px !important;
  margin-left: 6px !important;
  box-shadow: 0 2px 8px rgba(212, 175, 55, .25) !important;
  text-shadow: none !important;
}
.header-nav #navAuthSlot {
  display: inline-flex; gap: 6px; margin-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.15); padding-left: 14px;
}
.header-nav #navAuthSlot a[id="navRegister"] {
  background: linear-gradient(135deg, #00f5ff, #7c3aed) !important;
  color: #0a0e27 !important;
  border-color: transparent !important;
}

/* Flag-lang (dropdown lingua) */
.flag-lang { position: relative; margin-top: 6px; }
.flag-lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: 8px; padding: 5px 10px; cursor: pointer;
  color: #e6edf3; font-size: 0.72rem; font-weight: 600;
  font-family: inherit;
}
.flag-lang-toggle img { width: 18px; height: auto; border-radius: 2px; }
.flag-lang-drop {
  display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 6px; min-width: 180px; max-height: 60vh; overflow-y: auto;
  background: #0f172a; border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: 10px; padding: 6px; z-index: 250;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.flag-lang.open .flag-lang-drop { display: block; }
.flag-lang-drop button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; background: transparent; border: 0;
  color: #e6edf3; font-size: 0.78rem; cursor: pointer;
  border-radius: 6px; font-family: inherit; text-align: left;
}
.flag-lang-drop button:hover { background: rgba(0, 245, 255, 0.08); }

/* Hamburger button (visibile solo su mobile, vedi @media sotto) */
.hamburger-btn { display: none; }

/* ─── DESKTOP (>768px): occhi accanto a VAKYR, nav inline orizzontale ─── */
@media (min-width: 769px) {
  .header-col > .header-logo-img { display: none; }
  .header-text > .logo.vk-logo-with-eyes {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; flex-direction: row;
  }
  .header-text > .logo.vk-logo-with-eyes .header-logo-img {
    display: block; height: 88px; width: 88px; flex-shrink: 0;
    object-fit: contain; margin: 0; border-radius: 14px;
  }
  .header-text > .logo.vk-logo-with-eyes > span {
    flex-shrink: 0; font-size: 2.5rem;
  }
}

/* ─── MOBILE (≤768px): occhi compatti, nav nascosta in hamburger ─── */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap; height: auto; min-height: 56px; padding: 10px 12px;
  }
  .header-logo-img { height: 38px; flex-shrink: 0; }
  .header-col { flex-wrap: nowrap; gap: 8px; width: 100%; align-items: center; }
  .header-col > .header-logo-img:last-child { display: none; }
  .header-text { flex: 1; min-width: 0; align-items: center; }
  /* Tagline sub VISIBILE anche su mobile (ripristinata 2026-05-04
     su richiesta Fabri: "deve essere uguale alla home") */
  .hero-tagline-sub {
    display: block !important;
    font-size: 9.5px !important;
    color: rgba(230, 237, 243, 0.88) !important;
    margin: 1px 0 0 0 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    max-width: 320px !important;
  }

  /* Quando i logo sono dentro .logo (vk-logo-with-eyes class aggiunta da JS) */
  .header-text > .logo.vk-logo-with-eyes {
    display: flex !important;
    align-items: center !important; justify-content: center !important;
    gap: 10px !important; flex-direction: row !important;
    width: 100% !important; margin: 0 !important;
  }
  .header-text > .logo.vk-logo-with-eyes .header-logo-img {
    display: block !important;
    height: 64px !important; width: 64px !important;
    flex-shrink: 0 !important; object-fit: contain !important;
    margin: 0 !important; border-radius: 12px !important;
  }
  .header-text > .logo.vk-logo-with-eyes > span {
    flex-shrink: 0 !important;
    text-shadow: 0 0 12px rgba(0, 245, 255, 0.55), 0 0 22px rgba(124, 58, 237, 0.35) !important;
  }
  .header-text > .logo,
  .header-text > .logo > span {
    font-size: 1.5rem !important; line-height: 1 !important;
    text-align: center !important; margin: 0 !important;
  }
  .hero-tagline-main {
    font-size: 11px !important; font-weight: 700 !important;
    color: #00f5ff !important; font-style: italic !important;
    margin: -2px 0 0 0 !important; line-height: 1.1 !important;
    text-shadow: 0 0 6px rgba(0, 245, 255, 0.35) !important;
  }

  /* Nav nascosta default, drawer su .mobile-open */
  .header-nav { display: none !important; }
  .header-nav.mobile-open {
    display: flex !important;
    flex-direction: column !important; align-items: stretch !important;
    width: 100% !important;
    margin: 8px 0 0 0 !important; padding: 10px !important; gap: 4px !important;
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(0, 245, 255, 0.22) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  }
  .header-nav.mobile-open > a,
  .header-nav.mobile-open #navAuthSlot > a:not([style*="display: none"]):not([style*="display:none"]) {
    width: 100% !important; padding: 12px 14px !important;
    font-size: 14px !important; min-height: 44px !important;
    text-align: left !important; justify-content: flex-start !important;
    border-radius: 9px !important;
    display: flex !important; align-items: center !important;
  }
  .header-nav.mobile-open #navAuthSlot {
    flex-direction: column !important;
    width: 100% !important; margin-left: 0 !important; padding-left: 0 !important;
    border-left: 0 !important; padding-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    margin-top: 6px !important; gap: 4px !important;
  }
  .flag-lang { display: none !important; }
  .header-nav.mobile-open ~ .flag-lang {
    display: flex !important;
    justify-content: center !important; margin: 8px 0 0 0 !important;
    width: 100% !important;
  }
  .hamburger-btn {
    display: flex !important; align-items: center; justify-content: center;
    width: 100%; min-height: 44px; padding: 12px 14px !important;
    background: rgba(0, 245, 255, 0.08); border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px; color: #00f5ff; cursor: pointer;
    margin: 10px 0 0; font-size: 1rem; line-height: 1;
    box-sizing: border-box; font-weight: 700; letter-spacing: 0.05em;
    flex-basis: 100%; order: 99;
    font-family: inherit;
  }
  .hamburger-btn:active { background: rgba(0, 245, 255, 0.18); }
}

/* Glow neon su occhi e VAKYR (sempre attivo, desktop + mobile) */
.header-logo-img {
  filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.45))
          drop-shadow(0 0 12px rgba(0, 245, 255, 0.25));
  animation: vkEyeGlow 4s ease-in-out infinite;
}
.header-text > .logo, .header-text > .logo > span {
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.45),
               0 0 20px rgba(124, 58, 237, 0.28);
}
@keyframes vkEyeGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.45))
            drop-shadow(0 0 12px rgba(0, 245, 255, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 9px rgba(0, 245, 255, 0.75))
            drop-shadow(0 0 20px rgba(0, 245, 255, 0.50))
            drop-shadow(0 0 32px rgba(124, 58, 237, 0.25));
  }
}

/* Hide legacy headers se presenti (smontati da JS, ma in caso restino) */
.vk-shell-header { display: none !important; }
header.wrap { display: none !important; }

/* ═══ BETA GRATUITA: "Premium" sbarrato con X rossa + targhetta ORA GRATIS ═══
   Messaggio: un domani sarà Premium, ora è tutto gratis (beta).
   ⚠️ RIMUOVERE questo blocco quando la beta chiude (insieme a VAKYR_BETA_ACTIVE=0). */
.nav-premium{position:relative !important; overflow:visible !important;}
.nav-premium::before{content:''; position:absolute; inset:-1px;
  background:
    linear-gradient(to top right, transparent calc(50% - 2px), #e11d48 calc(50% - 2px), #e11d48 calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(to bottom right, transparent calc(50% - 2px), #e11d48 calc(50% - 2px), #e11d48 calc(50% + 2px), transparent calc(50% + 2px));
  pointer-events:none; border-radius:7px; z-index:1;}
.nav-premium::after{content:'ORA GRATIS'; position:absolute; top:-12px; right:-14px;
  background:linear-gradient(135deg,#16a34a,#15803d); color:#fff; font-size:9px; font-weight:900;
  letter-spacing:.4px; padding:2px 7px; border-radius:999px; transform:rotate(7deg);
  box-shadow:0 2px 8px rgba(0,0,0,.45); pointer-events:none; white-space:nowrap; z-index:2;}
