/* hero-carousel.css */

.hero-carousel {
  width: 100%;
  background-color: var(--color-bg);
}

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #060402;
}

.carousel-track {
  position: relative;
  width: 100%;
  min-height: 600px;
}

/* ── Slide ── */
.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 90px;
  padding-bottom: 90px;

  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity   var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* ── Dark warm overlay + gold bloom ── */
.carousel-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%,
      rgba(201, 150, 58, 0.10) 0%,
      transparent 60%),
    linear-gradient(
      160deg,
      rgba(8, 6, 3, 0.82) 0%,
      rgba(8, 6, 3, 0.62) 50%,
      rgba(8, 6, 3, 0.80) 100%
    );
}

/* Bottom fade to page background */
.carousel-slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

/* ── Content ── */
.carousel-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
  padding: 0 var(--space-16);
}

.carousel-title {
  margin: 0;
  font-family: var(--font-family-ar);
  font-size: clamp(26px, 4.2vw, 54px);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  line-height: 1.20;
  text-shadow:
    0 0 40px rgba(201, 150, 58, 0.50),
    0 2px 8px rgba(0, 0, 0, 0.60);
  letter-spacing: 0.01em;
}

.carousel-subtitle {
  margin-top: 18px;
  margin-bottom: 0;
  font-family: var(--font-family-ar);
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: var(--font-weight-regular);
  color: rgba(240, 235, 225, 0.82);
  line-height: 1.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.carousel-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

/* ── Controls ── */
.carousel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
}

.carousel-arrow {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(201, 150, 58, 0.35);
  background-color: rgba(11, 9, 7, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform        var(--motion-fast) var(--ease-out),
    background-color var(--motion-fast) var(--ease-out),
    border-color     var(--motion-fast) var(--ease-out),
    box-shadow       var(--motion-fast) var(--ease-out);
}

.carousel-arrow:hover {
  transform: translateY(-2px);
  background-color: rgba(11, 9, 7, 0.62);
  border-color: rgba(201, 150, 58, 0.65);
  box-shadow: var(--glow-gold-sm);
}

.carousel-arrow:active { transform: translateY(0); }

.carousel-arrow img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(1.5) sepia(0.5) saturate(3) hue-rotate(10deg);
  opacity: 0.85;
}

/* ── Dots ── */
.carousel-dots {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.carousel-dot {
  /* Visual size */
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(201, 150, 58, 0.45);
  background-color: transparent;
  cursor: pointer;
  /* Large invisible tap area */
  padding: 8px;
  margin: 8px;
  box-sizing: content-box;
  background-clip: content-box;
  transition:
    width            var(--motion-med)  var(--ease-out),
    background-color var(--motion-fast) var(--ease-out),
    box-shadow       var(--motion-fast) var(--ease-out),
    border-color     var(--motion-fast) var(--ease-out);
}

.carousel-dot:hover {
  border-color: rgba(201, 150, 58, 0.80);
}

.carousel-dot.is-active {
  width: 24px;
  background: var(--grad-cta);
  background-clip: content-box;
  border-color: transparent;
  box-shadow: var(--glow-gold-sm);
}

/* ══════════════════════════════
   RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 900px) {
  .carousel-track { min-height: 520px; }
  .carousel-slide {
    padding-top: 72px;
    padding-bottom: 80px;
  }
}

@media (max-width: 520px) {
  .carousel-track { min-height: 440px; }
  .carousel-slide {
    padding-top: 48px;
    padding-bottom: 72px;
    align-items: flex-start;
    padding-right: var(--space-16);
    padding-left: var(--space-16);
  }

  /* Left-align on phone for readability */
  .carousel-inner {
    text-align: right;
    padding: 0;
  }

  .carousel-subtitle {
    margin-top: 12px;
  }

  .carousel-actions {
    margin-top: 20px;
    justify-content: flex-start;
    flex-direction: column;
    gap: var(--space-8);
  }

  /* Full-width CTA buttons on phone */
  .carousel-actions .btn,
  .carousel-actions a.btn {
    width: 100%;
    justify-content: center;
  }

  /* Hide outline CTA on mobile – keep only the gold button */
  .carousel-actions .btn-outline,
  .carousel-actions #hero-btn {
    display: none;
  }

  /* Controls: tighter at bottom */
  .carousel-controls {
    bottom: 16px;
    gap: 12px;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
  }
}

/* ── Home image grid ── */
.home-images {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}

.home-images-grid {
  margin-top: var(--space-16);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-12);
}

.home-image-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-16);
  overflow: hidden;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform    var(--motion-med) var(--ease-out),
    box-shadow   var(--motion-med) var(--ease-out),
    border-color var(--motion-med) var(--ease-out);
}

.home-image-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--glow-gold-sm);
  border-color: rgba(201, 150, 58, 0.38);
}

.home-image-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

@media (max-width: 980px) {
  .home-images-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .home-images-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-image-card img { height: 120px; }
}
