/* ==============================================
   Hero Carousel - Sliding Implementation
   ============================================== */

/* Carousel Wrapper */
.hero_carousel_wrapper {
  position: relative;
  width: 100%;
  max-width: 100vw; /* Prevent overflow on mobile */
  overflow: hidden;
  touch-action: pan-y pinch-zoom; /* Allow vertical scroll, enable pinch zoom, prevent horizontal scroll conflicts */
}

/* Carousel Track - Horizontal Container */
.hero_carousel_track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Individual Slides */
.hero_slide {
  min-width: 100%;
  width: 100%;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.hero_slide.active {
  opacity: 1;
}

/* Navigation Arrows */
.hero_carousel_prev,
.hero_carousel_next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero_carousel_prev {
  left: 20px;
}

.hero_carousel_next {
  right: 20px;
}

.hero_carousel_prev:hover,
.hero_carousel_next:hover {
  background: var(--bs-primary, #d4af37);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.hero_carousel_prev i,
.hero_carousel_next i {
  font-size: 18px;
}

/* Dot Navigation */
.hero_carousel_dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero_dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid #fff;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero_dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.hero_dot.active {
  background: var(--bs-primary, #d4af37);
  border-color: var(--bs-primary, #d4af37);
  width: 40px;
  border-radius: 6px;
}

/* Fix counter alignment across all slides */
.hero_slide .heading_text {
  min-height: 150px; /* Ensure consistent height for headings */
  display: flex;
  align-items: flex-start;
}

.hero_slide .heading_description {
  min-height: 100px; /* Ensure consistent height for descriptions */
}

.hero_slide .hero_section_counter {
  margin-top: 40px; /* Consistent spacing before counters */
}

/* Desktop specific adjustments */
@media (min-width: 992px) {
  .hero_slide .heading_text {
    min-height: 180px; /* Accommodate longer headings on desktop */
  }
  
  .hero_slide .heading_description {
    min-height: 120px; /* Accommodate longer descriptions on desktop */
  }
  
  .hero_slide .hero_section_counter {
    margin-top: 50px; /* More spacing on desktop */
  }
}

/* Content Animations - Fade In from Bottom */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Animations - Fade In from Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations to active slide content */
.hero_slide.active .hero_content_wrap {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero_slide.active .hero_image_wrap {
  animation: fadeInRight 0.6s ease-out 0.3s both;
}

/* Responsive Design - Tablet */
@media (max-width: 992px) {
  .hero_carousel_prev,
  .hero_carousel_next {
    width: 40px;
    height: 40px;
  }
  
  .hero_carousel_prev i,
  .hero_carousel_next i {
    font-size: 14px;
  }
  
  .hero_carousel_prev {
    left: 10px;
  }
  
  .hero_carousel_next {
    right: 10px;
  }
  
  .hero_carousel_dots {
    bottom: 20px;
  }
  
  .hero_dot {
    width: 10px;
    height: 10px;
  }
  
  .hero_dot.active {
    width: 30px;
  }
}

/* Responsive Design - Mobile */
@media (max-width: 576px) {
  .hero_carousel_wrapper {
    overflow-x: hidden; /* Ensure no horizontal scrolling */
  }
  
  .hero_carousel_prev,
  .hero_carousel_next {
    width: 32px;
    height: 32px;
  }
  
  .hero_carousel_prev {
    left: 5px;
  }
  
  .hero_carousel_next {
    right: 5px;
  }
  
  .hero_carousel_prev i,
  .hero_carousel_next i {
    font-size: 11px;
  }
  
  .hero_carousel_dots {
    bottom: 10px;
    gap: 6px;
  }
  
  .hero_dot {
    width: 7px;
    height: 7px;
    border-width: 1px;
  }
  
  .hero_dot.active {
    width: 20px;
  }
  
  /* Disable animations on mobile for better performance */
  .hero_slide.active .hero_content_wrap,
  .hero_slide.active .hero_image_wrap {
    animation: none;
  }
}

/* Fix for very small screens */
@media (max-width: 380px) {
  .hero_carousel_prev,
  .hero_carousel_next {
    width: 28px;
    height: 28px;
  }
  
  .hero_carousel_prev i,
  .hero_carousel_next i {
    font-size: 10px;
  }
  
  .hero_carousel_dots {
    bottom: 8px;
    gap: 5px;
  }
  
  .hero_dot {
    width: 6px;
    height: 6px;
  }
  
  .hero_dot.active {
    width: 18px;
  }
}
