/* Base Variables and Reset */
:root {
  /* Primary Colors - Complementary Scheme */
  --primary-color: #3a86ff;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #ff9e3a;
  --secondary-dark: #e67e22;
  --secondary-light: #fdb461;
  
  /* Neutral Colors */
  --neutral-100: #f8fafc;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  
  /* Eco-Minimal Colors */
  --eco-green: #4ade80;
  --eco-green-dark: #22c55e;
  --eco-beige: #f5f5dc;
  --eco-brown: #8b7355;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #f8fafc;
  --text-dark: #0f172a;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: rgba(0, 0, 0, 0.1);
  --glass-blur: 10px;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  --gradient-overlay: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index layers */
  --z-header: 100;
  --z-modal: 1000;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--neutral-100);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

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

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Glassmorphism Style */
.glassmorphism {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px 0 var(--glass-shadow);
  background-color: #94a3b8 !important;
}

/* Eco-Minimal Style */
.eco-minimal {
  background-color: var(--neutral-100);
  color: var(--text-primary);
}

/* Section Styles */
section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-medium);
  border: none;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.primary-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  color: white;
}

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

.secondary-btn:hover {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary-color));
  color: white;
}

/* Buttons global styles for form elements */
button, 
input[type='submit'] {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-medium);
  border: none;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--gradient-primary);
  color: white;
}

button:hover,
input[type='submit']:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Card Styles */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  height: 100%;
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

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

.card-content {
  padding: var(--spacing-md);
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-header);
  padding: var(--spacing-sm) 0;
  transition: background-color var(--transition-medium);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo h1 {
  color: var(--text-light);
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.desktop-menu ul {
  display: flex;
  gap: var(--spacing-md);
}

.desktop-menu a {
  color: var(--text-light);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.desktop-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width var(--transition-medium);
}

.desktop-menu a:hover::after {
  width: 100%;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.burger-menu span {
  width: 30px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 10px;
  transition: all var(--transition-medium);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--gradient-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.mobile-menu a {
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  min-height: 100vh;
  padding: var(--spacing-2xl) 0;
  color: var(--text-light);
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

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

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

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: var(--spacing-sm);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

/* Workshop Section */
.workshop {
  position: relative;
  padding: var(--spacing-2xl) 0;
}

.custom-slider {
  position: relative;
  margin-top: var(--spacing-xl);
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform var(--transition-medium);
}

.slide {
  flex: 0 0 100%;
  padding: var(--spacing-md);
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--spacing-md);
}

.prev-slide,
.next-slide {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
  margin: 0 var(--spacing-sm);
  transition: color var(--transition-fast);
}

.prev-slide:hover,
.next-slide:hover {
  color: var(--primary-dark);
}

.slider-dots {
  display: flex;
  gap: var(--spacing-xs);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--neutral-300);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.dot.active {
  background-color: var(--primary-color);
}

/* Webinar Section */
.webinar {
  background: var(--gradient-primary);
  color: var(--text-light);
  position: relative;
}

.webinar .section-title,
.webinar .section-description {
  color: var(--text-light);
}

.webinar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

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

.webinar-date {
  font-weight: 500;
  margin-top: auto;
  margin-bottom: var(--spacing-sm);
  color: var(--secondary-color);
}

/* Risorse Esterne Section */
.risorse {
  padding: var(--spacing-2xl) 0;
  margin: var(--spacing-2xl) 0;
}

.risorse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.risorsa-card {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.risorsa-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.risorsa-card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

/* Storie Cliente Section */
.storie {
  padding: var(--spacing-2xl) 0;
}

.testimonial {
  color: var(--text-primary);
  font-style: italic;
  margin-top: var(--spacing-sm);
}

.job-title {
  color: var(--primary-color);
  font-weight: 500;
}

.rating {
  color: var(--secondary-color);
  font-size: 1.25rem;
  margin: var(--spacing-xs) 0;
}

/* Eventi Section */
.eventi {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-light);
  position: relative;
}

.eventi .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

.eventi .container {
  position: relative;
  z-index: 2;
}

.eventi .section-title,
.eventi .section-description {
  color: var(--text-light);
}

.eventi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.evento-data {
  color: var(--secondary-light);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

/* Community Section */
.community {
  padding: var(--spacing-2xl) 0;
}

.community-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

.feature {
  height: 100%;
}

.community-cta {
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

.community-cta h3 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.community-cta p {
  margin-bottom: var(--spacing-md);
  font-size: 1.1rem;
}

/* Contatti Section */
.contatti {
  padding: var(--spacing-2xl) 0;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.contact-info {
  padding: var(--spacing-lg);
}

.contact-info h3 {
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.contact-info ul {
  margin-bottom: var(--spacing-lg);
}

.contact-info li {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.icon {
  margin-right: var(--spacing-sm);
  font-size: 1.25rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.social-links a {
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-medium);
}

.social-links a:hover::after {
  width: 100%;
}

.contact-form {
  padding: var(--spacing-lg);
}

.contact-form h3 {
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-family: 'Rubik', sans-serif;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.1);
}

.checkbox {
  display: flex;
  align-items: center;
}

.checkbox label {
  margin-left: var(--spacing-sm);
  margin-bottom: 0;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 24px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--neutral-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.toggle-label:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

.toggle-input:checked + .toggle-label {
  background-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label:before {
  transform: translateX(26px);
}

/* Footer Styles */
footer {
  background: var(--gradient-primary);
  color: var(--text-light);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-logo h2 {
  color: var(--text-light);
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.footer-logo p {
  color: var(--neutral-200);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-lg);
}

.footer-column h3 {
  color: var(--text-light);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-column a {
  color: var(--neutral-200);
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--secondary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neutral-300);
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s, transform 0.8s;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax Effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Success Page */
.success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: var(--spacing-xl);
  background: var(--gradient-primary);
  color: var(--text-light);
}

.success-page h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

.success-page p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
}

/* Privacy and Terms Pages */
.content-page {
  padding-top: 100px;
  padding-bottom: var(--spacing-2xl);
}

.content-page .container {
  max-width: 800px;
}

.content-page h1 {
  margin-bottom: var(--spacing-lg);
}

.content-page h2 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  font-size: 1.75rem;
}

.content-page p {
  margin-bottom: var(--spacing-md);
}

.content-page ul {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
  list-style-type: disc;
}

.content-page li {
  margin-bottom: var(--spacing-xs);
}

/* Media Queries */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-logo {
    text-align: center;
    margin-bottom: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content h2 {
    font-size: 1.75rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .eventi-grid, 
  .webinar-grid, 
  .community-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-content h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* Additional Animations */
@keyframes morph {
  0% {
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40%/50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
  }
}

.morph-animation {
  animation: morph 8s ease-in-out infinite;
}

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

.fade-in {
  animation: fadeIn 1s ease-in-out forwards;
}

/* JavaScript Helpers */
.active {
  display: block;
}

.hidden {
  display: none;
}