/* Final overrides: loaded after every legacy stylesheet. */
html body .ucam-campus-card {
  position: relative !important;
  overflow: hidden !important;
}

html body .ucam-campus-card .ucam-photo-logo {
  display: block !important;
  position: absolute !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: 20 !important;
  width: clamp(150px, 17vw, 250px) !important;
  height: auto !important;
  padding: 12px 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: contain !important;
  background: rgba(255, 255, 255, 0.94) !important;
  filter: none !important;
  -webkit-filter: none !important;
}

html body span.vimeo-cover-play {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: block !important;
  padding: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

html body span.vimeo-cover-play::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  width: 12px !important;
  height: 14px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  background: #111318 !important;
  clip-path: polygon(0 0, 100% 50%, 0 100%) !important;
}

html body span.vimeo-cover-play::after {
  content: none !important;
  display: none !important;
}

@media (min-width: 781px) {
  /* Desktop photo gallery: one clean, optically centred chevron. */
  html body .program-photo-carousel > button.carousel-button {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
  }

  html body .program-photo-carousel > button.carousel-button::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 11px !important;
    height: 11px !important;
    margin: 0 !important;
    border: 0 !important;
    border-top: 4px solid #111318 !important;
    border-right: 4px solid #111318 !important;
    background: transparent !important;
    clip-path: none !important;
    transform-origin: center !important;
  }

  html body .program-photo-carousel > button[data-program-carousel="prev"]::before {
    transform: translate(-50%, -50%) rotate(-135deg) !important;
  }

  html body .program-photo-carousel > button[data-program-carousel="next"]::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  html body .program-photo-carousel > button.carousel-button::after {
    content: none !important;
    display: none !important;
  }

  html body .professor-arrow,
  html body .professor-carousel-controls {
    display: none !important;
  }

  html body .testimonial-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr) !important;
    gap: 18px !important;
    align-items: stretch !important;
  }

  html body .testimonial-grid > article {
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
  }

  html body .testimonial-grid > article:first-child {
    grid-row: span 2 !important;
  }

  html body .testimonial-grid > article .vimeo-cover-button {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
  }

  html body .testimonial-grid > article:first-child .vimeo-cover-button {
    min-height: 560px !important;
    aspect-ratio: 3 / 4 !important;
  }
}

@media (max-width: 780px) {
  html body .ucam-campus-card .ucam-photo-logo {
    right: 12px !important;
    bottom: 12px !important;
    width: 132px !important;
    padding: 8px 10px !important;
  }

  html body .professor-arrow {
    display: grid !important;
  }

  /* Una sola freccia, centrata nel proprio pulsante, in tutti i caroselli mobili. */
  html body .carousel-button,
  html body .about-principles-arrow,
  html body .module-arrow,
  html body .professor-arrow,
  html body .program-card-arrow,
  html body .program-photo-arrow,
  html body .testimonial-arrow {
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
  }

  html body .carousel-button::before,
  html body .about-principles-arrow::before,
  html body .module-arrow::before,
  html body .professor-arrow::before,
  html body .program-card-arrow::before,
  html body .program-photo-arrow::before,
  html body .testimonial-arrow::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 11px !important;
    height: 11px !important;
    margin: 0 !important;
    border: 0 !important;
    border-top: 3px solid currentColor !important;
    border-right: 3px solid currentColor !important;
    transform-origin: 50% 50% !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  html body [data-about-carousel="prev"]::before,
  html body [data-module-carousel="prev"]::before,
  html body [data-professor-carousel="prev"]::before,
  html body [data-program-card-carousel="prev"]::before,
  html body [data-program-carousel="prev"]::before,
  html body .testimonial-arrow:first-child::before {
    transform: translate(-50%, -50%) rotate(-135deg) !important;
  }

  html body .carousel-button::after,
  html body .about-principles-arrow::after,
  html body .module-arrow::after,
  html body .professor-arrow::after,
  html body .program-card-arrow::after,
  html body .program-photo-arrow::after,
  html body .testimonial-arrow::after {
    content: none !important;
    display: none !important;
  }

  html body .program-photo-carousel > .carousel-button {
    position: relative !important;
    inset: auto !important;
  }

  /* iPhone: contenuto intero sopra, comandi affiancati sotto senza sovrapposizioni. */
  html body .about-principles-carousel,
  html body .professor-carousel,
  html body .program-photo-carousel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px 14px 46px minmax(0, 1fr) !important;
    grid-template-rows: auto 46px !important;
    justify-content: center !important;
    align-items: center !important;
    column-gap: 0 !important;
    row-gap: 16px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  html body .about-principles,
  html body .professor-grid,
  html body .program-photo-track {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: auto !important;
  }

  html body .about-principles-arrow,
  html body .professor-arrow,
  html body .program-photo-carousel > .carousel-button {
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    transform: none !important;
    align-self: center !important;
    justify-self: center !important;
  }

  html body [data-about-carousel="prev"],
  html body [data-professor-carousel="prev"],
  html body [data-program-carousel="prev"] {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  html body [data-about-carousel="next"],
  html body [data-professor-carousel="next"],
  html body [data-program-carousel="next"] {
    grid-column: 4 !important;
    grid-row: 2 !important;
  }

  html body .program-photo-slide {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    justify-items: center !important;
    align-items: center !important;
  }

  html body .program-photo-slide img {
    display: block !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    object-position: 50% 50% !important;
  }
}

/* Centrado exacto de los dos indicadores laterales de Programas. */
html body .program-card-arrow {
  position: relative !important;
  display: block !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

html body .program-card-arrow::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 12px !important;
  height: 12px !important;
  margin: 0 !important;
  border-top: 3px solid currentColor !important;
  border-right: 3px solid currentColor !important;
  transform-origin: 50% 50% !important;
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

html body [data-program-card-carousel="prev"]::before {
  transform: translate(-50%, -50%) rotate(-135deg) !important;
}

html body .program-card-arrow::after {
  content: none !important;
  display: none !important;
}
