/* ── Variables ── */
:root {
  --navy: #1B3A6B;
  --night: #0F1F3D;
  --red: #C8102E;
  --gray-bg: #F5F7FA;
  --white: #FFFFFF;
}

/* ── Reset ── */
* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--night); background: var(--white); margin: 0; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; }

/* ── Skip link (Fix #14) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Nav ── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(11, 25, 55, 0.97); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.07); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.15rem; color: white; letter-spacing: -0.01em; text-decoration: none; }
.nav-logo span { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.75); text-decoration: none; letter-spacing: 0.01em; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: white; }
/* Fix #10: specificità superiore invece di !important */
.nav-links .btn-nav { background: var(--red); color: white; padding: 0.5rem 1.25rem; border-radius: 6px; font-weight: 600; font-size: 0.85rem; transition: background 0.2s, opacity 0.2s; }
.nav-links .btn-nav:hover { opacity: 0.88; }

/* ── Hamburger ── */
.hamburger { display: none; position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.875rem 0.75rem; touch-action: manipulation; -webkit-tap-highlight-color: transparent; z-index: 110; }
.hamburger span { display: block; width: 22px; height: 2px; background: white; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; pointer-events: none; }
.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 { display: none; position: fixed; top: 68px; left: 0; right: 0; z-index: 99; background: rgba(11,25,55,0.99); border-bottom: 1px solid rgba(255,255,255,0.07); padding: 1rem 2rem 1.5rem; transform: translateY(8px); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease; pointer-events: none; }
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.mobile-menu ul li a { display: block; padding: 0.85rem 0; font-size: 1rem; font-weight: 500; color: rgba(255,255,255,0.75); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.06); transition: color 0.2s; }
.mobile-menu ul li:last-child a { border-bottom: none; }
.mobile-menu ul li a:hover, .mobile-menu ul li a.active { color: white; }
/* Fix #10: rimosso !important */
.mobile-menu .btn-nav-mobile { display: block; margin-top: 1rem; background: var(--red); color: white; padding: 0.75rem 1.5rem; border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.95rem; text-align: center; text-decoration: none; transition: opacity 0.2s; }
.mobile-menu .btn-nav-mobile:hover { opacity: 0.88; }

/* ── Page hero (pagine interne) ── */
.page-hero { background: linear-gradient(135deg, var(--night) 0%, var(--navy) 60%, #1e4d8c 100%); padding: 10rem 2rem 6rem; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -20%; right: -5%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(200,16,46,0.1) 0%, transparent 70%); pointer-events: none; }
.page-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.page-tag { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(200,16,46,0.15); border: 1px solid rgba(200,16,46,0.3); color: #ff6b80; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.85rem; border-radius: 100px; margin-bottom: 1.5rem; }
.page-tag::before { content: ''; width: 5px; height: 5px; background: var(--red); border-radius: 50%; }
.page-hero h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 800; color: white; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 1rem; }
.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,0.65); max-width: 480px; line-height: 1.7; margin: 0; }

/* ── Footer ── */
footer { background: var(--night); padding: 3rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-logo { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; color: white; text-decoration: none; }
.footer-logo span { color: var(--red); }
.footer-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.25); }
.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-contacts { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.footer-contacts a { font-size: 0.78rem; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.2s; }
.footer-contacts a:hover { color: rgba(255,255,255,0.7); }

/* ── Focus visibile ── */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
a:focus-visible { outline-offset: 2px; }

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

/* ── Floating WhatsApp button (mobile only) ── */
.wa-float { display: none; }
@media (max-width: 640px) {
  .wa-float { display: flex; position: fixed; bottom: 1.5rem; right: 1.25rem; z-index: 200; width: 56px; height: 56px; background: #25D366; border-radius: 50%; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: transform 0.2s, box-shadow 0.2s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .wa-float:active { transform: scale(0.94); box-shadow: 0 2px 12px rgba(37,211,102,0.35); }
  .wa-float svg { width: 30px; height: 30px; fill: white; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.page-tag { animation: fadeUp 0.5s ease both; }
.page-hero h1 { animation: fadeUp 0.5s 0.1s ease both; }
.page-hero p { animation: fadeUp 0.5s 0.2s ease both; }

/* ── Touch feedback (mobile) ── */
@media (hover: none) {
  .nav-links a:active { color: white; }
  .mobile-menu ul li a:active { color: white; }
  .mobile-menu .btn-nav-mobile:active { opacity: 0.8; }
  .faq-question:active { color: var(--red); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-inner { flex-wrap: wrap; gap: 1.25rem; }
  .footer-links { flex-wrap: wrap; gap: 1.25rem; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { padding: 0 1.25rem; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  .page-hero { padding: 7rem 1.5rem 3.5rem; }
  .page-hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .page-hero p { font-size: 0.95rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .footer-contacts { justify-content: center; }
}
