:root {
  /* Colori */
  --color-primary: #1E3A8A;
  --color-secondary: #EC4899;
  --color-accent: #1D4ED8;
  --color-text: #1F2937; /* Scuro per contrasto su sfondo chiaro */
  --color-bg: #F0F9FF;
  --color-footer-bg: #0F172A;
  --color-footer-text: #E0E7FF; /* Chiaro per contrasto su sfondo scuro */

  --section-bg-1: #F0F9FF;
  --section-bg-2: #FEF3C7;
  --section-bg-3: #D1FAE5;
  --section-bg-4: #DBEAFE;
  --section-bg-5: #FCE7F3;
  --section-bg-6: #E0F2F7;

  /* Tipografia */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', sans-serif;
  --font-size-base: 18px; /* Leggermente più grande per leggibilità */

  /* Spaziatura */
  --spacing-unit: 8px;
  --spacing-xs: calc(var(--spacing-unit) * 1); /* 8px */
  --spacing-sm: calc(var(--spacing-unit) * 2); /* 16px */
  --spacing-md: calc(var(--spacing-unit) * 3); /* 24px */
  --spacing-lg: calc(var(--spacing-unit) * 4); /* 32px */
  --spacing-xl: calc(var(--spacing-unit) * 6); /* 48px */
  --spacing-2xl: calc(var(--spacing-unit) * 8); /* 64px */
  --spacing-3xl: calc(var(--spacing-unit) * 12); /* 96px */

  /* Effetti Visivi */
  --border-radius: 12px; /* rounded-xl */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* from tailwind shadow-xl */
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* from tailwind shadow-2xl */
  --transition-speed: 0.3s;
  --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: rgba(0, 0, 0, 0.1);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.025em;
}

h1 {
  font-size: calc(var(--font-size-base) * 2.8); /* ~50px */
  font-weight: 800;
}

h2 {
  font-size: calc(var(--font-size-base) * 2.2); /* ~40px */
  font-weight: 700;
}

h3 {
  font-size: calc(var(--font-size-base) * 1.8); /* ~32px */
  font-weight: 600;
}

h4 {
  font-size: calc(var(--font-size-base) * 1.4); /* ~25px */
  font-weight: 600;
}

h5 {
  font-size: calc(var(--font-size-base) * 1.2); /* ~21px */
  font-weight: 500;
}

h6 {
  font-size: var(--font-size-base);
  font-weight: 500;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-easing);
}

a:hover {
  color: var(--color-secondary);
}

ul, ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-xs);
}

strong {
  font-weight: 700;
}

/* Section Backgrounds */
.section-bg-1 {
  background-color: var(--section-bg-1);
  color: var(--color-text) !important;
}
.section-bg-1 h1, .section-bg-1 h2, .section-bg-1 h3, .section-bg-1 h4, .section-bg-1 h5, .section-bg-1 h6,
.section-bg-1 p, .section-bg-1 span, .section-bg-1 div, .section-bg-1 a {
  color: var(--color-text) !important;
}

.section-bg-2 {
  background-color: var(--section-bg-2);
  color: var(--color-text) !important;
}
.section-bg-2 h1, .section-bg-2 h2, .section-bg-2 h3, .section-bg-2 h4, .section-bg-2 h5, .section-bg-2 h6,
.section-bg-2 p, .section-bg-2 span, .section-bg-2 div, .section-bg-2 a {
  color: var(--color-text) !important;
}

.section-bg-3 {
  background-color: var(--section-bg-3);
  color: var(--color-text) !important;
}
.section-bg-3 h1, .section-bg-3 h2, .section-bg-3 h3, .section-bg-3 h4, .section-bg-3 h5, .section-bg-3 h6,
.section-bg-3 p, .section-bg-3 span, .section-bg-3 div, .section-bg-3 a {
  color: var(--color-text) !important;
}

.section-bg-4 {
  background-color: var(--section-bg-4);
  color: var(--color-text) !important;
}
.section-bg-4 h1, .section-bg-4 h2, .section-bg-4 h3, .section-bg-4 h4, .section-bg-4 h5, .section-bg-4 h6,
.section-bg-4 p, .section-bg-4 span, .section-bg-4 div, .section-bg-4 a {
  color: var(--color-text) !important;
}

.section-bg-5 {
  background-color: var(--section-bg-5);
  color: var(--color-text) !important;
}
.section-bg-5 h1, .section-bg-5 h2, .section-bg-5 h3, .section-bg-5 h4, .section-bg-5 h5, .section-bg-5 h6,
.section-bg-5 p, .section-bg-5 span, .section-bg-5 div, .section-bg-5 a {
  color: var(--color-text) !important;
}

.section-bg-6 {
  background-color: var(--section-bg-6);
  color: var(--color-text) !important;
}
.section-bg-6 h1, .section-bg-6 h2, .section-bg-6 h3, .section-bg-6 h4, .section-bg-6 h5, .section-bg-6 h6,
.section-bg-6 p, .section-bg-6 span, .section-bg-6 div, .section-bg-6 a {
  color: var(--color-text) !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  border: none;
  transition: all var(--transition-speed) var(--transition-easing);
  box-shadow: var(--shadow-xl); /* Base shadow */
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary);
  box-shadow: var(--shadow-2xl); /* Larger shadow on hover */
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #D6277D; /* Slightly darker secondary */
  box-shadow: var(--shadow-2xl);
  transform: translateY(-2px);
}

.btn-glass {
  background-color: var(--glass-bg);
  color: var(--color-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px var(--glass-shadow);
}

.btn-glass:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 8px var(--glass-shadow);
  transform: translateY(-1px);
}


/* Cards - Glassmorphism */
.card {
  background-color: var(--glass-bg); /* bg-white/30 */
  backdrop-filter: blur(12px); /* backdrop-blur-md */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); /* border border-white/40 */
  border-radius: var(--border-radius); /* rounded-xl */
  padding: var(--spacing-xl); /* p-6 */
  box-shadow: var(--shadow-xl); /* shadow-lg */
  transition: all var(--transition-speed) var(--transition-easing);
}

.card:hover {
  box-shadow: var(--shadow-2xl); /* hover:shadow-2xl */
  transform: translateY(-3px);
}

/* Forms */
.input, .textarea, .select {
  display: block;
  width: 100%;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  border: 1px solid #D1D5DB; /* light gray */
  border-radius: var(--spacing-xs);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: white;
  transition: border-color var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
}

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2); /* focus ring */
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--color-primary);
}

/* Navigation - basic structure */
nav {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

nav .nav-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-primary);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--spacing-xs);
  transition: background-color var(--transition-speed) var(--transition-easing), color var(--transition-speed) var(--transition-easing);
}

nav .nav-links a:hover {
  background-color: rgba(var(--color-primary), 0.05);
  color: var(--color-accent);
}

/* Footer */
footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
  font-size: calc(var(--font-size-base) * 0.9);
}

footer a {
  color: var(--color-secondary);
}

footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Utility Classes for Alpine.js */
.fade-enter-active, .fade-leave-active {
  transition: opacity var(--transition-speed) var(--transition-easing);
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active, .slide-up-leave-active {
  transition: all var(--transition-speed) var(--transition-easing);
}
.slide-up-enter, .slide-up-leave-to {
  opacity: 0;
  transform: translateY(var(--spacing-md));
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: calc(var(--font-size-base) * 2.2);
  }
  h2 {
    font-size: calc(var(--font-size-base) * 1.8);
  }
  body {
    font-size: 16px;
  }
  nav .nav-links {
    flex-direction: column;
    gap: var(--spacing-sm);
    display: none; /* Hidden by default, Alpine.js will toggle */
  }
  nav .nav-links.hidden {
    display: none !important;
  }
  nav .nav-links.flex-col {
    display: flex !important; /* To be toggled by Alpine.js */
  }
}

@media (min-width: 768px) {
  nav .nav-links.hidden {
    display: flex !important; /* Ensure nav links are visible on desktop */
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: calc(var(--font-size-base) * 3.5);
  }
}


/* Cookie Banner Additional Styles for Tailwind */
.cookie-banner-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner-hover-effect:hover {
        transform: none;
    }
}