/* ============================================================
   NAVBAR.CSS — GS Calcio
   Versione 2.3 - 2025-11-07
   Basata su: versione animata originale
   ============================================================ */

.navbar-custom {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(90deg, rgba(13,110,253,0.95) 0%, rgba(59,167,255,0.95) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  font-family: 'Poppins', sans-serif;
}

.navbar-custom.scrolled {
  background: linear-gradient(90deg, rgba(10,88,202,0.95) 0%, rgba(45,140,230,0.95) 100%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.navbar-custom .navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff !important;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeDown 0.6s ease forwards;
}

.navbar-custom .navbar-brand img {
  height: 38px;
  width: auto;
  border-radius: 8px;
  margin-right: 8px;
}

/* Links principali */
.navbar-custom .nav-link {
  color: #f8f9fa !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  transition: all 0.25s ease-in-out;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Bottone “Logout” rosso */
.navbar-custom .btn-danger {
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s ease forwards;
  border-radius: 8px;
}

/* Animazioni */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cascata progressiva */
.navbar-nav .nav-item:nth-child(1) .nav-link { animation-delay: 0.15s; }
.navbar-nav .nav-item:nth-child(2) .nav-link { animation-delay: 0.25s; }
.navbar-nav .nav-item:nth-child(3) .nav-link { animation-delay: 0.35s; }
.navbar-nav .nav-item:nth-child(4) .nav-link { animation-delay: 0.45s; }
.navbar-nav .nav-item:nth-child(5) .nav-link { animation-delay: 0.55s; }
.navbar-nav .nav-item:nth-child(6) .nav-link { animation-delay: 0.65s; }
.navbar-nav .nav-item:nth-child(7) .nav-link { animation-delay: 0.75s; }
.navbar-custom .btn-danger { animation-delay: 0.85s; }

/* Dropdown menu */
.navbar-custom .dropdown-menu {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  border: none;
}

.navbar-custom .dropdown-item {
  color: #212529;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.navbar-custom .dropdown-item:hover {
  background-color: #e9ecef;
  color: #000;
}

/* Modalità mobile */
@media (max-width: 768px) {
  .navbar-custom .navbar-brand {
    font-size: 1.1rem;
  }
  .navbar-custom .nav-link {
    font-size: 1rem;
    text-align: center;
    display: block;
  }
}

/* ── Ricerca globale overlay ────────────────────────────────── */
.gs-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.gs-overlay[hidden] { display: none; }
.gs-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.gs-overlay-box {
  position: relative; width: 100%; max-width: 600px;
  margin: 0 1rem; z-index: 1;
  background: #1e293b; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  overflow: hidden;
}
.gs-overlay-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.gs-overlay-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #f1f5f9; font-size: 1rem;
}
.gs-overlay-input::placeholder { color: #64748b; }
.gs-overlay-esc {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.1); color: #94a3b8;
  border: 1px solid rgba(255,255,255,.15);
}
.gs-overlay-results { max-height: 360px; overflow-y: auto; }
.gs-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; cursor: pointer; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.05); transition: background .15s;
}
.gs-result:hover, .gs-result.active { background: rgba(255,255,255,.08); }
.gs-result:last-child { border-bottom: none; }
.gs-result-icon { font-size: 18px; flex-shrink: 0; }
.gs-result-body { flex: 1; min-width: 0; }
.gs-result-label { font-size: 14px; color: #f1f5f9; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-result-sub { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-no-results { padding: 1.5rem; text-align: center; color: #64748b; font-size: 14px; }
.gs-section-label { padding: 8px 18px 2px; font-size: 10px; color: #475569; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

#gs-search-btn {
  color: rgba(255,255,255,.8) !important;
  font-size: 16px;
  border: 1px solid rgba(255,255,255,.3) !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  background: rgba(255,255,255,.1) !important;
}
#gs-search-btn:hover {
  background: rgba(255,255,255,.2) !important;
  color: #fff !important;
}

/* ── Search FAB ──────────────────────────────────────────────── */
.gs-fab {
  position: fixed !important;
  bottom: 5.5rem !important;
  left: 1.25rem !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: var(--gs-primary) !important;
  border: none !important;
  font-size: 1.3rem !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.35) !important;
  z-index: 9000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.gs-fab:hover { transform: scale(1.1); }
