.esp {
  margin-top: 98px;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-item {
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 15px;
  display: none; /* Bootstrap lo gestisce */
  transition: transform 0.6s ease-in-out;
}

#matchCarousel .carousel-item {
  height: auto;
}

.carousel-item.active {
  display: block;
}

.carousel-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9; /* opzionale ma utile */
}
@media (max-width: 767px) {
  .carousel-item {
    margin: 0;
  }

  .carousel-container {
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
  }
}

.carousel-wrapper {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .custom-control {
    width: auto;
    height: auto;
    background: none;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .carousel-control-prev.custom-control {
    left: -90px;
  }

  .carousel-control-next.custom-control {
    right: -90px;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
  }

  #photoCarousel .carousel-control-prev-icon,
  #photoCarousel .carousel-control-next-icon {
    filter: invert(100%) brightness(200%) drop-shadow(0 0 2px gray);
  }

  #matchCarousel .carousel-control-prev-icon,
  #matchCarousel .carousel-control-next-icon {
    margin-top: 130%;
  }

}

.title {
  font-size: 30px;
  font-weight: bold;
  text-align: left;
  color: #28a745;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  gap: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  padding: 10px;
}

.league-top-left {
  padding-left: 20px;
  position: absolute;
  top: 8px;
  left: 1%;
  font-size: 18px;
  color: rgb(194, 165, 0);
  font-style: italic;
  font-weight: bold;
}

.match-card {
  position: relative;
  text-align: center;
  padding: 25px;
  padding-bottom: 0;
  border-radius: 10px;
  width: 98%;
  background: transparent !important;
  box-shadow: 10px 10px 10px rgba(144, 238, 144, 0.6),
    5px 0 20px rgba(144, 238, 144, 0.4);
  margin: 10px;
  overflow: hidden;
}

.match-header,
.match-details {
  margin-bottom: 10px;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  padding-top: 20px;
}

.team {
  flex-grow: 1;
  text-align: center;
  padding: 5px;
  font-size: 18px;
  word-break: break-word;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.vs {
  flex-grow: 0;
  flex-shrink: 0;
  width: 50px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
}

.match-details {
  margin-top: 20px;
  font-size: 16px;
}

.league {
  font-size: 14px;
  font-style: italic;
}

.match-date {
  font-weight: bold;
  margin-top: 5px;
}

.clickable-div {
  background-color: #fff;
  width: 100%;
  color: black;
  display: inline-block;
  padding: 15px 20px;
  border-radius: 20px;
  text-align: left;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.clickable-div:hover {
  background-color: lightgray;
}

.continue {
  color: lightgray;
  font-style: italic;
  font-size: 15px;
  font-weight: bold;
}

@media screen and (max-width: 480px) {
  .carousel-item {
    margin: 0;
  }

  .title {
    font-size: 22px;
    gap: 8px;
    padding: 5px;
  }

  .match-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .team {
    font-size: 14px;
    white-space: normal;
    line-height: 1.2;
    max-width: 45%;
  }

  .vs {
    width: 40px;
    font-size: 18px;
  }

  .match-card {
    width: 95%;
  }
}

@media (max-width: 768px) {
  .esp {
    margin-top: 78px;
  }

  .title {
    font-size: 25px;
    gap: 10px;
    flex-direction: column;
    padding-left: 17px;
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {

  .carousel-container {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
  }

  .carousel-item {
    height: 200px;
  }

  .esp {
    margin-top: 78px;
  }
}

.container-custom {
  max-width: 1200px;
  margin: 0 auto;
}

.img-large {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.img-large:hover {
  transform: scale(1.08);
}

.img-small {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.large-img-container {
  height: 600px;
  margin-bottom: 20px;
}

.small-img-container {
  height: 180px;
  margin-bottom: 20px;
}

.center-image {
  max-width: 400px;
  margin: 0 auto;
}

.right-column {
  display: flex;
  align-items: center;
  height: 600px;
}

@media (max-width: 767px) {
  .large-img-container {
      height: 450px;
  }
  
  .small-img-container {
      height: 150px;
  }
  
  .center-image {
      max-width: 100%;
  }
  
  .right-column {
      height: auto;
  }

}