/* Reset e variabili CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --text-color: #333;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* Typography */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation - Versione bilanciata */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem; /* Via di mezzo: 0.8rem invece di 1rem o 0.5rem */
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
}

.logo-img {
  height: 42px; /* Via di mezzo: 42px invece di 50px o 35px */
  width: auto;
  margin-right: 0.9rem; /* Via di mezzo */
  border-radius: 7px;
}

.logo-text {
  font-size: 1.3rem; /* Via di mezzo: 1.3rem invece di 1.5rem o 1.2rem */
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-left: 1.7rem; /* Via di mezzo: 1.7rem invece di 2rem o 1.5rem */
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.95rem; /* Leggermente ridotto ma non troppo */
  transition: var(--transition);
  padding: 0.4rem 0; /* Via di mezzo: 0.4rem */
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.4rem; /* Via di mezzo */
}

.hamburger .bar {
  width: 23px; /* Via di mezzo */
  height: 2.5px; /* Via di mezzo */
  background: var(--primary-color);
  margin: 2.5px 0; /* Via di mezzo */
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg); /* Aggiustato per le nuove dimensioni */
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg); /* Aggiustato per le nuove dimensioni */
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  padding: 105px 0 80px; /* Via di mezzo: 105px invece di 120px o 90px */
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="20" fill="url(%23pattern)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.3s;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.6s;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta-buttons {
  opacity: 0;
  animation: fadeInUp 1s ease forwards 0.9s;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  margin-right: 1rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
}

.btn-white {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-3px);
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  padding: 105px 0 60px; /* Via di mezzo */
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="20" fill="url(%23pattern)"/></svg>');
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.3rem;
  opacity: 0.9;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-light {
  background: var(--white);
}

.section-dark {
  background: var(--bg-light);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--white);
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Statistics */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.about-features {
  list-style: none;
  padding: 0;
}

.about-features li {
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1.1rem;
  position: relative;
  padding-left: 2rem;
}

.about-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.about-image {
  text-align: center;
}

.about-image img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: var(--white);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-section p {
  color: #bdc3c7;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.8rem;
  color: #bdc3c7;
}

.contact-info a {
  color: var(--accent-color);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #34495e;
  color: #bdc3c7;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ripple Effect */
.btn-primary, .btn-secondary, .btn-white {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Responsive Design - aggiornato */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.8rem; /* Mantenuto bilanciato anche su mobile */
  }

  .logo-text {
    font-size: 1.1rem; /* Via di mezzo su mobile */
  }

  .logo-img {
    height: 35px; /* Via di mezzo su mobile */
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 62px; /* Via di mezzo: 62px */
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    height: calc(100vh - 62px); /* Aggiornato */
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0;
  }

  .nav-item {
    margin: 0.5rem 0;
  }

  .nav-link {
    display: block;
    padding: 1rem;
    font-size: 1.05rem; /* Leggermente più grande su mobile */
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
  }

  .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
  }

  .hamburger {
    display: flex;
  }

  /* Previene lo scroll della pagina quando il menu è aperto */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  /* Hero Mobile */
  .hero {
    padding: 85px 0 60px; /* Via di mezzo su mobile */
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .page-header {
    padding: 85px 0 40px; /* Via di mezzo su mobile */
  }

  .page-header h1 {
    font-size: 2.2rem;
  }

  /* Buttons Mobile */
  .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    padding: 1.2rem;
  }

  .btn-primary {
    margin-right: 0;
  }

  /* Sections Mobile */
  section {
    padding: 60px 0;
  }

  /* About Mobile */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Grid Mobile */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Contact Form Mobile */
  .contact-form {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }

  /* Typography Mobile */
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.5rem; }

  .container {
    padding: 0 1.5rem;
  }

  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-home {
    padding: 85px 0 60px; /* Via di mezzo su mobile */
    min-height: calc(100vh - 62px); /* Aggiornato */
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }
Parlai
  .contact-form {
    padding: 1.5rem 1rem;
  }

  .hero-home {
    padding: 80px 0 50px;
  }

  .hero-content-center {
    padding: 0 0.5rem;
  }

  .main-logo {
    max-width: 120px;
  }

  .hero-home h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .service-item {
    padding: 1rem;
    font-size: 0.95rem;
  }
}

/* Scrollbar personalizzata per il menu mobile */
@media (max-width: 768px) {
  .nav-menu::-webkit-scrollbar {
    width: 4px;
  }

  .nav-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  .nav-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
  }

  .nav-menu::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
  }
}

/* Hero Home Specifico */
.hero-home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 105px 0 80px; /* Via di mezzo */
}

.hero-content-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-logo {
  margin-bottom: 2rem;
}

.main-logo {
  max-width: 200px;
  height: auto;
  border-radius: 15px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  display: block;
}

.hero-home h1 {
  font-size: 3.5rem;
  margin-bottom: 3rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.service-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.service-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-hover);
}

/* Responsive per Hero Home */
@media (max-width: 768px) {
  .hero-home {
    padding: 85px 0 60px; /* Via di mezzo su mobile */
    min-height: calc(100vh - 62px); /* Aggiornato */
  }

  .hero-content-center {
    padding: 0 1rem;
  }

  .main-logo {
    max-width: 150px;
  }

  .hero-home h1 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    line-height: 1.3;
  }

  .services-list {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 100%;
  }

  .service-item {
    padding: 1.2rem;
    font-size: 1rem;
  }

  .hero-logo {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-home {
    padding: 80px 0 50px;
  }

  .hero-content-center {
    padding: 0 0.5rem;
  }

  .main-logo {
    max-width: 120px;
  }

  .hero-home h1 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .service-item {
    padding: 1rem;
    font-size: 0.95rem;
  }
}
