.mad-carousel:focus {
  outline: none;
}

.mad-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto;
}

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

.mad-track {
  display: flex;
  /*transition: transform 0.5s ease;*/
  will-change: transform;
}

.mad-slide {
  flex-shrink: 0;
  width: 100%;
  object-fit: cover;
  display: block;
}

.mad-prev {
  left: 0.5rem;
}

.mad-next {
  right: 0.5rem;
}

.mad-indicators {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.mad-dots {
  display: flex;
  gap: 0.5rem;
  position: relative;
}

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

.mad-dot {
  position: relative;
  background: transparent;
  border: none;
  padding: 1px 12px; /* Superficie cliccabile ≥ 42x42px */
  cursor: pointer;
  flex: 1;
  z-index: 1;
}

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

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

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

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

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

.mad-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;
}

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

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

.mad-arrow.mad-prev:hover, .mad-arrow.mad-next:hover {
    color: var(--wp--preset--color--custom-blu);
  background-color: var(--wp--preset--color--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;
}