@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Nunito:wght@600;800&display=swap');

:root {
  --primary-color: #136655; /* Dark green from logo */
  --secondary-color: #B5D0B9; /* Light green from logo */
  --accent-color: #1a8f76; /* A slightly brighter green for hover states */
  --text-color: #333333;
  --bg-color: #FAFCFB; /* Off-white with a hint of green */
  --white: #FFFFFF;
  
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

/* ==========================================================================
   Header and Navigation
   ========================================================================== */
header {
  background-color: var(--white);
  box-shadow: 0 4px 15px rgba(19, 102, 85, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 160px; /* Barra dimensionata esattamente per contenere il logo grande senza troppo spazio vuoto */
}

.logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  margin-right: 4rem; /* Spazio tra logo e "Home" */
}

/* If the user adds an image to assets/logo.png, they can use an img tag inside .logo */
.logo img {
  height: 150px; /* Logo decisamente più grande */
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

/* Underline animation on hover */
nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav ul li a:hover::after, nav ul li a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--white) 100%);
  padding: 6rem 2rem;
  text-align: center;
  border-bottom: 5px solid var(--primary-color);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(19, 102, 85, 0.2);
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(19, 102, 85, 0.3);
}

/* ==========================================================================
   Main Content Sections
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 10px auto 0;
  border-radius: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 4px solid var(--secondary-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border-top-color: var(--primary-color);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo h2 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--secondary-color);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  color: var(--secondary-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  nav ul {
    display: none; /* Hide default menu on mobile */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    text-align: center;
  }
  
  nav ul.show {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero {
    padding: 4rem 1.5rem;
  }
}

/* ==========================================================================
   Dropdown Menu & Accordion
   ========================================================================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--white);
  min-width: 220px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 100;
  top: 100%;
  left: 0;
  overflow: hidden;
  border-top: 3px solid var(--primary-color);
}

.dropdown-content a {
  color: var(--text-color);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.dropdown:hover .dropdown-content {
  display: block;
}

@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    background-color: #f5f5f5;
  }
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* Accordion Styles */
.accordion-item {
  background-color: var(--white);
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  overflow: hidden;
  border-left: 5px solid var(--primary-color);
  transition: transform 0.2s;
}

.accordion-item:hover {
  transform: translateX(5px);
}

.accordion-header {
  padding: 1.5rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.2rem;
  font-family: inherit;
  font-weight: bold;
  color: var(--primary-color);
}

.accordion-icon {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
  font-weight: normal;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding: 0 2rem;
  background-color: #fafafa;
}

.accordion-item.active .accordion-content {
  max-height: 400px;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

/* Elegant Scrollbar */
.accordion-content::-webkit-scrollbar {
  width: 6px;
}
.accordion-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}
.accordion-content::-webkit-scrollbar-thumb {
  background: rgba(19, 102, 85, 0.3);
  border-radius: 10px;
}
.accordion-content::-webkit-scrollbar-thumb:hover {
  background: rgba(19, 102, 85, 0.6);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content p {
  margin-bottom: 1rem;
}
.accordion-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
