/* =====================================================================
   agentic-nav.css — Navbar · Footer · Brand Statement
   Stili scoped per non interferire con il CSS base del contenuto.
   ===================================================================== */

/* ── Sfondo body scuro per questa pagina ─────────────────────────────── */
body { background: #060A1A; }

/* ── CSS vars — sempre dark (questa pagina non ha theme toggle) ──────── */
#navbar,
.mobile-menu,
#footer,
.brand-statement,
#btt {
  --brand:    #2BB5E8;
  --brand-d:  #1A89C0;
  --brand-l:  #60CCEF;
  --brand-xl: rgba(43,181,232,0.12);
  --brand-xs: rgba(43,181,232,0.06);
  --bg-2:     #0C1828;
  --border:   rgba(255,255,255,0.07);
  --border-a: rgba(43,181,232,0.30);
  --text:     #E6F2FA;
  --text-2:   #7090A8;
  --text-3:   #3A5570;
  --sh-brand: 0 6px 28px rgba(43,181,232,0.35);
  --font-h: 'Poppins', sans-serif;
  --font-b: 'Roboto', sans-serif;
  --w:    1200px;
  --r-sm: 8px;
  --t:    0.28s cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 28px;
  height: 90px;
  display: flex;
  align-items: center;
  background: rgba(7,16,28,0.94);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 18px rgba(0,0,0,0.3);
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}
#navbar.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.4); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img   { width: 72px; height: 72px; object-fit: contain; }
.logo-wordmark {
  font-family: var(--font-h);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.logo-blue { color: var(--brand); }

/* Nav links */
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--font-h);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t);
}
.nav-links a:hover,
.nav-links a.nav-active { color: var(--brand); }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* Theme toggle */
.theme-btn {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--brand-xl);
  border: 1.5px solid var(--border-a);
  color: var(--brand-l);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--t);
}
.theme-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
[data-theme="dark"] .nav-hamburger span { background: #E6F2FA; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Bottone Parla con noi nel navbar/mobile-menu ───────────── */
#navbar .btn,
.mobile-menu .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 8px;
  font-family: var(--font-h);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t);
}
#navbar .btn-primary,
.mobile-menu .btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
#navbar .btn-primary:hover,
.mobile-menu .btn-primary:hover {
  background: var(--brand-d);
  border-color: var(--brand-d);
  transform: translateY(-2px);
  box-shadow: var(--sh-brand);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════════ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 16px 28px 28px;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.mobile-menu.open { display: flex; }
.mobile-menu a,
.mobile-menu .mob-link {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t);
  display: block;
  text-decoration: none;
}
.mobile-menu a:last-of-type,
.mobile-menu .mob-link:last-of-type { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu .mob-link:hover { color: var(--brand); }
.mobile-menu .btn { margin-top: 20px; width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   BRAND STATEMENT
   ═══════════════════════════════════════════════════════════════ */
.brand-statement {
  position: relative;
  background: linear-gradient(180deg, #040C18 0%, #070F1F 35%, #0A1628 70%, #0D1A30 100%);
  padding: 124px 28px 116px;
  text-align: center;
  overflow: hidden;
}
.bs-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
}
.bs-glow-l {
  width: 600px; height: 600px;
  opacity: .22;
  background: radial-gradient(circle, rgba(43,181,232,1), transparent 70%);
  top: -100px; left: -80px;
}
.bs-glow-r {
  width: 500px; height: 500px;
  opacity: .14;
  background: radial-gradient(circle, rgba(99,102,241,1), transparent 70%);
  bottom: -100px; right: -80px;
}
.bs-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}
.brand-giant {
  font-family: var(--font-h);
  font-size: clamp(4.5rem, 12vw, 11rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  user-select: none;
}
.bg-white { color: #ffffff; }
.bg-blue  {
  background: linear-gradient(135deg, var(--brand-l), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bs-sep {
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43,181,232,.35), transparent);
  margin: 44px auto 40px;
}
.bs-quote-mark {
  position: relative; z-index: 1;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 4.4rem;
  line-height: .5;
  height: 36px;
  color: rgba(43,181,232,.30);
  margin-bottom: 10px;
}
.bs-payoff {
  position: relative; z-index: 1;
  font-family: var(--font-h);
  font-size: clamp(1.3rem, 2.05vw, 1.7rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: rgba(255,255,255,.90);
  max-width: 1040px;
  margin: 0 auto;
  text-wrap: balance;
}
.bs-payoff strong {
  font-weight: 700;
  background: linear-gradient(120deg, var(--brand-l) 0%, var(--brand) 55%, #818CF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
#footer {
  background: linear-gradient(180deg, #0D1A30 0%, #0A1422 50%, #060D18 100%);
  border-top: 1px solid rgba(43,181,232,.10);
  padding: 64px 0 0;
  position: relative;
}
#footer::before {
  content: '';
  position: absolute;
  top: -40px; left: -60px;
  width: 420px; height: 320px;
  background: radial-gradient(ellipse at center, rgba(43,181,232,.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
#footer .container { position: relative; z-index: 1; max-width: 1200px; padding: 0 28px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

/* Logo nel footer */
#footer .nav-logo .logo-wordmark { color: #ffffff; }
#footer .nav-logo .logo-blue     { color: var(--brand-l); }
#footer .logo-img { width: 44px; height: 44px; }

.footer-col h5 {
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 18px 0;
  color: rgba(255,255,255,.78);
}
.footer-col ul  { list-style: none; padding: 0; margin: 0; }
.footer-col li  { margin-bottom: 10px; }
.footer-col li a {
  font-size: .875rem;
  color: rgba(255,255,255,.46);
  text-decoration: none;
  transition: color var(--t);
}
.footer-col li a:hover { color: var(--brand-l); }

/* Footer meta: sedi + cert */
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 44px 0 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-meta .footer-sedi,
.footer-meta .cert-strip {
  padding: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
}
.footer-meta .cert-strip {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-meta .fs-head {
  text-align: center;
  margin-bottom: 26px;
}
.footer-meta .sedi-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.footer-meta .cert-logos {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.footer-meta .cert-item {
  flex: 0 1 206px;
  width: auto;
  min-width: 0;
  min-height: 104px;
  margin: 0;
}

.footer-sedi { padding-bottom: 28px; }

.fs-head { margin-bottom: 20px; }
.fs-eyebrow {
  display: inline-block;
  font-family: var(--font-h);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-l);
  margin-bottom: 6px;
}
.fs-title {
  font-family: var(--font-h);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -.005em;
}

.sedi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.sede-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  transition: transform .25s, background .25s, border-color .25s, box-shadow .25s;
}
.sede-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.06);
  border-color: rgba(43,181,232,.35);
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.sede-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(43,181,232,.12);
  border: 1px solid rgba(43,181,232,.28);
  color: var(--brand-l);
  font-size: 1.05rem;
}
.sede-body  { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sede-city  {
  font-family: var(--font-h);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff; line-height: 1;
}
.sede-addr {
  font-style: normal;
  font-size: .92rem; line-height: 1.6;
  color: rgba(255,255,255,.62);
  margin: 0;
}
.sede-place {
  display: inline-block;
  margin-top: 4px; font-style: normal;
  font-size: .82rem; color: rgba(255,255,255,.45);
}

/* Certificazioni */
.cert-strip {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.cert-strip .fs-head { text-align: center; margin-bottom: 18px; }
.cert-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cert-item {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 14px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .25s, background .25s, border-color .25s, box-shadow .25s;
  min-height: 78px;
  min-width: 132px;
}
.cert-item:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.cert-light { background: rgba(255,255,255,.95); padding: 12px 18px; border-color: rgba(255,255,255,.15); }
.cert-light:hover { background: #fff; }
.cert-item img { height: 48px; width: auto; object-fit: contain; display: block; }
.cert-item:nth-child(3) img { height: 64px; }
.cert-item:nth-child(4) img { height: 58px; }

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.footer-bottom span { font-size: .78rem; color: rgba(255,255,255,.22); }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  font-size: .78rem;
  color: rgba(255,255,255,.28);
  text-decoration: none;
  transition: color var(--t);
}
.footer-links a:hover { color: rgba(255,255,255,.60); }

/* ═══════════════════════════════════════════════════════════════
   BACK TO TOP
   ═══════════════════════════════════════════════════════════════ */
#btt {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--brand);
  border: none; border-radius: 10px; color: #fff;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t), background var(--t), transform var(--t), box-shadow var(--t);
  z-index: 998;
  box-shadow: var(--sh-brand);
  cursor: pointer;
}
#btt.show { opacity: 1; pointer-events: auto; }
#btt:hover { background: var(--brand-d); transform: translateY(-3px); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .sedi-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .footer-meta .sedi-grid { grid-template-columns: 1fr; }
  .footer-meta .cert-item { flex-basis: 150px; min-height: 92px; }
}
@media (max-width: 480px) {
  .footer-meta .cert-logos { gap: 12px; }
  .footer-meta .cert-item  { flex-basis: calc(50% - 6px); min-height: 84px; padding: 12px 14px; }
}

@media (max-width: 768px) {
  #navbar        { padding: 0 20px; height: 72px; }
  .logo-img      { width: 48px; height: 48px; }
  .logo-wordmark { font-size: 1.3rem; }
  .nav-logo      { gap: 10px; }
  .nav-links     { display: none; }
  .nav-cta-d     { display: none !important; }
  .nav-hamburger { display: flex; }

  .footer-grid   { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .brand-statement { padding: 80px 22px 72px; }
  .bs-sep          { width: 78%; margin: 36px auto 32px; }
  .brand-giant     { font-size: clamp(2rem, 12vw, 5rem); }
  .bs-quote-mark   { font-size: 3.4rem; height: 28px; }
  .bs-payoff       { font-size: clamp(1.2rem, 5vw, 1.7rem); }

  .cert-logos  { gap: 12px; }
  .cert-item   { min-height: 64px; min-width: 110px; padding: 10px 16px; }
  .cert-item img { max-height: 40px; }
  .sedi-grid   { grid-template-columns: 1fr; }
  .sede-card   { padding: 18px 20px; gap: 14px; }
  .sede-icon   { width: 42px; height: 42px; }
  .fs-title    { font-size: 1.1rem; }
}
