.carousel-section {
  text-align: center;
  margin-top: 3rem;
}

.custom-carousel {
  position: relative;
  width: 80%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid var(--text-color);
  box-shadow: 5px 5px 10px black;
  background-color: var(--bg-elol);
}

.custom-carousel .carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slides {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.slides a {
    color: var(--text-color); /* sötétkék: 15.3:1 kontraszt világos háttéren */
    text-decoration: underline;
}
/*.slides a:hover a:focus0 {*/
.slides a:hover a {
    color: var(--text-color); 
}
.slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;   
  display: block;
}

.slides img {
  width: 100%;
  max-height: 800px;          
  max-width: 600px;
  object-fit: cover;          
  display: block;
  margin: 0 auto;
  object-fit: contain;
    background-color: black;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 1rem;
  color: var(--text-color);
  font-weight: bold;
  font-size: 2rem;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  user-select: none;
  z-index: 2;
}

.prev { left: 10px; }
.next { right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
  gap: 10px;
}

.carousel-dots label {
  cursor: pointer;
  width: 12px;
  height: 12px;
  background: var(--text-color);
  opacity: 0.4;
  border-radius: 50%;
  display: inline-block;
}

input#slide1:checked ~ .carousel-slides .slides:nth-child(1),
input#slide2:checked ~ .carousel-slides .slides:nth-child(2),
input#slide3:checked ~ .carousel-slides .slides:nth-child(3),
input#slide4:checked ~ .carousel-slides .slides:nth-child(4) {
  display: block;
}

input#slide1:checked ~ .carousel-dots label:nth-child(1),
input#slide2:checked ~ .carousel-dots label:nth-child(2),
input#slide3:checked ~ .carousel-dots label:nth-child(3),
input#slide4:checked ~ .carousel-dots label:nth-child(4) {
  opacity: 1;
}

.carousel-section h2 {
    text-decoration: underline;
}
