/* Effetto hover leggero sull'immagine */
.image-wrapper {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.12) !important;
}

/* Ottimizzazione mobile per i testi */
@media (max-width: 991px) {
  .display-6 {
    font-size: 1.75rem;
  }
}

/* Animazione fade-in all'entrata (opzionale) */
section.py-5 {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

section.py-5:nth-of-type(1) { animation-delay: 0.1s; }
section.py-5:nth-of-type(2) { animation-delay: 0.2s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
:root {
  --canva-purple: #673ab7;
  --canva-purple-hover: #6a4cec;
}

/* Override Bootstrap tabs */
.nav-pills .nav-link {
  border: 2px solid transparent;
  transition: all 0.2s ease;
  background-color: #fff;
}

.nav-pills .nav-link:hover {
  background-color: #f8f9ff;
  border-color: #e0e7ff;
}

.nav-pills .nav-link.active {
  background-color: #f0f7ff;
  border-color: var(--canva-purple);
  color: var(--canva-purple) !important;
  box-shadow: 0 4px 12px rgba(125, 95, 255, 0.15);
}

.nav-pills .nav-link.active small {
  color: #4b5563 !important;
}

/* Animazione fade per il contenuto */
.tab-pane {
  animation: fadeInSlide 0.4s ease-out;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Card hover effect */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
}

/* Responsive: su mobile i tab diventano orizzontali scrollabili */
@media (max-width: 991px) {
  #bioTab {
    flex-direction: row !important;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 8px;
  }
  
  #bioTab .nav-link {
    flex: 0 0 auto;
    min-width: 200px;
    margin-bottom: 0 !important;
  }
  
  /* Nascondi il testo secondario su mobile per risparmiare spazio */
  #bioTab .nav-link small {
    display: none;
  }
}

/* Utility per immagini */
.object-fit-cover {
  object-fit: cover;
}

/* Carousel: stile indicatori (pallini) */
#profileCarousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  background-color: rgba(255,255,255,0.5);
  opacity: 1;
  transition: all 0.2s ease;
  margin: 0 4px;
}

#profileCarousel .carousel-indicators .active {
  background-color: #673ab7; 
  border-color: #fff;
  transform: scale(1.1);
}

/* Carousel: controlli freccia stilizzati */
#profileCarousel .carousel-control-prev,
#profileCarousel .carousel-control-next {
  width: 40px;
  height: 40px;
  background-color: #673ab7;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#profileCarousel:hover .carousel-control-prev,
#profileCarousel:hover .carousel-control-next {
  opacity: 1;
}

#profileCarousel .carousel-control-prev-icon,
#profileCarousel .carousel-control-next-icon {
  width: 20px;
  height: 20px;
  filter: invert(0.2) sepia(1) saturate(2) hue-rotate(220deg); /* Viola scuro */
}

/* Transizione fade più fluida */
.carousel-fade .carousel-item {
  transition: opacity 0.6s ease-in-out;
}

/* Responsive: nascondi frecce su mobile, tieni solo i pallini */
@media (max-width: 768px) {
  #profileCarousel .carousel-control-prev,
  #profileCarousel .carousel-control-next {
    display: none;
  }
  
  #profileCarousel .carousel-indicators {
    bottom: 12px;
  }
}

/* Utility: immagini sempre proporzionate */
#profileCarousel .carousel-item img {
  aspect-ratio: 4/3; /* Modifica se serve un altro ratio (es. 16/9, 1/1) */
  object-fit: cover;
}

/* Stile comune per tutti i carousel della landing */
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  background-color: rgba(255,255,255,0.5);
  opacity: 1;
  transition: all 0.2s ease;
  margin: 0 4px;
}

.carousel-indicators .active {
  background-color: #7d5fff; /* Viola Canva */
  border-color: #fff;
  transform: scale(1.1);
}

/* Controlli freccia */
.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.85);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
  filter: invert(0.2) sepia(1) saturate(2) hue-rotate(220deg); /* Viola scuro */
}

/* Transizione fade */
.carousel-fade .carousel-item {
  transition: opacity 0.6s ease-in-out;
}

/* Responsive: nascondi frecce su mobile */
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }
  
  .carousel-indicators {
    bottom: 12px;
  }
}

/* Immagini sempre proporzionate */
.carousel-item img {
  aspect-ratio: 4/3; /* Modifica se serve (es. 16/9, 1/1) */
  object-fit: cover;
}