/* ----------------------------------------
   Carousel
---------------------------------------- */

.carousel-box {
  width: 100%;
  max-width: 820px;
  margin: 40px auto 20px;
  padding: 18px 18px 22px;
  text-align: center;
  background: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: relative;
  box-sizing: border-box;
}

/* Each slide */
.carousel {
  display: none;
  position: relative;
}

.carousel.active {
  display: block;
}

/* Slide text under the media */
.carousel p {
  display: inline-block;
  text-align: left;
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Headings inside slides */
.carousel h2 {
  margin-top: 14px;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

/* Images */
.carousel img {
    max-width: 800px        /* Responsive */
    max-height: 600px;      /* Never too tall */
    height: auto;           /* Maintain aspect ratio */
    width: auto;            /* Prevent forced stretching */
    object-fit: contain;    /* Guarantees proportion */
    margin: 10px auto;
    display: block;         /* Centers on page */
    border: 1px solid #000;
    border-radius: 4px;
}

/* Video iframe */
.carousel iframe {
  width: 100%;
  max-width: 800px;
  border: 4px solid #000;
  border-radius: 2px;
  margin: 10px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Controls overlayed on the sides of the slide */

.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  max-width: 810px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 200;
  pointer-events: none; /* buttons will re-enable */
}

.control-button {
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  font-family: monospace;
  font-size: 0.8rem;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  pointer-events: auto;
  opacity: 0.9;
  transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.control-button:hover {
  background-color: #222;
  transform: translateY(-1px);
  opacity: 1;
}

/* Optional: smaller arrows/spacing on phones */
@media (max-width: 600px) {
  .carousel-box {
    margin: 26px auto 16px;
    padding: 14px 10px 18px;
  }

  .control-button {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}
