/* Stili base per l'intera sezione */
.teacher-carousel:focus {
  outline: none;
}

.teacher-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
}

.teacher-track-wrapper {
  overflow: hidden;
  border-radius: 1.5rem;
}

.teacher-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.teacher-slide {
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
  padding: 1rem;
}

.teacher-info {
  text-align: center;
  margin-top: 1rem;
}

.teacher-slide figcaption {
  margin: 1.5rem 0 1rem;
  font-size: var(--wp--preset--font-size--medium);
}

/* 1 slide su smartphone */
.teacher-slide {
  width: 100%;
}

/* 2 slide su tablet */
@media (min-width: 600px) {
  .teacher-slide {
    width: 50%;
  }
}

/* 3 slide su desktop */
@media (min-width: 1280px) {
  .teacher-slide {
    width: calc(100% / 3);
  }
}

/* Freccie e indicatori */
.teacher-indicators {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  margin: 0 auto;
  height: 5rem;
}

.teacher-dots {
  display: flex;
  /*gap: 0.5rem;*/
  position: relative;
}

.teacher-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 1.5px;
  background-color: #bbb;
  transform: translateY(-50%);
  z-index: 0;
}

.teacher-dot {
  position: relative;
  background: transparent;
  border: none;
  padding: 1px 12px;
  cursor: pointer;
  flex: 1;
  z-index: 1;
}

.teacher-dot::after {
  content: "";
  display: block;
  height: 6px;
  width: 100%;
  border-radius: 3px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) scaleX(1);
  transform-origin: center;
  transition: all 0.3s ease;
}

.teacher-dot[aria-current="true"]::after {
  background-color: #222;
  transform: translateY(-50%) scaleX(1.6);
}

.teacher-dot:focus {
  outline: 2px solid #000 !important;
  box-shadow: 0 0 6px 1px #00000088 !important;
  border-radius: 2px;
}

.teacher-dot:focus::after {
  box-shadow: 0 0 6px 1px #f6db7988;
  border-radius: 2px;
}

@media (hover: hover) {
  .teacher-dot:hover::after {
    background-color: #f6db79;
    transform: translateY(-50%) scaleX(1.2);
  }
}

.teacher-arrow {
  position: relative;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease;
  z-index: 0;
}

.teacher-arrow:focus {
  outline: 2px solid #f6db7988 !important;
  box-shadow: 0 0 6px 1px #f6db7988 !important;
}

.teacher-arrow.teacher-prev, .teacher-arrow.teacher-next {
  font-family: var(--wp--preset--font-family--dm-sans);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.25rem;
  color: var(--wp--preset--color--custom-azzurro);
  background-color: transparent;
  transition: background-color 0.5s ease, opacity 0.3s ease;
}

.teacher-arrow.teacher-prev:hover, .teacher-arrow.teacher-next:hover {
  color: var(--wp--preset--color--custom-blu);
  background-color: var(--wp--preset--color--custom-base);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  color: #000;
  background-color: #fff;
}

.teacher-track.is-resizing {
  visibility: hidden;
}