/* ===== VARIABILI CSS ===== */
:root {
  /* Colori principali */
  --primary-color: #6200ea;
  --primary-dark: #5000b8;
  --text-color: #212529;
  --text-secondary: #6c757d;
  --background: #f8f9fa;
  --surface: #ffffff;
  --border: #dee2e6;
  --shadow: rgba(0, 0, 0, 0.1);

  /* Spaziature */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;

  /* Bordi */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

  /* Transizioni */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.4s ease;
}

/* ===== RESET E STILI BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text-color);
  line-height: 1.6;
  padding: var(--space-xl);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== LAYOUT PRINCIPALE ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* === HEADER === */
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
  position: relative;
}

.logo img {
  height: 90px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: var(--space-sm) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-medium);
}

.nav-link:hover::after {
  width: 80%;
}

/* Bottone menu mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 101;
}

.menu-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text-color);
  margin: 3px 0;
  transition: var(--transition-medium);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== CONTENUTO PRINCIPALE ===== */
.main-title {
  text-align: center;
  font-size: 2.8rem;
  color: var(--primary-color);
  margin: var(--space-xxl) 0 var(--space-xl);
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  padding-bottom: var(--space-md);
}

.main-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.card {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px var(--shadow);
  border: 1px solid var(--border);
  margin: var(--space-xl) 0;
  transition: all var(--transition-slow);
}

.card h2 {
  margin: 0 0 var(--space-md) 0;
  font-size: 2.8rem;
  color: var(--primary-color);
  line-height: 1.3;
}

.category {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: var(--space-sm) 0;
  text-align: left;
}

.definition, .example {
  position: relative;
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  line-height: 1.7;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-medium);
  overflow: hidden;
}

.definition::before, .example::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-color), #9c27b0);
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.definition strong, .example strong {
  color: var(--primary-dark);
  font-weight: 600;
  position: relative;
  padding-right: var(--space-xs);
}

.definition:hover, .example:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.definition {
  border-left: 2px solid rgba(98, 0, 234, 0.1);
}

.example {
  font-style: italic;
  border-left: 2px solid rgba(156, 39, 176, 0.1);
  background: rgba(249, 245, 255, 0.6);
}

.example:hover {
  background: rgba(249, 245, 255, 0.8);
}

.example em {
  font-style: normal;
  color: #7e57c2;
  position: relative;
}


.text-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
  line-height: 1.8;
}

.text-columns h3 {
  color: var(--primary-color);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  font-size: 1.3rem;
}

.text-columns ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}

.text-columns li {
  margin: var(--space-sm) 0;
}

/* ===== BOTTONI ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: 50px;
  font-weight: 500;
  margin: var(--space-md) 0;
  box-shadow: 0 4px 8px rgba(98, 0, 234, 0.3);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: transform var(--transition-fast);
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}
.faq-section {
  margin: 2.5rem 0;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(98, 0, 234, 0.08);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 1.4rem 1.2rem;
  transition: all 0.3s ease;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item:hover {
  background-color: #f9f7ff;
  transform: translateX(5px);
}

.faq-item h4 {
  color: #2d2d2d;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.3;
}

.faq-item h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: #6200ea;
  border-radius: 50%;
}

.faq-item h4::after {
  content: "+";
  position: absolute;
  right: 0;
  color: #959595;
  font-weight: bold;
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.faq-item:hover h4 {
  color: #6200ea;
}

.faq-item p {
  color: #5a5a5a;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0;
  padding-left: 1.2rem;
  transition: color 0.2s ease;
}

/* Stile per quando le FAQ sono espandibili con JS */
.faq-item.active h4::after {
  content: "−";
  transform: rotate(180deg);
  color: #6200ea;
}

.faq-item.active + .faq-item {
  border-top: 1px solid #f0f0f0;
}

/* Media query per dispositivi mobili */
@media (max-width: 768px) {
  .faq-section {
    margin: 2rem 0;
    border-radius: 10px;
  }
  
  .faq-item {
    padding: 1.2rem 1rem;
  }
  
  .faq-item h4 {
    font-size: 1.15rem;
    padding-left: 1rem;
  }
  
  .faq-item h4::before {
    width: 8px;
    height: 8px;
  }
  
  .faq-item h4::after {
    font-size: 1.2rem;
  }
  
  .faq-item p {
    font-size: 1rem;
    padding-left: 1rem;
  }
}

/* Per schermi extra large */
@media (min-width: 1200px) {
  .faq-section {
    margin: 3rem 0;
  }
  
  .faq-item {
    padding: 1.5rem 1.5rem;
  }
  
  .faq-item h4 {
    font-size: 1.3rem;
  }
}

/* ===== SEZIONE DI CONDIVISIONE ===== */
.share-group {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 12px var(--shadow);
  border: 1px solid var(--border);
  margin: var(--space-xl) 0;
  text-align: center;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.share-group:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.share-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #9c27b0);
  opacity: 0.8;
}

.share-group p {
  margin: 0 0 var(--space-md) 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

.share-group p em {
  font-style: italic;
  color: var(--primary-color);
  font-weight: 500;
}

.share-links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  position: relative;
  z-index: 2;
}

.share-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--background);
  color: #c1a8e3;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 3px 8px rgba(98, 0, 234, 0.3);
}

.share-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(98, 0, 234, 0.4);
}

.share-links a:active {
  transform: translateY(1px);
}

/* Icone per piattaforme social (opzionali) */
.share-links a[href*="linkedin"]::before {
  content: '👔';
  font-size: 1.2rem;
}

.share-links a[href*="facebook"]::before {
  content: '📘';
  font-size: 1.2rem;
}

.share-links a[href*="whatsapp"]::before {
  content: '💬';
  font-size: 1.2rem;
}

.share-links a[href*="twitter"]::before {
  content: '🐦';
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .share-group {
    padding: var(--space-md);
  }
  
  .share-links {
    gap: var(--space-sm);
  }
  
  .share-links a {
    padding: 8px 16px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .share-links {
    flex-direction: column;
    align-items: center;
  }
  
  .share-links a {
    width: 100%;
    max-width: 220px;
    justify-content: center;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .main-title {
    font-size: 2.4rem;
  }

  .card h2 {
    font-size: 2.2rem;
  }

  .main-nav {
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--surface);
    padding: var(--space-xl);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow-y: auto;
  }

  .main-nav.active {
    display: flex;
  }

  .header-main {
    padding: var(--space-md);
  }

  .logo img {
    height: 70px;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .main-title {
    font-size: 2rem;
    /* Rimuovi width fissa */
  }

  .text-columns {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .btn {
    width: 100%;
  }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  margin-top: var(--space-xxl);
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

/* ===== ACCESSIBILITÀ ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}