/* ============================================
   Four C Agricultural Limited
   Hero Slideshow Banner Styles
   Vanilla CSS — fade transitions, arrows, dots
   ============================================ */

/* === Slideshow Container === */
.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  transform: scale(1.05);
}

.hero-slide picture, .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 1s ease-in-out, transform 5s ease-out;
}

/* === Slide Captions === */
.hero-captions {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding-top: var(--space-xl);
}

.hero-caption {
  display: none;
  animation: captionFadeIn 0.6s ease forwards;
}

.hero-caption.active {
  display: block;
}

@keyframes captionFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-caption .caption-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.hero-caption .caption-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero-caption .caption-title .highlight {
  color: var(--color-gold);
}

.hero-caption .caption-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
  max-width: 620px;
  line-height: 1.6;
}

.hero-caption .caption-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--color-gold);
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
}

.hero-caption .caption-cta:hover {
  background: var(--color-gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

/* === Navigation Arrows === */
.slideshow-arrows {
  position: absolute;
  bottom: 40px;
  right: var(--space-lg);
  z-index: 10;
  display: flex;
  gap: var(--space-sm);
}

.slideshow-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.slideshow-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.slideshow-arrow:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* === Dot Indicators === */
.slideshow-dots {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-base);
}

.slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.55);
}

.slideshow-dot.active {
  background: var(--color-gold);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.5);
  transform: scale(1.2);
}

.slideshow-dot:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* === Pause indicator === */
.hero-slideshow.paused .slideshow-dot.active {
  animation: dotPulse 0.6s ease-in-out infinite alternate;
}

@keyframes dotPulse {
  from { transform: scale(1.2); }
  to { transform: scale(1); }
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero-caption .caption-title {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .hero-caption .caption-desc {
    font-size: 0.9rem;
  }

  .slideshow-arrows {
    bottom: 24px;
    right: var(--space-md);
  }

  .slideshow-arrow {
    width: 38px;
    height: 38px;
  }

  .slideshow-dots {
    bottom: 28px;
    gap: 8px;
  }

  .slideshow-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .hero-caption .caption-title {
    font-size: 1.4rem;
  }

  .hero-caption .caption-desc {
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .slideshow-arrows {
    bottom: 16px;
    right: var(--space-sm);
  }

  .slideshow-arrow {
    width: 34px;
    height: 34px;
  }

  .slideshow-dots {
    bottom: 20px;
  }
}
