:root {
  /* Colori */
  --color-primary: #2E8B57; /* Sea Green */
  --color-secondary: #8FBC8F; /* Dark Sea Green */
  --color-accent: #6B8E23; /* Olive Drab */
  --color-text-dark: #36454F; /* Charcoal */
  --color-text-light: #F0FFF0; /* Honeydew */
  --color-bg-body: #F0FFF0; /* Honeydew */
  --color-bg-footer: #36454F; /* Charcoal */
  --color-nav-bg: rgba(255, 255, 255, 0.7); /* Semi-transparent white for glassmorphism */
  --color-nav-border: rgba(255, 255, 255, 0.3);

  /* Colori Sezioni Dinamiche */
  --section-bg-1: #F0FFF0; /* Honeydew */
  --section-bg-2: #F5FFFA; /* Mint Cream */
  --section-bg-3: #E0EEE0; /* Light Greenish Grey */
  --section-bg-4: #D0FFD0; /* Light Mint Green */
  --section-bg-5: #A2CD5A; /* Yellow Green */

  /* Tipografia */
  --font-primary: 'Poppins', sans-serif;
  --font-secondary: 'Merriweather', serif;
  --font-size-base: 18px;
  --line-height-base: 1.7;

  /* 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) * 5);   /* 40px */
  --spacing-xl: calc(var(--spacing-unit) * 8);   /* 64px */
  --spacing-xxl: calc(var(--spacing-unit) * 12);  /* 96px */

  /* Effetti Visivi */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px; /* For claymorphism effect */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --shadow-clay-light: inset 5px 5px 10px rgba(255, 255, 255, 0.7), inset -5px -5px 10px rgba(0, 0, 0, 0.1);
  --shadow-clay-dark: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px rgba(255, 255, 255, 0.7);
  --transition-speed: 0.3s;
  --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-dark);
  background-color: var(--color-bg-body);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  color: var(--color-primary);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

h1 {
  font-size: calc(var(--font-size-base) * 2.8);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: calc(var(--font-size-base) * 2.2);
  font-weight: 600;
}

h3 {
  font-size: calc(var(--font-size-base) * 1.8);
  font-weight: 600;
}

h4 {
  font-size: calc(var(--font-size-base) * 1.4);
  font-weight: 500;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-speed) var(--transition-easing);
}

a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

ul, ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-xs);
}

/* Header - Floating with Glassmorphism */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--color-nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-nav-border);
  padding: var(--spacing-sm) var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) var(--transition-easing);
}

.header.scrolled {
  padding: var(--spacing-xs) var(--spacing-md);
  box-shadow: var(--shadow-md);
}

.header .logo {
  font-family: var(--font-secondary);
  font-size: calc(var(--font-size-base) * 1.5);
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.header .logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.header nav ul li {
  margin-left: var(--spacing-lg);
}

.header nav ul li a {
  color: var(--color-text-dark);
  font-weight: 500;
  padding: var(--spacing-xs) 0;
  position: relative;
}

.header nav ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-speed) var(--transition-easing);
}

.header nav ul li a:hover::after,
.header nav ul li a.active::after {
  width: 100%;
}

/* Mobile Navigation Toggle (Hamburger) */
.nav-toggle {
  display: none; /* Hidden by default, shown on mobile */
  background: none;
  border: none;
  font-size: var(--spacing-lg);
  cursor: pointer;
  color: var(--color-primary);
  z-index: 1001;
}

/* Alpine.js specific styles for mobile nav */
.nav-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-body);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(100%);
  transition: transform var(--transition-speed) var(--transition-easing);
  z-index: 999;
}

.nav-mobile-menu.active {
  transform: translateX(0);
}

.nav-mobile-menu ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

.nav-mobile-menu ul li {
  margin-bottom: var(--spacing-lg);
}

.nav-mobile-menu ul li a {
  font-size: calc(var(--font-size-base) * 1.8);
  color: var(--color-text-dark);
  font-weight: 600;
}

@media (max-width: 768px) {
  .header nav {
    display: none; /* Hide desktop nav on mobile */
  }
  .nav-toggle {
    display: block; /* Show hamburger on mobile */
  }
  .header .logo {
    font-size: calc(var(--font-size-base) * 1.2);
  }
}

/* Claymorphism Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--border-radius-lg);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-easing);
  text-decoration: none;
  color: var(--color-text-dark);
  background-color: var(--color-accent);
  box-shadow: var(--shadow-clay-dark); /* Initial 'out' state */
}

.btn:hover {
  background-color: color-mix(in srgb, var(--color-accent) 90%, black);
  box-shadow: var(--shadow-clay-light); /* 'In' state on hover */
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light) !important;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px var(--color-secondary);
}

.btn-primary:hover {
  background-color: color-mix(in srgb, var(--color-primary) 90%, black);
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.2), inset -5px -5px 10px rgba(255, 255, 255, 0.7);
}

/* Claymorphism Cards */
.card {
  background-color: var(--color-bg-body);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-clay-dark);
  transition: all var(--transition-speed) var(--transition-easing);
}

.card:hover {
  box-shadow: var(--shadow-clay-light);
  transform: translateY(-2px);
}

/* Section Backgrounds with text color safety */
.section-bg-1 {
  background-color: var(--section-bg-1);
  color: var(--color-text-dark) !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-dark) !important;
}

.section-bg-2 {
  background-color: var(--section-bg-2);
  color: var(--color-text-dark) !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-dark) !important;
}

.section-bg-3 {
  background-color: var(--section-bg-3);
  color: var(--color-text-dark) !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-dark) !important;
}

.section-bg-4 {
  background-color: var(--section-bg-4);
  color: var(--color-text-dark) !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-dark) !important;
}

.section-bg-5 {
  background-color: var(--section-bg-5);
  color: var(--color-text-dark) !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-dark) !important;
}

/* Footer */
.footer {
  background-color: var(--color-bg-footer);
  color: var(--color-text-light);
  padding: var(--spacing-xl) var(--spacing-lg);
  font-size: calc(var(--font-size-base) * 0.9);
}

.footer h3 {
  color: var(--color-secondary);
  margin-bottom: var(--spacing-md);
  font-size: calc(var(--font-size-base) * 1.1);
}

.footer a {
  color: var(--color-text-light);
  transition: color var(--transition-speed) var(--transition-easing);
}

.footer a:hover {
  color: var(--color-accent);
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer ul li {
  margin-bottom: var(--spacing-xs);
}

.footer .grid-cols-3 { /* Assuming Tailwind grid classes */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--spacing-xl);
  height: var(--spacing-xl);
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  margin-right: var(--spacing-sm);
  transition: background-color var(--transition-speed) var(--transition-easing);
}

.footer .social-icons a:hover {
  background-color: var(--color-accent);
}

@media (max-width: 768px) {
  .footer .grid-cols-3 {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer .social-icons {
    justify-content: center;
    margin-top: var(--spacing-md);
  }
}

/* Utility classes for animations (example, for Alpine.js x-transition) */
.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(20px);
}

/* Parallax Effect Hint (requires JS for actual parallax, but this sets up context) */
.parallax-container {
  overflow: hidden;
  position: relative;
}

.parallax-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%; /* Make it taller to allow for movement */
  background-size: cover;
  background-position: center;
  will-change: transform; /* Optimize for animation */
}

/* Custom Scrollbar for a more natural feel */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-body);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}


/* 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;
    }
}