.news {
  background-image: url("../img/news/news_title_uta.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  max-width: 100%;
  height: 400px;
  justify-content: space-between;
  align-items: flex-end;
  display: flex;
  position: relative;
  transition: background-image 0.8s ease-in-out;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

.news-title {
  display: inline-flex;
  background-color: black;
  align-items: center;
  opacity: 0.87;
  padding: 10px 20px;
  white-space: nowrap;
  color-scheme: light only;
  border-top-right-radius: 12.127px;
  border-top-left-radius: 0px;
  border-bottom-right-radius: 12.127px;
  transition: all 0.5s ease-in-out;
  max-width: calc(100% - 40px);
  z-index: 5;
  position: relative;
}

.news-title p {
  font-family: "DM Sans", sans-serif;
  color: white;
  font-size: 24px;
  margin: 0;
  line-height: 1;
  transition: opacity 0.3s ease-in-out;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slideshow-indicators {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  flex-shrink: 0;
}

.indicator.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.slideshow-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 40px);
  left: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0;
  box-sizing: border-box;
  z-index: 15;
}

.slideshow-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  pointer-events: all;
  backdrop-filter: blur(10px);
  opacity: 0;
  flex-shrink: 0;
}

.news:hover .slideshow-btn {
  opacity: 1;
}

.slideshow-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.slideshow-btn:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .news {
    height: 400px;
    padding-bottom: 0;
    overflow: hidden;
    align-items: flex-end;
    transition: background-image 1s ease-in-out;
  }

  .news-title {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    display: flex;
    justify-content: center;
    border-top-left-radius: 12.127px;
    border-bottom-right-radius: 0px;
    margin: 0 10px 0 10px;
    position: relative;
    z-index: 5;
    transition: all 0.6s ease-in-out;
  }

  .news-title p {
    font-size: 20px;
    transition: opacity 0.4s ease-in-out;
  }

  .slideshow-controls {
    display: none;
  }

  .slideshow-indicators {
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    z-index: 10;
  }

  .indicator {
    transition: all 0.4s ease-in-out;
  }
}

@media (max-width: 480px) {
  .news {
    height: 350px;
    padding-bottom: 0;
    transition: background-image 1.2s ease-in-out;
  }

  .news-title {
    width: calc(100% - 10px);
    max-width: calc(100% - 10px);
    margin: 0 5px 0 5px;
    transition: all 0.7s ease-in-out;
  }

  .news-title p {
    font-size: 18px;
    transition: opacity 0.5s ease-in-out;
  }

  .indicator {
    width: 10px;
    height: 10px;
    transition: all 0.5s ease-in-out;
  }

  .slideshow-indicators {
    top: 15px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .news {
    transition: background-image 1s ease-out;
  }

  .news-title {
    transition: all 0.6s ease-out;
  }

  .news-title p {
    transition: opacity 0.4s ease-out;
  }

  .indicator {
    transition: all 0.4s ease-out;
  }
}
