/* ====== BASE ====== */
body {
  font-family: 'Poppins', sans-serif;
  font-display: swap;
  color: #333;
  margin: 0;
  background: #fff;
}

/* ====== HERO ====== */
.hero {
  position: relative;
  display: flex;
  justify-content: flex-start; /* spinge tutto a sinistra */
  align-items: center;         /* centra verticalmente */
  min-height: 80vh;
  overflow: hidden;
  width: 100%;
  padding-left: 100px;
  padding-right: 20px;
}

.hero-img {
  width: 100%;
  height: 50%;
  object-fit: cover;
  z-index: 0; /* dietro */
  padding-top: 200px;
  padding-left: 400px;
}

.hero-content {
  position: absolute;
  top: 10;
  left: 20;  
  z-index: 1; /* sopra l'immagine */
  max-width: 500px;
  color: black;
  text-align: center;
  background-color: transparent;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* ====== BUTTONS ====== */
.btn {
  background: #FFA500;
  color: black;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover {
  background: #ff8c00;
}

/* ====== WHY US ====== */
.why-us {
  text-align: center;
  padding: 4rem 2rem;
  background: #F4F4F4;
}

.why-us h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 2rem;
  width: 280px;
  min-height: 300px; /* evita CLS */
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  height: 60px;
  margin-bottom: 1rem;
}

/* ====== REVIEWS ====== */
.reviews {
  text-align: center;
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.reviews h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.reviews-summary {
  margin-bottom: 40px;
}

.stars {
  color: #FFD700;
  font-size: 1.5rem;
}

.rating {
  margin-top: 10px;
  font-size: 1rem;
  color: #555;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.review-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 20px;
  min-height: 180px; /* evita CLS */
}

.review-text {
  font-style: italic;
  color: #444;
  margin-bottom: 10px;
}

.review-author {
  font-weight: 600;
  color: #333;
}


/* ====== COOKIE BANNER ====== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 80px;
  background: white;
  color: #333;
  border-radius: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-buttons button {
  background-color: #0D3B66;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cookie-buttons button:hover {
  background-color: #145EA8;
}

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

  .hero {
    flex-direction: column;        /* impila elementi */
    justify-content: center;
    align-items: center;
    text-align: center;
    height: auto;
    padding: 0;
  }

  .hero-img {
    position: relative; 
    object-fit: contain;
    width: 100%;
    height: 40vh;
    z-index: 0;
    padding: 0;
  }

  .hero-content {
    position: relative;
    max-width: 90%;
    margin-top: 0;
    padding: 0 1rem 2rem;
    background-color: transparent;
    z-index: 1;
  }
  .hero h1 {
    font-size: 2rem;
  }

  .hero-img {
    max-width: 400px;
    margin-top: 1rem;
  }
}
 

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  transform: translateY(100%);
  z-index: 9999;
}

.cookie-banner:not(.hidden) {
  transform: translateY(0);
}

.cookie-banner.hidden {
  display: block; /* mantiene il nodo in DOM per evitare CLS */
  transform: translateY(100%);
}


@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}



.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.cookie-content a {
  color: #0D3B66;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-buttons button {
  background-color: #0D3B66;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cookie-buttons button:hover {
  background-color: #145EA8;
}

.cookie-preferences {
  text-align: center;
  margin: 3rem auto;
  max-width: 700px;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cookie-preferences h2 {
  color: #0D3B66;
  margin-bottom: 1rem;
}

.cookie-preferences p {
  color: #555;
  margin-bottom: 1.5rem;
}

.reset-cookies-btn {
  background-color: #0D3B66;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.reset-cookies-btn:hover {
  background-color: #145EA8;
}


@keyframes slideUp {
  from { transform: translate(-50%, 100%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
