:root {
  --font-family-display: 'Outfit', sans-serif;
  --font-family-body: 'DM Sans', sans-serif;
  --font-family-mono: 'JetBrains Mono', monospace;
}
html { scroll-behavior: smooth; font-family: 'DM Sans', sans-serif; }
section[id], div[id="formazione"] { scroll-margin-top: 80px; }
h1,h2,h3,h4,h5,h6 { font-family: 'Outfit', sans-serif; }
button { font-family: 'Outfit', sans-serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(13,34,64,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(13,34,64,0.4); }

/* Navbar */
#navbar { transition: background 0.3s, box-shadow 0.3s; }
#navbar.scrolled { background: #fff !important; box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
#navbar.scrolled .nav-link { color: #1A2D3F !important; }
#navbar .nav-link:hover { background: rgba(255,255,255,0.12) !important; border-radius: 8px; }
#navbar.scrolled .nav-link:hover { background: #F2F7FA !important; }
#navbar .nav-link.active { background: rgba(255,255,255,0.18) !important; }
#navbar.scrolled .nav-link.active { background: #EEF7FC !important; color: #2AA8D6 !important; }
#navbar.scrolled #login-btn, #navbar.scrolled #login-btn-mobile { background: #2AA8D6 !important; color: #fff !important; border-color: #2AA8D6 !important; }
#navbar.scrolled #hamburger-btn svg { color: #fff; }

.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.sr-only.focus\:not-sr-only:focus, .focus\:not-sr-only:focus { position:fixed;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal; }
*:focus-visible { outline:3px solid #2AA8D6 !important; outline-offset:2px !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:3px solid #2AA8D6 !important; outline-offset:2px !important; border-radius:4px; }
/* Mobile menu */
#mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s; opacity: 0; }
#mobile-menu.open { max-height: 600px; opacity: 1; }
#login-dropdown, #login-dropdown-mobile { display: none; }
#login-dropdown.open, #login-dropdown-mobile.open { display: block; }

/* Animate spin */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin-custom { animation: spin 0.8s linear infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* Service card hover */
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(42,168,214,0.12); }
.svc-card { transition: transform 0.3s, box-shadow 0.3s; }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(26,45,63,0.6); backdrop-filter: blur(4px); }
.modal-wrap { position: fixed; inset: 0; z-index: 101; display: flex; align-items: center; justify-content: center; padding: 1rem; pointer-events: none; }
.modal-box { pointer-events: auto; background: #fff; border-radius: 24px; box-shadow: 0 25px 60px rgba(0,0,0,0.2); width: 100%; max-height: 90vh; overflow-y: auto; }

/* Loghi footer (badge accreditamenti/pagamento su sfondo scuro): pillola bianca per leggibilità, altezza uniforme per riga */
.badge-mono { display: inline-flex; align-items: center; justify-content: center; background: #fff; padding: 10px 16px; border-radius: 10px; height: 52px; }
.badge-mono img { height: 100%; width: auto; object-fit: contain; }
.badge-mono.badge-lg { height: 76px; padding: 14px 22px; }
