/* =====================
   VARIABILI GLOBALI
   ===================== */
:root {
  --verde: #50823E;
  --accento: #74A961;
  --grigio: #2E2E2E;
  --chiaro: #F8FAF8;
  --header-desktop: 90px;
  --header-mobile: 130px;
}

/* =====================
   RESET + BASE
   ===================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--grigio);
  overflow-x: hidden; /* evita micro-overflow che su 4K “sbilancia” */
}

body {
  padding-top: var(--header-desktop);
}

a { color: inherit; }

/* =====================
   HEADER
   ===================== */
header {
  background: #fff;
  border-bottom: 3px solid var(--verde);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}

.container.header-flex {
  max-width: 1200px;
  margin: 0 auto;
  padding: .5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 90px;
  width: auto;
  transition: transform .3s;
}

.logo img:hover { transform: scale(1.05); }

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

nav a {
  text-decoration: none;
  font-weight: 600;
  transition: color .3s;
}

nav a:hover { color: var(--verde); }

/* =========================================================
   HERO (DISATTIVATO)
   =========================================================
   La homepage NON utilizza più l'immagine hero.
   Questo blocco è mantenuto solo per riferimento futuro.
========================================================= */
/*
.hero {
  position: relative;
  background:
    linear-gradient(rgba(80, 130, 62, 0.3), rgba(80, 130, 62, 0.3)),
    url("assets/brenta-hero.webp") center/cover no-repeat;
  background-position: top;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 2rem;
}

.hero h1,
.hero h2 {
  background: rgba(255, 255, 255, 0.65);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: inline-block;
}

.hero-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
*/

/* =====================
   SEZIONI GENERALI
   ===================== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section.light { background: var(--chiaro); }

.section > h2:first-child {
  margin-top: .5rem;
  border-left: 6px solid var(--verde);
  padding-left: .6rem;
  line-height: 1.3;
  text-align: left;
}

h2 {
  color: var(--verde);
  text-align: center;
  margin: 0 0 2rem;
}

/* =====================
   HOME INTRO (senza hero)
   ===================== */
.home-intro{
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.home-intro h1{
  margin: 0 0 .8rem;
  color: var(--verde);
  border-left: 6px solid var(--verde);
  padding-left: .6rem;
  line-height: 1.2;
  font-size: 2rem;
  text-align: left;
}

.home-intro p{
  margin: 0 0 1.2rem;
  max-width: 900px;
  line-height: 1.6;
}

/* =====================
   GRIGLIA PRODOTTI HOME
   ===================== */
.prodotti-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(4, minmax(300px, 1fr));
}

@media (max-width: 1024px) {
  .prodotti-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .prodotti-grid { grid-template-columns: 1fr; }
}

/* =====================
   CARD PRODOTTI HOME
   ===================== */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  text-align: center;
  padding: 0;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: transform 0.5s ease;
}

.card:hover img { transform: scale(1.08); }

.card h3,
.card p,
.card .btn-dettagli {
  padding: 0 1.5rem;
}

.card h3 {
  margin-top: 1rem;
  color: var(--verde);
}

/* Pulsante Dettagli */
.btn-dettagli {
  display: inline-block;
  margin: 1rem 0 1.5rem;
  background-color: var(--verde);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-dettagli:hover {
  background-color: var(--accento);
  transform: translateY(-2px);
}

/* =====================
   FORM CONTATTI
   ===================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 600px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.consenso {
  font-size: .9rem;
  line-height: 1.4;
}

.consenso a {
  color: var(--verde);
  text-decoration: underline;
}

.contact-form button {
  background: var(--verde);
  color: #fff;
  border: none;
  padding: .9rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s, transform .2s;
}

.contact-form button:hover {
  background: var(--accento);
  transform: scale(1.01);
}

/* =====================
   FOOTER
   ===================== */
footer {
  background: var(--verde);
  color: #fff;
  text-align: center;
  padding: 1.2rem;
  font-size: .9rem;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

/* =====================
   PAGINE PRODOTTO
   ===================== */
.product .section:first-of-type {
  margin-top: var(--header-desktop);
}

.product .section h1 {
  margin: 0 0 1rem;
  color: var(--verde);
  border-left: 6px solid var(--verde);
  padding-left: .6rem;
  line-height: 1.2;
}

.product-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
  margin: 3.5rem 0;
}

.product-row.reverse { grid-template-columns: 1.2fr 1fr; }

.product-row.reverse .product-image { order: 2; }
.product-row.reverse .product-text  { order: 1; }

.product-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.product-text h3 {
  margin: 0 0 .8rem;
  color: var(--verde);
}

.product-text h4 {
  margin: 1.2rem 0 .4rem;
}

.product-text ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.product-text li {
  margin-bottom: .4rem;
}

/* STACK: verticale */
.product-row.stack {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: start;
}

.product-row.stack .product-image img {
  height: auto;
  object-fit: contain;
  background: #fff;
}

/* STACK TOP: testo sopra */
.product-row.stack.stack-top .product-text { order: 1; }
.product-row.stack.stack-top .product-image { order: 2; }

/* =====================
   RESPONSIVE (mobile)
   ===================== */
@media (max-width: 900px) {

  body {
    padding-top: var(--header-mobile);
  }

  .container.header-flex {
    flex-direction: column;
    gap: .5rem;
  }

  .product-row{
    grid-template-columns: 1fr;
    gap: 1.3rem;
    margin: 2.5rem 0;
    align-items: start;
  }

  .product-row:not(.stack) .product-image img{
    height: 260px;
  }

  .product-row.reverse .product-image,
  .product-row.reverse .product-text{
    order: initial;
  }
}

/* =====================
   4K / SCHERMI GRANDI
   ===================== */
@media (min-width: 1600px) {
  .section,
  .container.header-flex {
    max-width: 1600px;
  }

  .prodotti-grid {
    grid-template-columns: repeat(5, minmax(260px, 1fr));
  }
}