/* Font base */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #fff;
  color: #333;
  margin: 0;
  padding: 0;
}

/* --- NAVBAR --- */
nav {
  background-color: #fff;
  border-bottom: 2px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

nav .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
}

.logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 1px 2px rgba(181, 66, 93, 0.3));
  transition: transform 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.05);
}

.brand-text {
  color: #b5425d;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  user-select: none;
  line-height: 1;
}

/* Navbar links */
.navbar-nav {
  display: flex;
  gap: 1rem;
}

.navbar-nav .nav-link {
  position: relative;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: #b5425d;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: #b5425d;
}

.navbar-nav .nav-link.active {
  color: #b5425d;
  font-weight: 700;
}

/* --- HERO --- */
.hero-section {
  padding: 3rem 0 2rem 0;
  background-color: #f8f8f8;
  text-align: center;
}

.hero-title {
  color: #b5425d;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* --- CAROUSEL --- */
.carousel-inner {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(181, 66, 93, 0.2);
}

.carousel-img {
  max-height: 400px;
  object-fit: cover;
}

/* Riduci margine superiore del carosello per avvicinarlo all'hero */
section.container.my-4 {
  margin-top: 1rem !important;
  margin-bottom: 2.5rem !important;
}

/* --- INTRO --- */
section.container.text-center.my-5 p.lead {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto;
  color: #555;
}

/* --- SERVIZI --- */
.section-title {
  color: #b5425d;
  font-weight: 700;
  margin-bottom: 2rem;
}

.service-card {
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  padding: 1rem;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(181, 66, 93, 0.3);
}

.service-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.service-card h6 {
  font-weight: 600;
  color: #444;
}

/* --- FOOTER --- */
footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  position: relative;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #b5425d;
  color: white;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(181, 66, 93, 0.6);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  z-index: 1100;
  cursor: pointer;
}

.back-to-top:hover {
  background-color: #8b3448;
  box-shadow: 0 6px 20px rgba(139, 52, 72, 0.8);
  transform: scale(1.1);
}

/* Icona freccia dentro il back-to-top */
.back-to-top::before {
  content: '↑';
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .logo {
    width: 50px;
    height: 50px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .navbar-nav {
    gap: 0.5rem;
  }

  .service-card img {
    height: 130px;
  }
}
/* Transizione più morbida e colori raffinati per i link navbar */
.navbar-nav .nav-link {
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover più delicato per brand-text */
.brand-text:hover {
  color: #8a2e4b;
  transition: color 0.3s ease;
  cursor: pointer;
}

/* Navbar box-shadow delicato al passaggio */
nav.scrolled, nav:hover {
  box-shadow: 0 4px 12px rgba(181, 66, 93, 0.15);
  background-color: #fff;
}

/* Service card ombre più eleganti */
.service-card {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
  box-shadow: 0 10px 25px rgba(181, 66, 93, 0.25);
  transform: translateY(-10px);
}

/* Migliore leggibilità testo */
body {
  line-height: 1.62;
}

/* Back to top - pulsazione delicata */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(181, 66, 93, 0.6);
  }
  50% {
    box-shadow: 0 8px 20px rgba(181, 66, 93, 0.85);
  }
}

.back-to-top {
  animation: pulse 2.8s infinite ease-in-out;
}

/* Responsive: navbar links più spaziosi su tablet */
@media (max-width: 992px) {
  .navbar-nav {
    gap: 1.5rem;
  }
}

/* Responsive: service card testo centrato e dimensioni immagine leggermente aumentate su desktop */
@media (min-width: 992px) {
  .service-card {
    padding: 1.25rem 1.5rem;
  }

  .service-card img {
    height: 170px;
  }
}
footer a i {
  transition: color 0.3s ease;
}

footer a:hover i {
  color: #b5425d;
}
