/* ============================================================
 * GoBikely — navbar.css
 * CSS condiviso per la navbar (desktop + mobile + lang switcher)
 *
 * Uso nelle pagine:
 *   <link rel="stylesheet" href="/assets/css/navbar.css">
 *   (incluso nell'<head>, DOPO le CSS variables del :root)
 *
 * Richiede le CSS variables della pagina:
 *   --yellow, --white, --dark, --font-head
 * Sono pero' presenti fallback inline (es. var(--dark,#1A1A1A))
 * per le regole del lang switcher.
 * ============================================================ */

/* ── Navbar ── */
nav {
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex: 1;
}
.nav-logo span { color: var(--yellow); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
  flex-shrink: 0;
}
.nav-links a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--yellow); }

.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 3px solid var(--yellow);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 999;
  padding: 20px 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mobile-menu ul li a {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-menu ul li a:hover,
.mobile-menu ul li a.active { color: var(--yellow); }
.mobile-menu-cta { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.mobile-menu-cta .btn { width: 100%; justify-content: center; }
.mobile-menu-langs { display: flex; gap: 12px; margin-top: 12px; }

/* Language dropdown */
.lang-switcher { position: relative; }
.lang-toggle {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: var(--font-head, sans-serif);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dark, #1A1A1A);
  transition: border-color 0.2s;
  white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--yellow, #F5C300); }
.lang-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 130px;
  overflow: hidden;
  z-index: 999;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: var(--font-head, sans-serif);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dark, #1A1A1A);
  text-decoration: none;
  transition: background 0.15s;
}
.lang-option:hover { background: #f5f5f5; }
.lang-option.active { color: var(--yellow, #F5C300); background: #fffbea; font-weight: 800; }

/* ── Responsive navbar (mobile) ── */
@media (max-width: 768px) {
  nav { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
