/* ===== BODY ===== */
body {
  font-family: 'Poppins', sans-serif;
  background: #fdf6e3; /* sfondo chiaro giallo panna */
  color: #333;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* ===== NAVBAR ===== */
.navbar {
  background: rgba(243, 196, 15, 0.95); /* giallo chiaro */
  padding: 1rem 2rem;
  transition: 0.4s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.navbar.scrolled {
  background: #f1c40f; /* giallo più intenso */
  box-shadow: 0 6px 30px rgba(0,0,0,0.2);
}

.navbar-brand img {
  max-height: 60px;
  transition: transform 0.4s ease;
}
.navbar-brand img:hover {
  transform: scale(1.1);
}

.nav-link {
  font-size: 1.2rem;
  margin: 0 15px;
  font-weight: 600;
  color: #004a99 !important; /* blu moderato */
  position: relative;
  transition: all 0.3s ease;
}
.nav-link:hover {
  color: #d35400 !important; /* arancio caldo */
  transform: translateY(-3px);
}
.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 3px;
  background: #004a99;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 50%;
}

/* ===== BIG TITLE ===== */
.big-title {
  font-size: 3.5rem;
  font-weight: 900;
  text-align: center;
  margin: 40px 0 20px;
  color: #004a99; /* blu per titoli */
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: fadeInDown 1s ease-out forwards;
}

/* Responsive Big Title */
@media(max-width:768px){
  .big-title {
    font-size: 2.2rem;
  }
}

/* ===== HERO / CAROUSEL ===== */
.carousel-container {
  max-width: 1200px;
  margin: 0 auto 50px;
  position: relative;
}
.carousel-item img {
  height: 500px;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.carousel-item img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* ===== ALLERTE ===== */
#alerts .alert {
  margin-bottom: 20px;
  padding: 20px 25px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

#alerts .alert:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

#alerts .giallo { 
  background-color: #f1c40f; 
  color: #222; 
  border-left: 6px solid #f39c12;
}

#alerts .arancione { 
  background-color: #e67e22; 
  color: #fff; 
  border-left: 6px solid #d35400;
}

#alerts .rosso { 
  background-color: #e74c3c; 
  color: #fff; 
  border-left: 6px solid #c0392b;
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive: testi leggibili anche su smartphone */
@media(max-width:768px){
  #alerts .alert {
    font-size: 0.95rem;
    padding: 15px 20px;
  }
}

/* ===== COMUNICAZIONI ===== */
#comms .comm {
  background-color: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 5px solid #004a99; /* blu moderato */
  border-radius: 12px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
#comms .comm:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  border-color: #f1c40f; /* giallo Protezione Civile */
}

/* ===== CARDS MEZZI ===== */
.mezzo-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}
.mezzo-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}
.mezzo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.mezzo-card img:hover {
  transform: scale(1.05);
}
.mezzo-card-body {
  padding: 15px;
}
.mezzo-card-body h5 {
  font-weight: 700;
  color: #004a99; /* blu moderato */
}
.mezzo-card-body p {
  font-size: 0.95rem;
  color: #555;
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
footer {
  background: #f1c40f; /* giallo */
  color: #004a99; /* blu per testo */
  padding: 25px 0;
  text-align: center;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
}
footer a { color: #004a99; text-decoration: none; }
footer a:hover { text-decoration: underline; }
