/* ========================================
   CarflowX - Sito Vetrina CSS
   Palette: Indigo/Slate/Cyan
   ======================================== */

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.6;
  background: #ffffff;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  color: #64748b;
  line-height: 1.7;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4F46E5;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  color: #0f172a;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 650px;
  margin: 0 auto 48px;
}

.text-center {
  text-align: center;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338CA, #4F46E5);
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: #4F46E5;
  border: 2px solid #4F46E5;
}

.btn-outline-dark:hover {
  background: #4F46E5;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-white {
  background: #ffffff;
  color: #4F46E5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
  border-radius: 14px;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.9rem;
  border-radius: 10px;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: #0f172a;
  padding: 12px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
}

.nav-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #4F46E5;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn-login {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  transition: color 0.3s ease;
}

.nav-cta .btn-login:hover {
  color: #ffffff;
}

.nav-cta .btn-primary {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 3%) scale(1.05); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: #ffffff;
  font-size: 3.5rem;
  margin-bottom: 24px;
  line-height: 1.15;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, #818CF8, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .hero-subtitle {
  color: #94a3b8;
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-badge i {
  color: #06B6D4;
  font-size: 0.9rem;
}

/* === HERO FEATURES CHECKLIST === */
.hero-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 20px;
  margin-top: 32px;
  text-align: left;
  max-width: 900px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.hero-feature i {
  color: #10b981;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* === LANGUAGE SWITCHER === */
.lang-switcher {
  position: relative;
  margin-left: 12px;
}

.lang-mobile {
  display: none;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.2);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 1001;
}

.lang-dropdown.show {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #cbd5e1;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.lang-option:hover {
  background: #334155;
  color: #fff;
}

.lang-option.active {
  color: #818CF8;
  font-weight: 600;
}

/* === MOCKUP SECTION === */
.mockup-section {
  position: relative;
  padding: 0 0 80px;
  background: linear-gradient(180deg, #0f172a 0%, #f8fafc 60%);
}

.mockup-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.mockup-desktop {
  background: #1e293b;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

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

.mockup-dot.red { background: #ef4444; }
.mockup-dot.yellow { background: #eab308; }
.mockup-dot.green { background: #22c55e; }

.mockup-screen {
  background: #ffffff;
  border-radius: 8px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.mockup-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #94a3b8;
  padding: 40px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.mockup-placeholder .mock-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-radius: 8px 0 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  gap: 16px;
}

.mockup-placeholder .mock-sidebar-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.mockup-placeholder .mock-sidebar-icon.active {
  background: rgba(79, 70, 229, 0.4);
}

.mockup-placeholder .mock-header {
  position: absolute;
  top: 0;
  left: 60px;
  right: 0;
  height: 50px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.mockup-placeholder .mock-header-text {
  width: 120px;
  height: 16px;
  background: #e2e8f0;
  border-radius: 4px;
}

.mockup-placeholder .mock-content {
  position: absolute;
  top: 50px;
  left: 60px;
  right: 0;
  bottom: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-content: start;
}

.mockup-placeholder .mock-card {
  background: #ffffff;
  border-radius: 8px;
  height: 80px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  padding: 12px;
}

.mockup-placeholder .mock-card-title {
  width: 60%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-bottom: 8px;
}

.mockup-placeholder .mock-card-bar {
  width: 40%;
  height: 20px;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  border-radius: 4px;
  opacity: 0.3;
}

.mockup-placeholder .mock-table {
  grid-column: 1 / -1;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.mockup-placeholder .mock-table-header {
  height: 36px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.mockup-placeholder .mock-table-row {
  height: 40px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.mockup-placeholder .mock-table-cell {
  height: 8px;
  background: #e2e8f0;
  border-radius: 2px;
  flex: 1;
}

.mockup-placeholder .mock-table-cell:first-child {
  flex: 2;
}

/* === SECTIONS === */
.section {
  padding: 100px 0;
}

.section-alt {
  background: #f8fafc;
}

.section-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
}

.section-dark .section-title {
  color: #ffffff;
}

.section-dark .section-subtitle {
  color: #94a3b8;
}

/* === BENEFITS CARDS === */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.benefit-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.1);
  border-color: #C7D2FE;
}

.benefit-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
}

.benefit-icon.indigo { background: #EEF2FF; color: #4F46E5; }
.benefit-icon.cyan { background: #ECFEFF; color: #0891B2; }
.benefit-icon.emerald { background: #ECFDF5; color: #059669; }
.benefit-icon.amber { background: #FFFBEB; color: #D97706; }

.benefit-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: #0f172a;
}

.benefit-card p {
  font-size: 0.9rem;
  color: #64748b;
}

/* === HOW IT WORKS === */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, #4F46E5, #06B6D4);
  opacity: 0.3;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.step-item h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #0f172a;
}

.step-item p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

/* === FEATURES GRID === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08);
  border-color: #C7D2FE;
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: #EEF2FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.feature-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #0f172a;
}

.feature-card p {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
}

/* === COMPARISON TABLE === */
.comparison-table {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.comparison-col {
  border-radius: 16px;
  padding: 32px;
}

.comparison-col.without {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.comparison-col.with {
  background: #EEF2FF;
  border: 2px solid #4F46E5;
  position: relative;
}

.comparison-col.with::before {
  content: 'CONSIGLIATO';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #4F46E5;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  letter-spacing: 1px;
}

.comparison-col h3 {
  font-size: 1.2rem;
  margin-bottom: 24px;
  text-align: center;
}

.comparison-col.without h3 {
  color: #dc2626;
}

.comparison-col.with h3 {
  color: #4F46E5;
}

.comparison-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.95rem;
}

.comparison-item:last-child {
  border-bottom: none;
}

.comparison-item i {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.comparison-col.without .comparison-item i {
  color: #dc2626;
}

.comparison-col.with .comparison-item i {
  color: #4F46E5;
}

.comparison-item .time {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.comparison-col.without .time {
  color: #dc2626;
}

.comparison-col.with .time {
  color: #4F46E5;
}

/* === STATS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818CF8, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 500;
}

/* === TESTIMONIALS === */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.testimonial-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.testimonial-stars i {
  color: #F59E0B;
  font-size: 0.9rem;
}

.testimonial-text {
  font-size: 0.95rem;
  color: #475569;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
}

.testimonial-role {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* === TESTIMONIAL CAROUSEL === */
.testimonial-carousel {
  padding: 0 24px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.testimonial-slide {
  min-width: calc(33.333% - 16px);
  margin: 0 8px;
  box-sizing: border-box;
}

.testimonial-slide .testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-slide .testimonial-text {
  flex: 1;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: #4F46E5;
  transform: scale(1.3);
}

/* === FAQ === */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #C7D2FE;
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
  font-size: 1rem;
  background: #ffffff;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-question i {
  color: #4F46E5;
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #64748b;
}

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* === FOOTER === */
.footer {
  background: #0f172a;
  padding: 64px 0 32px;
  color: #94a3b8;
}

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

.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-brand .logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4F46E5, #06B6D4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #ffffff;
}

.footer-brand p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #4F46E5;
  border-color: #4F46E5;
  color: #ffffff;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  color: #64748b;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-col ul a:hover {
  color: #818CF8;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #475569;
}

.footer-bottom a {
  color: #64748b;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: #818CF8;
}

/* === PRICING === */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.pricing-toggle span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s ease;
}

.pricing-toggle span.active {
  color: #0f172a;
  font-weight: 600;
}

.toggle-switch {
  width: 52px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle-switch.active {
  background: #4F46E5;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-switch.active::after {
  transform: translateX(24px);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 32px;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.pricing-card.featured {
  border: 2px solid #4F46E5;
  box-shadow: 0 12px 40px rgba(79, 70, 229, 0.15);
  transform: scale(1.05);
}

.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-8px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-card h3 {
  font-size: 1.3rem;
  color: #0f172a;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  color: #0f172a;
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: #94a3b8;
}

.pricing-card .price-note {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 24px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.9rem;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li i {
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
}

.pricing-features li i.fa-check {
  color: #4F46E5;
}

.pricing-features li i.fa-xmark {
  color: #cbd5e1;
}

.pricing-features li.disabled {
  color: #cbd5e1;
}

/* === FEATURE DETAIL (funzionalita page) === */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-detail:nth-child(even) {
  direction: rtl;
}

.feature-detail:nth-child(even) > * {
  direction: ltr;
}

.feature-detail-content h3 {
  font-size: 1.6rem;
  color: #0f172a;
  margin-bottom: 16px;
}

.feature-detail-content p {
  margin-bottom: 20px;
}

.feature-detail-list {
  list-style: none;
}

.feature-detail-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: #475569;
}

.feature-detail-list li i {
  color: #4F46E5;
  font-size: 0.85rem;
}

.feature-detail-visual {
  background: linear-gradient(135deg, #EEF2FF, #f0fdf4);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.feature-detail-visual .visual-icon {
  font-size: 5rem;
  color: #4F46E5;
  opacity: 0.6;
}

/* === CONTACT FORM === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  transition: all 0.3s ease;
  color: #1e293b;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-info-card {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 20px;
  padding: 40px;
  color: #ffffff;
}

.contact-info-card h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818CF8;
  font-size: 1rem;
}

.contact-info-item h4 {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-info-item p {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* === MOBILE VERSION SECTION === */
.mobile-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.mobile-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 1rem;
  color: #475569;
}

.mobile-features li i {
  color: #4F46E5;
  font-size: 0.9rem;
  width: 24px;
}

.mobile-mockup {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 280px;
  height: 560px;
  background: #1e293b;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.phone-notch {
  width: 120px;
  height: 24px;
  background: #1e293b;
  border-radius: 0 0 16px 16px;
  margin: 0 auto 8px;
}

.phone-screen {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  border-radius: 24px;
  height: calc(100% - 32px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-screen .ps-header {
  height: 32px;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.phone-screen .ps-header-text {
  width: 60px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

.phone-screen .ps-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.phone-screen .ps-card-title {
  width: 70%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-bottom: 6px;
}

.phone-screen .ps-card-text {
  width: 50%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
}

/* === CALCULATOR === */
.calculator-section {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.calculator-input {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.calculator-input label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}

.calculator-input input[type="range"] {
  width: 300px;
  accent-color: #4F46E5;
}

.calculator-input .car-count {
  font-size: 2rem;
  font-weight: 800;
  color: #4F46E5;
  min-width: 60px;
}

.calculator-result {
  background: linear-gradient(135deg, #EEF2FF, #f0fdf4);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #C7D2FE;
}

.calculator-result .savings {
  font-size: 2.5rem;
  font-weight: 800;
  color: #4F46E5;
  margin-bottom: 8px;
}

.calculator-result p {
  color: #64748b;
  font-size: 1rem;
}

/* === ABOUT PAGE === */
.about-hero {
  padding: 160px 0 80px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  text-align: center;
}

.about-hero h1 {
  color: #ffffff;
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.about-hero p {
  color: #94a3b8;
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.value-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08);
}

.value-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #EEF2FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem;
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.value-card p {
  font-size: 0.9rem;
}

/* === PAGE HEADER (for inner pages) === */
.page-header {
  padding: 160px 0 60px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  text-align: center;
}

.page-header h1 {
  color: #ffffff;
  font-size: 2.8rem;
  margin-bottom: 16px;
}

.page-header p {
  color: #94a3b8;
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2, .section-title { font-size: 2rem; }

  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .steps-grid::before { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.featured { transform: scale(1); }
  .pricing-card.featured:hover { transform: translateY(-8px); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-detail { gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.8rem; }
  h2, .section-title { font-size: 1.5rem; }
  .section { padding: 60px 0; }

  .hero { padding: 100px 0 50px; min-height: auto; }
  .hero h1 { font-size: 1.8rem; line-height: 1.2; }
  .hero .hero-subtitle { font-size: 0.95rem; }
  .hero-label { font-size: 0.7rem; letter-spacing: 2px; }

  /* Mockup: scale down on mobile */
  .mockup-section { padding: 0 0 40px; overflow: hidden; }
  .mockup-wrapper { padding: 0 12px; }
  .mockup-desktop { transform: scale(0.55); transform-origin: top center; margin-bottom: -30%; }
  .mockup-placeholder { overflow: hidden; }

  /* Dashboard inline mockup overflow fix */
  .mockup-section [style*="display:flex"][style*="gap:32px"] { flex-direction: column; align-items: center; }
  .mockup-section [style*="max-width:900px"] { max-width: 100% !important; }
  .mockup-section [style*="width:220px"] { display: none !important; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: #ffffff;
  }

  .nav-cta {
    display: none;
  }

  .nav-links.active ~ .nav-cta,
  .nav-links.active + .nav-cta {
    display: flex;
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
  }

  .benefits-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .comparison-table { grid-template-columns: 1fr; overflow-x: auto; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 100%; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-slide { min-width: calc(100% - 16px); }
  .testimonial-carousel { padding: 0 8px; }
  .testimonial-carousel > button { display: none !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail { grid-template-columns: 1fr; gap: 32px; }
  .feature-detail:nth-child(even) { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .mobile-section { grid-template-columns: 1fr; gap: 32px; }
  .values-grid { grid-template-columns: 1fr; }

  .hero-buttons { flex-direction: column; align-items: center; width: 100%; }
  .hero-buttons .btn { width: 100%; text-align: center; }
  .hero-badges { flex-direction: column; align-items: center; }
  .hero-features { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .hero-feature { font-size: 0.78rem; }
  .lang-switcher { margin-left: 0; }
  .lang-mobile { display: block; margin-left: auto; margin-right: 8px; }
  .nav-cta .lang-switcher { display: none; }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Feature detail mockups scale */
  .feature-detail-mockup { overflow: hidden; }
  .feature-detail-mockup > div { transform: scale(0.7); transform-origin: top center; }

  /* Comparison table mobile */
  .comparison-table > div { min-width: 0; }

  /* CTA section */
  .cta-section h2 { font-size: 1.5rem; }
  .cta-section p { font-size: 0.9rem; }

  /* Calculator */
  .calculator-section { padding: 24px 16px; }

  /* Pricing toggle */
  .pricing-toggle { flex-wrap: wrap; justify-content: center; }

  /* Section subtitle */
  .section-subtitle { font-size: 0.95rem; }

  /* Mobile phone mockup */
  .phone-frame { width: 220px; height: 440px; }

  /* Timeline mobile: single column */
  .timeline-vertical > div:first-child {
    left: 20px !important;
    transform: none !important;
  }
  .timeline-vertical > .fade-in {
    flex-direction: column !important;
    padding-left: 48px;
  }
  .timeline-vertical > .fade-in > div[style*="position: absolute"] {
    left: 0px !important;
    transform: none !important;
    width: 32px !important;
    height: 32px !important;
  }
  .timeline-vertical > .fade-in > div[style*="flex: 1; text-align: right"] {
    text-align: left !important;
    padding-right: 0 !important;
    order: 2;
  }
  .timeline-vertical > .fade-in > div[style*="flex: 1; padding-left"] {
    padding-left: 0 !important;
    order: 1;
    margin-bottom: 8px;
  }

  /* Overflow safety on all sections */
  .section { overflow: hidden; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  h1 { font-size: 1.5rem; }
  h2, .section-title { font-size: 1.3rem; }
  .hero h1 { font-size: 1.5rem; line-height: 1.2; }
  .hero .hero-subtitle { font-size: 0.88rem; }
  .section { padding: 48px 0; overflow: hidden; }
  .stat-number { font-size: 2rem; }
  .pricing-card { padding: 24px 16px; }
  .phone-frame { width: 200px; height: 400px; }
  .mockup-desktop { transform: scale(0.4); margin-bottom: -40%; }
  .feature-detail-mockup > div { transform: scale(0.55); transform-origin: top center; }
  .btn { padding: 12px 20px; font-size: 0.85rem; }
  .hero-badges .badge { font-size: 0.75rem; padding: 6px 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 0.85rem; }
}
