/* News Section */

/* Training Section */
#news {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #f0f0f0;
}

.news-item {
  flex: 0 0 300px;
  background: #fff;
  padding: 30px;
  margin: 15px 0px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.075);
  transition: -webkit-transform 0.5s ease, box-shadow 0.5s ease;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  transform: scale(1); /* Ausgangszustand */
}

.news-item:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); /* Schatten beim Hover */
  transform: scale(1.05);
}

.news-item h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.news-item p {
  color: var(--secondary-color);
  line-height: 1.5;
}

.news-carousel-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.news-carousel-wrapper {
  overflow: hidden;
  flex: 1;
}

.news-carousel {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  align-items: center;
  scroll-behavior: smooth;
  padding: 20px;
}

/* Mobile Einstellungen */
@media (max-width: 768px) {
  /* Verstecke den horizontalen Scrollbalken */
  .news-carousel {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
  }

  .news-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .news-carousel-container {
    overflow: hidden; /* Verhindert das horizontale Scrollen außerhalb des Containers */
  }

  .news-carousel-wrapper {
    overflow: hidden;
    width: 100%;
  }

  .news-carousel {
    display: flex;
    flex-direction: row;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    gap: 20px; /* Abstand zwischen den Kacheln */
    scroll-behavior: smooth;
  }

  .news-item {
    flex: 0 0 calc(100% - 40px); /* 100% Breite minus 40px (20px links + 20px rechts) */
    scroll-snap-align: center;
    box-sizing: border-box;
    padding: 20px;
    /* Verhindern, dass sich die Kacheln nach innen verschieben */
    min-width: 100%;
  }

  .news-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.075);
    transform: scale(1);
  }

  /* Dot Indicators anpassen */
  .news-indicators {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  .news-indicators .dot {
    width: 8px; /* Kleinere Dots */
    height: 8px;
    margin: 0 3px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .news-indicators .dot.active {
    background: var(--accent-color);
  }
}
