/* ============================================
   LAYOUT.CSS — Navbar, Footer, Mobile Menu, Grid
   Vaivox Design System
   ============================================ */

/* ── Navbar ─────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9995;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.navbar-center-links { display: flex; }
#navbar-right-slot { display: flex; }
.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 1.1rem; font-weight: 800;
  color: var(--text); letter-spacing: -0.3px;
}
.navbar-logo-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
}
.navbar-logo-dot svg { width: 14px; height: 14px; color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 10px; }

/* ── Top Nav Login Button ─────────────────── */
.nav-login-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 8px; padding: 8px 20px;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: #000;
  cursor: pointer; transition: opacity .2s, transform .15s;
  box-shadow: 0 0 16px rgba(200,165,80,0.4);
}
.nav-login-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Navbar — chiara stile v2 ──────────────── */
.navbar {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: none !important;
  box-shadow: 0 1px 12px rgba(200,165,80,0.08), 0 4px 24px rgba(0,0,0,0.06) !important;
}
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 10%, #c8a550, #dbc078, #a07830, #c8a550, transparent 90%);
  background-size: 200% 100%;
  animation: navLineSlide 6s linear infinite;
  opacity: 0.85;
}
.navbar-brand-text {
  color: #1a1a2e !important;
  background: linear-gradient(135deg, #1a1a2e 60%, #a07830);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-logo-dot {
  background: linear-gradient(135deg, #c8a550, #6366f1) !important;
}
.navbar-center-links a {
  color: rgba(26,26,46,0.85) !important;
  font-weight: 500 !important;
  position: relative;
}
.navbar-center-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: #c8a550;
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.navbar-center-links a:hover {
  color: #1a1a2e !important;
}
.navbar-center-links a:hover::after {
  transform: scaleX(1);
}
.hamburger span {
  background: #1a1a2e !important;
}
.nav-login-btn {
  color: #fff !important;
}
.ui-lang-btn {
  background: rgba(0,0,0,0.05) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #1a1a2e !important;
}
.ui-lang-btn:hover {
  background: rgba(0,0,0,0.1) !important;
}

/* ── Mobile navbar (hamburger) ──────────────── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer;
  background: none; border: none; padding: 4px; z-index: 9996;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ───────────────────────────── */
.mobile-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  height: calc(100vh - 60px);
  background: linear-gradient(160deg, #1a0a2e 0%, #0a0514 100%);
  z-index: 9990;
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  border-top: 2px solid rgba(200,165,80,0.4);
  box-shadow: inset 0 1px 0 rgba(200,165,80,0.1);
  overflow-y: auto;
  transition: opacity .4s cubic-bezier(0.16,1,0.3,1), visibility .4s cubic-bezier(0.16,1,0.3,1);
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--sans); font-size: 1.25rem; font-weight: 600;
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 18px 0; border-bottom: 1px solid rgba(200,165,80,0.1);
  display: block; transition: color .2s, padding-left .2s;
}
.mobile-menu a:hover { color: var(--accent); padding-left: 6px; }
.mobile-menu-auth { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-menu-email { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding: 8px 0; }
.mobile-menu-btn {
  padding: 12px 20px; border-radius: 8px; font-family: var(--sans);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; text-align: center; transition: opacity .2s;
}
.mobile-menu-btn.accent { background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; color: #000; }
.mobile-menu-btn.ghost { background: none; border: 1px solid var(--border2); color: var(--muted); }
.mobile-menu-btn:hover { opacity: 0.85; }

/* ── Mobile menu — tema chiaro ─────────────── */
.mobile-menu {
  background: #f0f0f0 !important;
}
.mobile-menu a {
  color: #1a1a1a !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
}

/* ── Mobile menu — light theme override (secondary pages) ── */
.mobile-menu {
  visibility: hidden; opacity: 0; pointer-events: none;
  position: fixed; top: 60px; left: 0; right: 0; height: calc(100vh - 60px);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  z-index: 9990;
  display: flex; flex-direction: column; padding: 20px 32px;
  border-top: 2px solid rgba(200,165,80,0.3);
  overflow-y: auto;
  transform: translateY(-15px);
  transition: opacity .35s cubic-bezier(0.16,1,0.3,1), visibility .35s, transform .35s cubic-bezier(0.16,1,0.3,1);
}
.mobile-menu.open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu a {
  font-family: 'Sora', sans-serif; font-size: 1.05rem; font-weight: 600;
  color: #1a1a2e; text-decoration: none;
  padding: 11px 0; border-bottom: 1px solid #e0e0e0;
  display: block; transition: color .2s, padding-left .2s;
  opacity: 0; transform: translateY(-8px);
}
.mobile-menu.open a {
  opacity: 1; transform: translateY(0);
  transition: color .2s, padding-left .2s, opacity .3s ease, transform .3s ease;
}
.mobile-menu.open a:nth-child(1) { transition-delay: 0.03s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.06s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.09s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.18s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.21s; }
.mobile-menu.open a:nth-child(8) { transition-delay: 0.24s; }
.mobile-menu.open a:nth-child(9) { transition-delay: 0.27s; }
.mobile-menu a:hover, .mobile-menu a:active { color: #c8a550; padding-left: 6px; }
.mobile-menu-cta {
  margin-top: 18px;
  background: linear-gradient(135deg, #c8a550, #a07830);
  border: none; border-radius: 10px; color: #fff;
  font-size: 1rem; font-weight: 700;
  padding: 14px 20px; cursor: pointer; text-align: center; display: block;
  text-decoration: none;
}

/* ── Language Selector (Desktop) ───────────── */
.ui-lang-selector {
  position: relative;
  display: flex;
  align-items: center;
}
.ui-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted);
}
.ui-lang-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(200,165,80,0.4);
}
.ui-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(20,16,32,0.98);
  border: 1px solid rgba(200,165,80,0.25);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 150px;
  z-index: 1000;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ui-lang-dropdown.open {
  display: block;
}
.ui-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.ui-lang-option:hover {
  background: rgba(200,165,80,0.12);
  color: #fff;
}
.ui-lang-option.active {
  color: var(--accent);
  font-weight: 600;
}

/* ── Language Selector (Mobile menu) ──────── */
.mobile-lang-selector {
  padding: 16px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 16px;
}
.mobile-lang-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.mobile-lang-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile-lang-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-lang-opt:hover,
.mobile-lang-opt.active {
  background: rgba(200,165,80,0.15);
  border-color: rgba(200,165,80,0.4);
  color: #fff;
}

/* ── Footer ─────────────────────────────────── */
footer { text-align:center; margin-top:48px; font-family:var(--mono); font-size:.68rem; }

.site-footer {
  max-width: 820px; margin: 0 auto;
  padding: 48px 24px 40px;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; margin-bottom: 40px; flex-wrap: wrap;
}
.footer-brand { max-width: 240px; }
.footer-brand-logo {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.footer-brand-logo img { height: 28px; width: auto; filter: drop-shadow(0 0 6px rgba(124,92,255,0.5)); }
.footer-brand-name { font-family: var(--sans); font-size: 1rem; font-weight: 800; color: #000; }
.footer-brand-desc { font-family: var(--sans); font-size: 0.78rem; color: #333; line-height: 1.6; }
.footer-links-col h4 {
  font-family: var(--mono); font-size: 0.6rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px;
}
.footer-links-col a {
  display: block; font-family: var(--sans); font-size: 0.82rem;
  color: #333; text-decoration: none; margin-bottom: 8px;
  transition: color .2s;
}
.footer-links-col a:hover { color: #000; }
.footer-cta-mini {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; font-family: var(--sans); font-size: 0.82rem; font-weight: 700;
  padding: 10px 20px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 0 16px rgba(200,165,80,0.25);
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 0.62rem; color: #000;
  padding-top: 24px; border-top: 1px solid rgba(0,0,0,0.15);
}
.footer-bottom a { color: #000; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: var(--accent); }

/* ── Footer — tutto nero (tema chiaro) ─────── */
.site-footer,
.site-footer *,
.site-footer a,
.site-footer p,
.site-footer span,
.site-footer div,
.site-footer h4,
.site-footer li {
  color: #1a1a1a !important;
}
.site-footer {
  border-top-color: rgba(0,0,0,0.15) !important;
}
.footer-brand-desc {
  color: #444 !important;
}
.footer-links-col h4 {
  color: #6b21a8 !important;
}
.footer-links-col a {
  color: #333 !important;
}
.footer-links-col a:hover {
  color: #6b21a8 !important;
}
.footer-bottom {
  border-top-color: rgba(0,0,0,0.15) !important;
  color: #1a1a1a !important;
}
.footer-bottom a {
  color: #1a1a1a !important;
}

/* ── Page footer — light (secondary pages) ── */
.site-footer {
  text-align: center; padding: 32px 24px;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: #888;
  border-top: 1px solid #e0e0e0; position: relative; z-index: 1;
}
.site-footer a { color: #c8a550; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── PWA Install Banner ─────────────────────── */
.pwa-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d0d0d 100%);
  border-top: 2px solid rgba(200,165,80,0.5);
  box-shadow: 0 -4px 30px rgba(200,165,80,0.2);
  padding: 14px 20px;
  align-items: center;
  gap: 14px;
  animation: slideUp .35s ease;
}
.pwa-banner.show { display: flex; }
.pwa-banner-icon {
  width: 48px; height: 48px; border-radius: 12px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(200,165,80,0.4);
}
.pwa-banner-icon img { width: 100%; height: 100%; object-fit: cover; }
.pwa-banner-text { flex: 1; }
.pwa-banner-title {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 700;
  color: #fff; margin-bottom: 2px;
}
.pwa-banner-sub {
  font-family: var(--sans); font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; gap: 5px;
}
.pwa-banner-android {
  display: inline-flex; align-items: center; gap: 3px;
  color: #a4c639;
  font-size: 0.72rem; font-weight: 600;
}
.pwa-banner-install {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 10px;
  color: #000; font-family: var(--sans); font-size: 0.85rem; font-weight: 700;
  padding: 10px 18px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 0 16px rgba(200,165,80,0.4);
  transition: opacity .2s, transform .1s;
}
.pwa-banner-install:active { opacity: 0.85; transform: scale(0.97); }
.pwa-banner-close {
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 1.2rem; cursor: pointer; padding: 4px; flex-shrink: 0;
  line-height: 1;
}
.pwa-banner-close:hover { color: rgba(255,255,255,0.7); }

/* ── iOS banner ────────────────────────────── */
.pwa-ios-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d0d0d 100%);
  border-top: 2px solid rgba(200,165,80,0.5);
  box-shadow: 0 -4px 30px rgba(200,165,80,0.2);
  padding: 16px 20px 24px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  animation: slideUp .35s ease;
}
.pwa-ios-banner.show { display: flex; }
.pwa-ios-text {
  font-family: var(--sans); font-size: 0.85rem; color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
.pwa-ios-text strong { color: #fff; }
.pwa-ios-arrow {
  position: absolute; bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(200,165,80,0.5);
}
.pwa-ios-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 1.2rem; cursor: pointer;
}
