body {
  font-family: Arial, sans-serif;
  font-size: 18px;
  margin: 0;
  background: #fff;
  color: #333;
}

.welcome {
  text-align: center;
  padding: 40px 20px;
}
.welcome h1 {
  color: red;
}
.services-title {
  background: red;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 20px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}
.service-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.service-card h3, .service-card p {
  margin: 10px;
}
.content {
  max-width: 800px;
  margin: auto;
  padding: 2rem;
}
.section-title {
  color: red;
}
.subtitle {
  color: #666;
}
/* Form Contatti */
.content form {
  max-width: 600px;
  margin: 0 auto 2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.form-group label {
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.form-group input,
.form-group textarea {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
}
.btn-submit {
  background: red;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
}
.btn-submit:hover {
  background: #cc0000;
}
.alt-contact {
  text-align: center;
  color: #555;
  font-size: 0.95rem;
}

footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #ccc;
  color: #777;
  font-size: 16px;
}


/* Sticky footer */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}
footer {
  position: relative;
  bottom: 0;
  width: 100%;
  background-color: #fff;
}

.logo-img {
  height: 100px;
  vertical-align: middle;
}



footer {
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
  background-color: white;
}



/* Home page banner: refined size */
.home-banner img {
  display: block;
  margin: 20px auto;
  width: auto;
  max-width: 80%;
  height: auto;
  /*max-height: 250px;*/
}



.carousel-item {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.carousel-item.active {
  display: block;
  position: relative;
}

/* Carousel styles */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 20px 0;
}
.carousel-inner {
  position: relative;
  width: 100%;
}
.carousel-item {
  display: none;
  width: 100%;
}
.carousel-item.active {
  display: block;
}
.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
}
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 2rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  z-index: 10;
}
/* Carosello: limite su schermi grandi */
@media (min-width: 1200px) {
  .carousel {
    max-width: 1000px;
    margin: 20px auto; /* centro orizzontalmente */
  }
}
@media (min-width: 1200px) {
  .carousel-item img {
    max-height: 700px;
    object-fit: cover;
  }
}

.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

/* ────────────────────────────────── */
/* Navbar Base & Sticky               */
/* ────────────────────────────────── */
.navbar {
  background: white;
  border-bottom: 1px solid #ccc;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Logo dentro la navbar */
.navbar .logo-img {
  height: 100px;
  transition: transform 0.3s ease;
}
.navbar .logo-img:hover {
  transform: scale(1.05);
}

/* Nav links di default */
.navbar nav {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Hamburger toggle (solo mobile) */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

/* ────────────────────────────────── */
/* Responsive Navbar                 */
/* ────────────────────────────────── */
@media (max-width: 768px) {
  /* Mostra il toggle */
  .menu-toggle {
    display: block;
  }

  /* Nascondi il menu */
  .navbar nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  /* Quando JS aggiunge .open, mostra il menu */
  .navbar nav.open {
    display: flex;
  }

  /* Stile link in mobile */
  .navbar nav a {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
  }
}

@media (min-width: 769px) {
  /* Desktop: toggle nascosto, nav sempre visibile */
  .menu-toggle {
    display: none;
  }
  .navbar nav {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    box-shadow: none;
    border-top: none;
  }
}
/* Forza il colore dei link della navbar */
.navbar nav a,
.navbar nav a:link,
.navbar nav a:visited {
  color: #000 !important;
  text-decoration: none !important;
}

/* Mantieni il rosso all’hover */
.navbar nav a:hover,
.navbar nav a:focus {
  color: red !important;
  text-decoration: none !important;
}