/* hero.css - Hero Banner Carousel with smooth transitions */

.hero-carousel {
  position: relative;
  height: 85vh;
  min-height: 600px;
  max-height: 900px;
  width: 100%;
  overflow: hidden;
  margin-top: 68px;
}

@media (max-width: 767.98px) {
  .hero-carousel {
    margin-top: 54px;
  }
}

.hero-carousel .carousel-inner {
  height: 100%;
}

.hero-carousel .carousel-item {
  height: 100%;
  align-items: center;
  justify-content: center;
}

/* Ensure flex display on active items */
.hero-carousel .carousel-item.active,
.hero-carousel .carousel-item-next,
.hero-carousel .carousel-item-prev {
  display: flex !important;
}

/* Slide background image styling */
.carousel-image-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* Light premium mask overlay for text readability */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(248, 250, 252, 0.4) 100%);
  z-index: 2;
}



/* Typography & CTAs container */
.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  max-width: 800px;
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: var(--space-6) var(--space-4);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

@media (min-width: 768px) {
  .hero-content {
    width: 100%;
    margin: 0 auto;
    padding: var(--space-8) var(--space-10);
  }
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-4);
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title {
  color: var(--text-heading);
  margin-bottom: var(--space-6);
  text-shadow: none;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: inline-block;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

.hero-description {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--text-main);
  max-width: 700px;
  margin: 0 auto var(--space-10) auto;
  text-shadow: none;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CTA buttons wrapper */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active transitions */
.carousel-item.active .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.carousel-item.active .hero-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.carousel-item.active .hero-description {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.carousel-item.active .hero-buttons {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.65s;
}

/* Reset states when not active to enable exit animations */
.carousel-item:not(.active) .hero-subtitle,
.carousel-item:not(.active) .hero-title,
.carousel-item:not(.active) .hero-description,
.carousel-item:not(.active) .hero-buttons {
  opacity: 0;
  transform: translateY(20px);
  transition: none; /* Instant reset to avoid messy layout during slide fade out */
}

/* Custom indicators */
.hero-carousel .carousel-indicators {
  z-index: 5;
  margin-bottom: var(--space-8);
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-muted);
  opacity: 0.35;
  margin: 0 6px;
  border: none;
  transition: all var(--transition-normal);
}

.hero-carousel .carousel-indicators .active {
  width: 24px;
  border-radius: 5px;
  background-color: var(--primary);
  opacity: 1;
}

/* Custom controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 46px;
  height: 46px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  opacity: 0;
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  color: var(--text-heading);
}

.hero-carousel .carousel-control-prev {
  left: 24px;
}

.hero-carousel .carousel-control-next {
  right: 24px;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
  opacity: 1;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 70, 100, 0.2);
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  background-image: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
}

.hero-carousel .carousel-control-prev-icon::before {
  content: '\F284'; /* bootstrap icon chevron-left */
  font-family: 'bootstrap-icons';
  font-size: 1.2rem;
  font-weight: bold;
}

.hero-carousel .carousel-control-next-icon::before {
  content: '\F285'; /* bootstrap icon chevron-right */
  font-family: 'bootstrap-icons';
  font-size: 1.2rem;
  font-weight: bold;
}
