.front-aside {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

/* Slideshow container */
.front-slideshow {
  position: relative;
  max-width: 750px;   /* fixed desktop width */
  width: 100%;
  margin: 0 auto;     /* center horizontally */
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  transition: height 0.5s ease; /* smooth height adjustment */
}

.front-slides {
  display: flex;
  transition: transform 1s ease;
}

.front-slide {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: auto;   /* allow auto height */
}

.front-slide a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.front-slide img {
  width: 100%;
  height: auto;            /* let height follow image */
  display: block;          /* removes inline gap */
  border-radius: 10px;
}

/* Caption styling */
.front-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #f0e6ff; /* light purple background */
  padding: 10px;
  font-size: 14px;
  text-align: center;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  color: #6600ff; /* dark purple text */
}

.front-caption.front-show {
  opacity: 1;
  transform: translateY(0);
}

.front-caption .front-title {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
  color: #6600ff;
  font-size: 1.5em;
}

.front-caption .front-meta {
  display: block;
  color: #6600ff;
  font-size: 1.3em;
}

/* Controls */
.front-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.front-controls button {
  pointer-events: auto;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 5px;
  transition: background 0.3s;
}

.front-controls button:hover {
  background: rgba(255,255,255,0.2);
}

/* Hover effect on slides */
.front-slide a:hover img {
  filter: brightness(0.95);
  transition: filter 0.3s ease;
}

/* ---------------- Responsive Enhancements ---------------- */

/* iPad Landscape (horizontal ~768px–1024px) */
@media (min-width:768px) and (max-width:1024px) {
  .front-slideshow {
    max-width: 750px; /* keep consistent */
  }
  .front-caption {
    font-size: 15px;
    padding: 10px;
  }
  .front-caption .front-title {
    font-size: 1.6em;
  }
  .front-caption .front-meta {
    font-size: 1.3em;
  }
  .front-controls button {
    padding: 8px 16px;
    font-size: 18px;
  }
}

/* Mobile layout ≤700px */
@media (max-width:700px) {
  .front-slideshow {
    aspect-ratio: 1 / 1; /* square-ish for mobile */
  }
  .front-caption {
    font-size: 12px;
    padding: 8px;
  }
  .front-caption .front-title {
    font-size: 1.3em;
  }
  .front-caption .front-meta {
    font-size: 1.1em;
  }
  .front-controls button {
    padding: 6px 12px;
    font-size: 16px;
  }
}

/* Extra small phones ≤400px */
@media (max-width:400px) {
  .front-caption {
    font-size: 10px;
    padding: 6px;
  }
  .front-caption .front-title {
    font-size: 1.2em;
  }
  .front-caption .front-meta {
    font-size: 1em;
  }
  .front-controls button {
    padding: 5px 10px;
    font-size: 14px;
  }
}