/* ============================================================
   Metadise Academy – Hero Carousel Styles
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  padding-block: 0;
  
}

.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1015 / 444;
  overflow: hidden;
  background: #0f172a;
}

.hero__slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
}

.hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #0f172a;
}

.hero__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #fff;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  z-index: 2;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.5);
  transition: transform var(--transition), opacity var(--transition);
}

.hero__control:hover {
  opacity: 0.85;
  transform: translateY(-50%) scale(1.06);
}

.hero__control--prev {
  left: 1rem;
}

.hero__control--next {
  right: 1rem;
}

@media (max-width: 768px) {
  .hero__control--prev {
    left: 0.6rem;
  }

  .hero__control--next {
    right: 0.6rem;
  }
}

/* Loading skeleton (simple shimmer) */
.hero-skeleton {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, #0b1020 0%, #0f172a 50%, #0b1020 100%);
}

.hero-skeleton__stage {
  width: 100%;
  aspect-ratio: 1015 / 444;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b1020;
}

.hero-skeleton__slide {
  width: 90%;
  height: 80%;
  border-radius: 6px;
  background: linear-gradient(90deg, #111827 0%, #1f2937 50%, #111827 100%);
  animation: skeleton-shimmer 1.4s infinite linear;
}

@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* When hero is inserted, hide it until images finish loading to avoid layout jank */
.hero.is-hidden {
  opacity: 0;
  transition: opacity 360ms ease-in-out;
}

.hero {
  transition: opacity 360ms ease-in-out;
}