/* ===========================
   RESET & BASE TIPOGRAFIA
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Immagini responsive globali */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  color: #111;
  line-height: 1.6;
}

/* ===========================
   HEADER & NAV
   =========================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgb(158, 139, 123);
  color: white;
}

header .logo img {
  max-height: 50px;
  width: auto;
  height: auto;
}

header nav a {
  margin: 0 12px;
  padding: 6px 10px;
  text-decoration: none;
  color: black;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 6px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

header nav a:hover {
  background: rgb(175, 10, 16);
  color: white;
  transform: scale(1.08);
}

/* ===========================
   HERO (immagine + slogan)
   =========================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  height: 90vh;
  background: gray url('placeholder-hero.jpg') center/cover no-repeat;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
}

/* ===========================
   CTA (bottoni)
   =========================== */
.cta-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 32px;
  background: rgb(175, 10, 16);
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 50px;
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  cursor: pointer;
}
.cta-btn:hover {
  color: white;
  transform: scale(1.08);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* ===========================
   SEZIONI GENERALI
   =========================== */
section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

/* ===========================
   GRIGLIE
   =========================== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

/* Layout prezzi ordinato: 3 colonne su desktop, 2 su tablet, 1 su mobile */
.prezzi .grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

@media (max-width: 768px) {
  .prezzi .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   BOX GENERICI
   =========================== */
.static-box img,
.box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.box {
  background: white;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  min-height: 220px;
  border: 1px solid #eee;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.box:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgb(175, 10, 16);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.box h3 {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: #222;
  border-bottom: 2px solid rgb(175, 10, 16);
  display: inline-block;
  padding-bottom: 4px;
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: black;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}


/* ===========================
   INTERAZIONI (hover/zoom)
   =========================== */
/* Effetto zoom leggero solo sui link generici */
a {
  transition: transform 0.2s ease-in-out;
}

a:hover {
  transform: scale(1.05);
}

/* ===========================
   LINK GENERICI (fuori dal menu)
   =========================== */
a {
  color: black; 
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

a:hover {
  color: black;
}

/* ===========================
   RESPONSIVE
   - Mobile & tablet (<=768px)
   - Telefono piccolo (<=420px)
   =========================== */

/* Mobile & tablet */
@media (max-width: 768px) {
  /* Header: evita sovrapposizioni tra logo e menu */
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  header .logo {
    font-size: 1.1rem;      /* leggermente più piccolo su mobile */
    line-height: 1.2;
    word-break: break-word; /* evita tagli brutti con nomi lunghi */
  }

  header .logo img {
    max-height: 42px;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;        /* i link vanno a capo se serve */
    gap: 10px 14px;
  }

  header nav a {
    margin: 0;              /* rimuove margini orizzontali fissi */
    padding: 6px 0;
  }

  /* Hero: riduce altezza e gestisce testo lungo */
  .hero {
    height: 60vh;           /* da 90vh → 60vh per evitare overflow */
    padding: 0 16px;        /* respiro ai lati */
    text-align: center;
  }

  .hero h1 {
    font-size: 1.8rem;      /* più compatto su mobile */
    line-height: 1.2;
    padding: 12px;
    word-break: break-word; /* evita sovrapposizioni con parole lunghe */
  }

  .cta-btn {
    padding: 10px 18px;
  }

  /* Sezioni più ariose e griglie a una colonna */
  section {
    padding: 40px 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr; /* da 2 → 1 colonna */
  }

  .grid-3 {
    grid-template-columns: 1fr; /* da auto-fit → 1 colonna */
    gap: 14px;
    margin-top: 20px;
  }

  .box {
    min-height: 120px;      /* evita box troppo alti su schermi piccoli */
  }
}

/* Telefono molto piccolo */
@media (max-width: 420px) {
  .hero h1 {
    font-size: 1.6rem;
    padding: 10px;
  }

  header nav {
    gap: 8px 12px;
  }

  section h2 {
    font-size: 1.2rem;
  }
}

/* Uniforma altezza e allineamento box prezzi */
.prezzi .box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
}