/* =========================================================
   SLIDESHOW
   Extracted from styles.css
   ========================================================= */

/* =========================================================
   ⚠ CONFLICT: REVEAL SYSTEM OVERRIDE
   ---------------------------------------------------------
   The rule below forces slideshow slides to ignore
   reveal animation transforms using !important.
   Removing this may reintroduce slideshow fade bugs.
   ========================================================= */

.slideshow .slide {
  opacity: 0 !important;
  transform: none !important;
}

.slideshow .slide.active {
  opacity: 1 !important;
}

/* =============================
   SLIDESHOW CONTAINER
============================= */

.slideshow {
  position: relative;
  width: 100%;
  height: 320px;        /* restore height */
  max-height: 50vh;     /* responsive cap */
  margin-bottom: 1.5 rem;
  overflow: hidden;
  border-radius: 12px;
}

/* =============================
   SLIDE ELEMENT
============================= */

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.slide.active {
  opacity: 1;
}

/* =============================
   SLIDESHOW CONTROLS
============================= */

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  z-index: 2;
}

.slide-btn.prev {
  left: 10px;
}

.slide-btn.next {
  right: 10px;
}

.slide-btn:hover {
  background: rgba(0,0,0,0.9);
}

/* Desktop enlargement */

@media (min-width: 1025px) {
  .slide-btn {
    font-size: 3.2rem;
    padding: 0.5rem 1.2rem;
  }

  .slide-btn.prev {
    left: 20px;
  }

  .slide-btn.next {
    right: 20px;
  }
}

/* =============================
   SLIDESHOW CONTROLS BAR
============================= */

.slideshow-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.slideshow-controls button {
  background-color: #fff;
  color: #444;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.slideshow-controls button:hover {
  background-color: #666;
}

.slideshow-controls .counter {
  font-weight: bold;
  font-size: 0.9rem;
  color: #fff;
}

/* =========================================================
   MOBILE SLIDESHOW HEIGHT FIX
   ========================================================= */

@media (max-width: 768px) {

  .slideshow {
    height: 55vw;      /* scales with screen width */
    max-height: none;  /* remove desktop cap */
  }

}

@media (max-width: 768px) {

  .slide {
    object-fit: contain;
    object-position: center;
  }

}