/* ==========================================================================
   WEB FONTS & TYPOGRAPHY METRICS OPTIMIZATION
   Elimina il blocco del rendering e previene Cumulative Layout Shift (CLS)
   ========================================================================== */
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial'), local('Helvetica'), local('sans-serif');
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
  size-adjust: 100%;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj4PVnskPMA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/spacegrotesk/v22/V8mQoQDjQSkFtoMM3T6r8E7mF71Q-gOoraIAEj4PVnskPMA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Font Awesome con font-display swap esplicito (risolve avviso Lighthouse) */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-brands-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-regular-400.woff2') format('woff2');
}

/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - GIOVANNI.DEV
   Theme: Cyber-Luxury Dark / Glassmorphism / 3D Integrated
   ========================================================================== */
:root {
  --bg-primary: #07090e;
  --bg-secondary: #0c1017;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-glow: rgba(0, 242, 254, 0.3);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #7928ca;
  --accent-green: #10b981;
  --accent-wa: #25d366;

  --gradient-accent: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #7928ca 100%);
  --gradient-glow: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(121, 40, 202, 0.05) 50%, transparent 70%);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', 'Space Grotesk Fallback', sans-serif;
  --font-mono: 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  /* Safe Area Insets Ecosistema Apple (iPhone Notch / Dynamic Island / iPad Home Bar) */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

/* Base Reset & Apple iOS Touch Optimizations */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* 3D Canvas Background & Ambient Glow */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

#webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  pointer-events: none;
}

.glow-1 {
  top: -150px;
  right: -100px;
  background: #00f2fe;
}

.glow-2 {
  bottom: 10%;
  left: -200px;
  background: #7928ca;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

/* Section Header Shared */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-glass-glow);
  box-shadow: 0 15px 35px -10px rgba(0, 242, 254, 0.15);
}

/* Typography Helpers */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-accent {
  color: var(--accent-cyan);
}

.text-success {
  color: var(--accent-green);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  color: #07090e;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.92;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.55);
  }

  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
  }

  .btn-whatsapp:hover {
    background: #1ebc57;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
  }
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: calc(1.2rem + env(safe-area-inset-top, 0px)) 0 1.2rem 0;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 0 0.8rem 0;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 calc(1.5rem + env(safe-area-inset-right, 0px)) 0 calc(1.5rem + env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo-bracket {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.logo-name {
  color: #fff;
  margin: 0 2px;
}

.logo-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 1.8rem;
  white-space: nowrap;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-link:hover {
  color: var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 1.2rem;
  white-space: nowrap;
}

.nav-actions .btn-sm {
  min-width: 176px;
  justify-content: center;
  white-space: nowrap;
}

.badge-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: calc(8rem + env(safe-area-inset-top, 0px));
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 960px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 1.8rem;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: #fff;
  min-height: 2.3em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.hero-subtitle strong {
  color: #fff;
  font-weight: 600;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  width: 100%;
  max-width: 1080px;
}

.metric-card {
  background: rgba(18, 24, 38, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  transition: var(--transition-smooth);
}

.metric-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-3px);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.metric-label {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.scroll-down-indicator {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mouse-icon {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 3px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 2px;
  animation: mouseWheel 1.6s infinite;
}

@keyframes mouseWheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ==========================================================================
   SERVIZI SECTION
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.service-card {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
}

.service-icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.05));
  border: 1px solid rgba(0, 242, 254, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: #fff;
}

.service-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.service-features li i {
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.service-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.price-hint {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.service-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.service-link:hover {
  transform: translateX(4px);
}

/* ==========================================================================
   CALCOLATORE PREVENTIVO (INTERATTIVO)
   ========================================================================== */
.calcolatore-section {
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
}

.calculator-box {
  padding: 3.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.calculator-box::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.12), transparent 70%);
  pointer-events: none;
}

.calc-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.calc-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: #fff;
}

.calc-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.calc-step {
  margin-bottom: 2.5rem;
}

.calc-step-label {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  color: #fff;
}

.calc-options-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
}

.calc-opt-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.calc-opt-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.calc-opt-card.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.opt-icon {
  font-size: 1.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}

.opt-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.opt-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Addons Checkbox */
.calc-addons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.addon-checkbox-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.addon-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

.addon-checkbox-label input[type="checkbox"] {
  display: none;
}

.custom-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.addon-checkbox-label input[type="checkbox"]:checked + .custom-check {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.addon-checkbox-label input[type="checkbox"]:checked + .custom-check::after {
  content: '✓';
  color: #07090e;
  font-size: 0.85rem;
  font-weight: 800;
}

.addon-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.addon-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.addon-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.addon-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
}

/* Result Box */
.calc-result-box {
  background: rgba(12, 16, 23, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  margin-top: 2rem;
  text-align: center;
}

.result-details {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.res-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.res-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.calc-disclaimer {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ==========================================================================
   PORTFOLIO / REAL PROJECTS
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.project-img-box {
  height: 200px;
  background: #0d131f;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-preview-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  color: #fff;
}

.project-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition-smooth);
}

.project-card:hover .project-visual {
  transform: scale(1.08);
}

.project-icon {
  font-size: 3.5rem;
}

.angular-visual .project-icon { color: #dd0031; }
.mql5-visual .project-icon { color: #00f2fe; }
.shopify-visual .project-icon { color: #96bf48; }
.python-visual .project-icon { color: #3776ab; }

.project-metric-pill {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
}

.project-description {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.project-tags span {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
}

.project-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-glass);
}

.client-type {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.github-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

.github-badge:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--accent-cyan);
}

/* ==========================================================================
   STACK & INTERACTIVE TERMINAL
   ========================================================================== */
.stack-showcase-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: stretch;
}

.terminal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #080c14;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.terminal-header {
  background: #0e1422;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #cbd5e1;
  overflow-x: auto;
}

.term-line {
  margin-bottom: 0.5rem;
}

.term-prompt {
  color: var(--accent-cyan);
  font-weight: 700;
}

.term-cmd {
  color: #fff;
}

.term-output {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.term-code {
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.term-cursor-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.term-cursor {
  width: 8px;
  height: 15px;
  background: var(--accent-cyan);
  display: inline-block;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.skills-cards-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-category {
  padding: 1.4rem;
}

.skill-category h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  color: #cbd5e1;
  transition: var(--transition-smooth);
}

.chip:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  background: rgba(0, 242, 254, 0.08);
}

/* ==========================================================================
   PROCESSO (4 STEP TIMELINE)
   ========================================================================== */
.steps-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.step-card {
  padding: 2rem 1.6rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
}

.step-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.faq-accordion-container,
.faq-accordion-grid {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
}

.faq-item,
.faq-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: rgba(18, 24, 38, 0.7);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active,
.faq-card.active {
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.15);
  background: rgba(22, 30, 48, 0.85);
}

.faq-question {
  width: 100%;
  padding: 1.35rem 1.6rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-chevron {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.faq-item.active .faq-chevron,
.faq-card.active .faq-chevron {
  transform: rotate(180deg);
  color: #34d399;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-answer,
.faq-card.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.6rem 1.5rem 1.6rem;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.faq-answer strong {
  color: #fff;
}

/* ==========================================================================
   CONTACT SECTION & FORM
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3.5rem;
  gap: 3.5rem;
  border-color: rgba(0, 242, 254, 0.2);
}

.contact-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.contact-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2.2rem;
}

.direct-channels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.channel-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.whatsapp-channel:hover {
  border-color: rgba(37, 211, 102, 0.4);
}

.whatsapp-channel .channel-icon {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.email-channel .channel-icon {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.location-channel .channel-icon {
  background: rgba(121, 40, 202, 0.15);
  color: #a855f7;
}

.channel-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.channel-text {
  display: flex;
  flex-direction: column;
}

.ch-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ch-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

/* Form */
.contact-form {
  background: rgba(12, 16, 23, 0.6);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.form-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}

.form-group-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: #fff;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.03);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.form-group select option {
  background: #0c1017;
  color: #fff;
}

.form-privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.form-feedback {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
  text-align: center;
}

.form-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-glass);
  background: #040609;
  padding-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 4rem;
}

.footer-tagline {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
}

.f-col-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.8rem 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   FLOATING QUICK WHATSAPP BUTTON
   ========================================================================== */
.floating-whatsapp-btn {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: calc(2rem + env(safe-area-inset-right, 0px));
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #25d366;
  color: #061a10;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  transition: var(--transition-smooth);
}

.floating-whatsapp-btn i {
  font-size: 1.4rem;
  color: #061a10;
}

.floating-whatsapp-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.65);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calc-options-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .calc-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack-showcase-grid {
    grid-template-columns: 1fr;
  }
  .steps-timeline {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(7, 9, 14, 0.97);
    backdrop-filter: blur(25px);
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    transform: translateY(-150%);
    transition: var(--transition-smooth);
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: flex;
  }

  .badge-status {
    display: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  /* ==========================================================================
     CALCOLATORE PREVENTIVO - RESPONSIVE MOBILE UX (< 768px)
     ========================================================================== */
  .calcolatore-section {
    padding-top: 85px !important;
    padding-bottom: 50px !important;
  }

  .calculator-box {
    padding: 1.5rem 1rem !important;
    border-radius: 16px !important;
  }

  .calc-header {
    margin-bottom: 1.6rem !important;
  }

  .calc-title {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.6rem !important;
  }

  .calc-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  .calc-step {
    margin-bottom: 1.8rem !important;
  }

  .calc-step-label {
    font-size: 0.95rem !important;
    margin-bottom: 0.85rem !important;
  }

  /* Step 1: Opzioni Progetto Mobile (Layout a schede orizzontali compatte) */
  .calc-options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .calc-opt-card {
    display: flex !important;
    align-items: center !important;
    text-align: left !important;
    padding: 0.85rem 0.95rem !important;
    gap: 0.85rem !important;
    border-radius: 12px !important;
    min-height: 60px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    transition: all 0.2s ease !important;
  }

  .calc-opt-card .opt-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 10px !important;
    background: rgba(0, 242, 254, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    margin-bottom: 0 !important;
    color: var(--accent-cyan) !important;
  }

  .calc-opt-card .opt-text {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .calc-opt-card .opt-name {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 0.15rem !important;
  }

  .calc-opt-card .opt-desc {
    font-size: 0.75rem !important;
    color: var(--text-dim) !important;
    line-height: 1.35 !important;
  }

  .calc-opt-card .opt-radio {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    color: transparent !important;
    font-size: 0.7rem !important;
    transition: all 0.2s ease !important;
  }

  .calc-opt-card.active {
    background: rgba(0, 242, 254, 0.09) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.18) !important;
  }

  .calc-opt-card.active .opt-radio {
    border-color: var(--accent-cyan) !important;
    background: var(--accent-cyan) !important;
    color: #07090e !important;
  }

  /* Step 2: Addons Checkbox Mobile */
  .calc-addons-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .addon-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    padding: 0.85rem 0.95rem !important;
    gap: 0.8rem !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.02) !important;
  }

  .addon-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.04) !important;
  }

  .addon-checkbox-label:has(input:checked) {
    background: rgba(0, 242, 254, 0.06) !important;
    border-color: rgba(0, 242, 254, 0.35) !important;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.08) !important;
  }

  .custom-check {
    margin-top: 2px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 5px !important;
  }

  .addon-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .addon-name {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin-bottom: 0.2rem !important;
  }

  .addon-sub {
    font-size: 0.73rem !important;
    line-height: 1.4 !important;
    color: var(--text-dim) !important;
  }

  .addon-badge {
    align-self: flex-start !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.76rem !important;
    padding: 0.25rem 0.5rem !important;
    margin-top: 1px !important;
  }

  /* Step 3: Result Box Mobile */
  .calc-result-box {
    padding: 1.4rem 1rem !important;
    border-radius: 14px !important;
    margin-top: 1.8rem !important;
  }

  .result-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
    margin-bottom: 1.3rem !important;
  }

  .result-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 0.85rem 0.5rem !important;
    text-align: center !important;
  }

  .res-title {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.35rem !important;
  }

  .res-value {
    font-size: 1.6rem !important;
    line-height: 1.15 !important;
  }

  .result-actions {
    flex-direction: column !important;
    gap: 0.7rem !important;
    width: 100% !important;
  }

  .result-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.95rem 1rem !important;
    font-size: 0.92rem !important;
    border-radius: 10px !important;
  }

  .calc-disclaimer {
    font-size: 0.72rem !important;
    line-height: 1.4 !important;
    margin-top: 0.8rem !important;
    padding: 0 0.4rem !important;
  }

  .steps-timeline {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .floating-wa-label {
    display: none;
  }

  .floating-whatsapp-btn {
    padding: 0.9rem;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    justify-content: center;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    right: calc(1.2rem + env(safe-area-inset-right, 0px));
  }

  /* FAQ Mobile Styles */
  .faq-question {
    padding: 1.15rem 1.25rem;
    font-size: 0.98rem;
    gap: 0.8rem;
  }

  .faq-answer p {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.92rem;
    line-height: 1.6;
  }

  /* AI Studio & Generatore Python Mobile Styles */
  .ai-studio-split {
    grid-template-columns: 1fr !important;
  }

  .ai-playground-card {
    padding: 1.4rem 1.1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .ai-playground-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.6rem !important;
  }

  .ai-input-bar {
    flex-direction: column !important;
    padding: 0.8rem !important;
    gap: 0.8rem !important;
  }

  .ai-input-bar input {
    width: 100% !important;
    font-size: 0.92rem !important;
    padding: 0.3rem 0 !important;
  }

  .ai-input-bar button {
    width: 100% !important;
    justify-content: center !important;
  }

  .preset-chips-container {
    gap: 0.45rem !important;
  }

  .preset-chip {
    font-size: 0.78rem !important;
    padding: 0.45rem 0.7rem !important;
    white-space: normal !important;
    text-align: left !important;
  }

  .code-output-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .code-output-topbar {
    padding: 0.6rem 0.8rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .code-output-body {
    padding: 1rem 0.85rem !important;
    font-size: 0.8rem !important;
    line-height: 1.6 !important;
    max-height: 320px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: pre !important;
    word-break: normal !important;
  }
}

@media (max-width: 576px) {
  .nav-container {
    padding: 0 1rem;
  }

  .brand-logo {
    font-size: 1.15rem;
  }

  .nav-actions .btn-sm {
    display: none;
  }

  .nav-actions {
    gap: 0.6rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-wrapper {
    padding: 1.5rem 1rem !important;
  }

  .calc-card,
  .calculator-box,
  .service-card,
  .portfolio-card,
  .ai-playground-card {
    padding: 1.25rem 0.85rem !important;
  }

  .hero-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 400px) {
  .result-details {
    grid-template-columns: 1fr !important;
  }
  .res-value {
    font-size: 1.45rem !important;
  }
  .calc-opt-card .opt-desc {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .brand-logo .logo-bracket {
    display: none;
  }
}

/* ==========================================================================
   AI PLAYGROUND (BOT 1B PYTHON GENERATOR) STYLES
   ========================================================================== */
.ai-playground-box {
  padding: 2.8rem;
  border-color: rgba(0, 242, 254, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.ai-prompt-wrapper label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: #fff;
}

.input-with-btn {
  display: flex;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.5rem 0.4rem 1.2rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.input-with-btn:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.input-with-btn input {
  flex-grow: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.ai-presets-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.preset-chip:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.ai-code-terminal {
  background: #080c14;
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ai-terminal-top {
  background: #0e1422;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.ai-term-dots {
  display: flex;
  gap: 6px;
}

.ai-term-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-code-display {
  padding: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #a5f3fc;
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: #060910;
}

/* ==========================================================================
   AI STUDIO & NEURAL WORKSTATION STYLES (ENHANCED UI)
   ========================================================================== */
.ai-studio-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
}

@media (max-width: 992px) {
  .ai-studio-split {
    grid-template-columns: 1fr;
  }
}

.ai-playground-card {
  padding: 2.2rem;
  background: linear-gradient(135deg, rgba(14, 20, 36, 0.85) 0%, rgba(8, 12, 22, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.ai-playground-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00f2fe, #4facfe, #8b5cf6, #10b981);
  opacity: 0.85;
}

.ai-playground-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-chip-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #34d399;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseStatus 2s infinite ease-in-out;
}

@keyframes pulseStatus {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.ai-controls-note {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.preset-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.ai-input-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 1.8rem;
  width: 100%;
}

@media (min-width: 992px) {
  .ai-input-bar {
    flex-direction: row;
    align-items: stretch;
  }
}

.ai-input-bar input {
  width: 100%;
  min-width: 0;
  background: rgba(5, 8, 16, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.3);
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  min-height: 52px;
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .ai-input-bar input {
    flex: 1;
    width: auto;
  }
}

.ai-input-bar input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.ai-input-bar input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ai-input-bar button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

@media (min-width: 992px) {
  .ai-input-bar button {
    width: auto;
  }
}

.code-output-container {
  background: #040711;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

.code-output-topbar {
  background: #0a0f1d;
  padding: 0.65rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lang-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-copy-code:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #fff;
}

.code-output-body {
  padding: 1.5rem 1.8rem;
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #67e8f9;
  max-height: 380px;
  min-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Visual Card con Immagine AI e Trading */
.visual-feature-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: #090e1c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.visual-feature-img-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.visual-feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visual-feature-card:hover .visual-feature-img {
  transform: scale(1.05);
}

.visual-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.1) 0%, rgba(8, 12, 24, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

.visual-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 242, 254, 0.2);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.4);
  backdrop-filter: blur(8px);
}

.visual-feature-badge.trading {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.visual-feature-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.visual-feature-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.visual-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.visual-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.visual-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.visual-stat-val {
  font-size: 1rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.visual-stat-val.positive {
  color: #34d399;
}

/* Stili Immagini Showcase Portfolio */
.project-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img-cover {
  transform: scale(1.06);
}

/* ==========================================================================
   PRIVACY CHECKBOX & COOKIE BANNER (GDPR)
   ========================================================================== */
.form-privacy-check {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.privacy-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.privacy-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.legal-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-link:hover {
  color: #fff;
}

/* Cookie Banner - Zero Layout Shift (CLS) */
.cookie-banner {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  left: calc(2rem + env(safe-area-inset-left, 0px));
  max-width: 520px;
  padding: 1.5rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  contain: layout paint;
  will-change: opacity;
  animation: fadeInBanner 0.3s ease-out;
}

@keyframes fadeInBanner {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cookie-icon {
  font-size: 1.8rem;
  color: #fbbf24;
  flex-shrink: 0;
}

.cookie-text h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.cookie-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.cookie-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

.cookie-actions .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 768px) {
  .cookie-banner {
    left: calc(1rem + env(safe-area-inset-left, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }

  /* Nascondi sezioni secondarie su mobile per non allungare la pagina */
  .hide-on-mobile {
    display: none !important;
  }

  /* RISOLUZIONE SPECIFICA GENERATORE PYTHON PER HONOR 9X E SMARTPHONE */
  .ai-studio-split {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .ai-playground-card {
    padding: 1.25rem 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .ai-input-bar {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
  }

  .ai-input-bar input,
  #ai-prompt-input {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(5, 8, 16, 0.9) !important;
    border: 1px solid rgba(0, 242, 254, 0.4) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.95rem 1.1rem !important;
    font-size: 0.95rem !important;
    min-height: 52px !important;
    color: #fff !important;
    display: block !important;
  }

  .ai-input-bar button,
  #btn-generate-ai {
    width: 100% !important;
    min-height: 52px !important;
    padding: 0.95rem 1.2rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    justify-content: center !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
    position: static !important;
    margin: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.45) !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }
}


