:root {
  /* Colori */
  --color-primary: #2B5F43;
  --color-secondary: #A7D9A0;
  --color-accent: #E0A84D;
  --color-text-dark: #1F422E;
  --color-text-light: #F8F5F1;
  --color-bg: #F8F5F1;
  --color-footer-bg: #1F422E;

  --section-bg-1: #F8F5F1;
  --section-bg-2: #FFFFFF;
  --section-bg-3: #E8F5E9;
  --section-bg-4: #FFE0B2;
  --section-bg-5: #F0F4C3;

  /* Tipografia */
  --font-primary: 'Inter', sans-serif;
  --font-size-base: 18px;
  --line-height-base: 1.7;
  --heading-line-height: 1.2;

  /* 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-2xl: calc(var(--spacing-unit) * 12); /* 96px */

  /* Effetti visivi */
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 9999px; /* Pill shape */
  
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.15);

  --transition-speed: 0.35s;
  --transition-easing: cubic-bezier(0.25, 0.8, 0.25, 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);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-primary);
  line-height: var(--heading-line-height);
  font-weight: 700;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.1rem; }

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-dark);
}

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-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-xs);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utilità di spaziatura e layout */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

.section-padding {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

/* Sfondi delle sezioni */
.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;
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-lg); /* Pill shape */
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-speed) var(--transition-easing);
  box-shadow: var(--shadow-subtle);
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: #f0b964; /* Lighter accent */
  border-color: #f0b964;
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: #3a7a53; /* Darker primary */
  border-color: #3a7a53;
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-md);
}

/* Card */
.card {
  background-color: white;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--color-text-dark);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid #ccc;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--color-text-dark);
  background-color: white;
  transition: border-color var(--transition-speed) var(--transition-easing), box-shadow var(--transition-speed) var(--transition-easing);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.2);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Header & Navigation */
.header {
  background-color: var(--color-bg);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--spacing-lg);
}

.nav-item a {
  font-weight: 500;
  padding: var(--spacing-xs) 0;
  position: relative;
  color: var(--color-text-dark);
}

.nav-item a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-speed) var(--transition-easing);
}

.nav-item a:hover::after,
.nav-item a.active::after {
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-text-light);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.footer p {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}

.footer a {
  color: var(--color-secondary);
  font-weight: 500;
}

.footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Alpine.js specific styles */
[x-cloak] {
  display: none !important;
}

/* Transitions for Alpine.js x-show/x-transition */
[x-transition:enter] {
  transition: opacity var(--transition-speed) var(--transition-easing), transform var(--transition-speed) var(--transition-easing);
}
[x-transition:enter-start] {
  opacity: 0;
  transform: translateY(10px);
}
[x-transition:enter-end] {
  opacity: 1;
  transform: translateY(0);
}
[x-transition:leave] {
  transition: opacity var(--transition-speed) var(--transition-easing), transform var(--transition-speed) var(--transition-easing);
}
[x-transition:leave-start] {
  opacity: 1;
  transform: translateY(0);
}
[x-transition:leave-end] {
  opacity: 0;
  transform: translateY(10px);
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.4rem; }
  h3 { font-size: 1.9rem; }
  .nav-menu {
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }
  body {
    font-size: 16px;
  }
  .section-padding {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
  }
  .header {
    padding: var(--spacing-sm) 0;
  }
  .nav-menu {
    flex-direction: column;
    gap: var(--spacing-sm);
    display: none; /* Hidden by default, Alpine.js will toggle */
    background-color: var(--color-bg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-subtle);
  }
  .nav-menu.hidden {
    display: none !important; /* Ensure it's hidden when x-show is false */
  }
  .nav-menu.flex {
    display: flex !important; /* Ensure it's flex when x-show is true */
  }
  .nav-item a {
    padding: var(--spacing-sm) 0;
    display: block;
  }
  .btn {
    width: 100%;
    margin-bottom: var(--spacing-sm);
  }
}

@media (min-width: 768px) {
  nav.hidden {
    display: flex !important;
  }
}

/* Specific styles for friendly and organic feel */
.content-block {
  padding: var(--spacing-xl);
  background-color: var(--section-bg-2);
  border-radius: 30% 70% 70% 30% / 40% 40% 60% 60%; /* Organic shape */
  box-shadow: var(--shadow-subtle);
  margin-bottom: var(--spacing-xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.content-block p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Image styles - soft shapes */
.img-organic {
  border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-speed) var(--transition-easing);
}

.img-organic:hover {
  transform: scale(1.02);
}

/* Icons - placeholder for actual icon styling */
.icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  margin-right: var(--spacing-xs);
  /* Placeholder for SVG or font icon styling */
  color: var(--color-primary);
}

/* Subtle gradient background for hero sections or prominent blocks */
.hero-gradient-bg {
  background: linear-gradient(135deg, var(--section-bg-3) 0%, var(--section-bg-5) 100%);
  color: var(--color-text-dark) !important;
}
.hero-gradient-bg h1, .hero-gradient-bg h2, .hero-gradient-bg h3, .hero-gradient-bg h4, .hero-gradient-bg h5, .hero-gradient-bg h6, .hero-gradient-bg p, .hero-gradient-bg span, .hero-gradient-bg div, .hero-gradient-bg a {
  color: var(--color-text-dark) !important;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Scrollbar styling for a softer look */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 10px;
}

::-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;
    }
}