.bs-icon {
  --bs-icon-size: .75rem;
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: var(--bs-icon-size);
  width: calc(var(--bs-icon-size) * 2);
  height: calc(var(--bs-icon-size) * 2);
  color: var(--bs-primary);
}

.bs-icon-xs {
  --bs-icon-size: 1rem;
  width: calc(var(--bs-icon-size) * 1.5);
  height: calc(var(--bs-icon-size) * 1.5);
}

.bs-icon-sm {
  --bs-icon-size: 1rem;
}

.bs-icon-md {
  --bs-icon-size: 1.5rem;
}

.bs-icon-lg {
  --bs-icon-size: 2rem;
}

.bs-icon-xl {
  --bs-icon-size: 2.5rem;
}

.bs-icon.bs-icon-primary {
  color: var(--bs-white);
  background: var(--bs-primary);
}

.bs-icon.bs-icon-primary-light {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .2);
}

.bs-icon.bs-icon-semi-white {
  color: var(--bs-primary);
  background: rgba(255, 255, 255, .5);
}

.bs-icon.bs-icon-rounded {
  border-radius: .5rem;
}

.bs-icon.bs-icon-circle {
  border-radius: 50%;
}

/* ============== ANIMAZIONI NAVBAR ============== */
.nav-link-animated {
  position: relative;
  padding-bottom: 4px;
  font-weight: 500;
  color: inherit;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-animated::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #cc2b2b;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-animated:hover {
  color: #cc2b2b;
}

.nav-link-animated:hover::after {
  width: 100%;
}

/* ============== BOTTONI ============== */
.navbar .btn {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(204, 43, 43, 0.2);
}

.navbar .btn:hover {
  background-color: #a82222 !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(204, 43, 43, 0.3);
}

/* ============== FOOTER ============== */
.footer-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: #cc2b2b;
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: white !important;
}

.footer-link:hover::after {
  width: 100%;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 1.2rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social:hover {
  color: white !important;
  background-color: #cc2b2b;
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ============== CARD EFFETTI ============== */
.service-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px -8px rgba(204, 43, 43, 0.2) !important;
  border-color: #cc2b2b !important;
}

.service-card .fs-1 {
  transition: transform 0.4s ease;
}

.service-card:hover .fs-1 {
  transform: scale(1.1);
}

.value-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

/* ============== OVERLAY EFFETTI ============== */
.overlay-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(204, 43, 43, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.4s ease, background 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.position-relative:hover .overlay-description {
  opacity: 1;
}

/* ============== ANIMAZIONI GLOBALI ============== */
.bg-white {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.bg-white:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* ============== TIMELINE ============== */
.timeline-item {
  transition: all 0.4s ease;
}

.timeline-item:hover {
  transform: scale(1.03);
}

/* ============== EFFETTI HERO ============== */
.highlight-text {
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 5px;
  width: 100%;
  height: 12px;
  background-color: rgba(204, 43, 43, 0.3);
  z-index: -1;
  transition: height 0.3s ease;
}

.highlight-text:hover::after {
  height: 18px;
}

/* ============== TRANSIZIONI CAROUSEL ============== */
.carousel-item {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* ============== MEDIA QUERIES ============== */
@media (max-width: 768px) {
  .service-card:hover {
    transform: translateY(-4px);
  }
  
  .footer-social {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}