/* RESET & BASE */
:root {
  --primary: #dc2626;       /* Rosso (Endlessite) */
  --primary-hover: #b91c1c;
  --dark: #0f172a;          /* Slate per testi scuri */
  --light: #f8fafc;         /* Sfondo chiaro morbido */
  --gray: #64748b;          /* Testi secondari */
  --border: #e2e8f0;
  --success: #25D366;      /* Verde Successo */
  --success-hover: #128C7E;
  --white: #ffffff;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--white);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TYPOGRAPHY */
h1, h2, h3 {
  color: var(--dark);
  line-height: 1.2;
  font-weight: 800;
}

p {
  color: var(--gray);
  margin-bottom: 1rem;
}

.text-primary {
  color: var(--primary);
}

.highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.highlight::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(37, 99, 235, 0.2);
  z-index: -1;
}

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

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--dark);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--dark);
  background-color: var(--light);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

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

/* UTILITIES */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.rounded-image { border-radius: 12px; max-width: 100%; height: auto; }
.section-bg { background-color: var(--light); }
.badge { display: inline-block; padding: 6px 12px; background-color: var(--light); color: var(--primary); border-radius: 20px; font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; border: 1px solid var(--border); }
.badge-dark { background-color: var(--dark); color: var(--white); border: none;}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: 70px;
  display: flex;
  align-items: center;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  height: 30px;
  width: auto;
}
.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* HERO SECTION */
.hero {
  padding: 150px 0 80px 0;
  background: linear-gradient(to bottom, #ffffff 0%, var(--light) 100%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-content .subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--gray);
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.hero-trust {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
}
.hero-trust i { color: var(--success); margin-right: 5px; }

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

.section-title {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

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

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* FEATURE CARDS */
.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: var(--light);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.text-center .feature-icon {
  margin-left: auto;
  margin-right: auto;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

/* TARGET CARDS */
.target-card {
  border: none;
  background: transparent;
  box-shadow: none;
}
.target-card:hover {
  box-shadow: none;
}
.target-card .feature-icon {
  background-color: var(--primary);
  color: var(--white);
}

/* SERVICE CARDS */
.service-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.service-card h4 {
  font-size: 1.15rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-card h4 i {
  font-size: 1.5rem;
}
.service-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.faq-item:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.faq-item h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-item p {
  margin-bottom: 0;
}

/* FINAL CTA */
.final-cta {
  padding: 100px 20px;
  background-color: var(--primary);
  color: var(--white);
}
.final-cta-container {
  max-width: 800px;
  margin: 0 auto;
}
.final-cta h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--white);
}
.final-cta p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--light);
}
.final-cta .btn-primary {
  background-color: var(--white);
  color: var(--primary);
}
.final-cta .btn-primary:hover {
  background-color: var(--light);
}

/* PORTFOLIO / CASE STUDY */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.check-list {
  list-style: none;
  margin: 20px 0;
}

.check-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  font-weight: 500;
}

.quote {
  font-style: italic;
  padding-left: 15px;
  border-left: 4px solid var(--primary);
  margin-top: 20px;
  color: var(--gray);
}

/* PRICING */
.pricing-card {
  max-width: 450px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.pricing-header {
  background-color: var(--dark);
  color: var(--white);
  padding: 40px 30px;
  text-align: center;
}

.pricing-header h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.price {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
}
.currency { font-size: 2rem; vertical-align: top; margin-right: 5px;}
.period { font-size: 1.2rem; font-weight: 500; color: #94a3b8; }

.cost-creation {
  color: var(--success);
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.pricing-body {
  padding: 40px 30px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 30px;
}

.pricing-features li {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--dark);
}

.pricing-features i {
  color: var(--success);
  margin-top: 4px;
}

.guarantee {
  text-align: center;
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 0;
}

/* FOOTER */
.footer {
  background-color: var(--dark);
  color: var(--light);
  padding: 60px 0 20px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 40px;
  margin-bottom: 20px;
}

.footer-brand h3 {
  color: var(--white);
  margin-bottom: 10px;
}
.footer-brand span { color: var(--primary); }

.footer-contact p {
  color: #94a3b8;
  margin-bottom: 5px;
}

.footer-bottom {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.login-link {
  color: #64748b;
  text-decoration: none;
  font-size: 0.8rem;
  margin-top: 10px;
  display: inline-block;
}

/* RESPONSIVE */
.d-none-mobile { display: inline-flex; }
.d-block-mobile { display: none; }

@media (max-width: 992px) {
  .hero-container, .case-study {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content h1 { font-size: 2.8rem; }
  .hero-buttons { justify-content: center; flex-direction: column; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .case-study-image { order: -1; }
}

@media (max-width: 768px) {
  .d-none-mobile { display: none !important; }
  .d-block-mobile { display: block; }
  
  .nav-links {
    display: none; /* Gestito via JS */
  }

  .grid-3 { grid-template-columns: 1fr; }
  
  .hero { padding: 120px 0 60px 0; }
  .hero-content h1 { font-size: 2.2rem; }
  
  .section-title h2 { font-size: 2rem; }
  
  .footer-container { flex-direction: column; gap: 30px; text-align: center; }
}