/**
 * Hero Banner Component - Swiper Slider
 *
 * Slider with multiple banner images from database
 * Uses Swiper.js for carousel functionality
 * Design: BEM naming, CSS custom properties, mobile-first
 */

/* =============================================
 * HERO BANNER SECTION
 * ============================================= */

.hero-banner {
  position: relative;
  min-height: auto;
  background: transparent;
  /* Remove background */
  overflow: visible;
  /* Allow cards to overlap */
  padding: 0;
}

/* Background patterns - Hidden */
.hero-banner__bg-pattern-left,
.hero-banner__bg-pattern-right {
  display: none;
  /* Hide decorative patterns */
}

/* =============================================
 * SWIPER CONTAINER
 * ============================================= */

.swiper-hero-banner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  /* Full width for banner */
  margin: 0 auto;
  padding: 0;
  /* No padding - full width image */
}

/* Swiper wrapper and slides */
.swiper-hero-banner .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.swiper-hero-banner .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.swiper-hero-banner .swiper-slide-active {
  opacity: 1;
}

/* =============================================
 * BANNER SLIDE - Image Only
 * ============================================= */

.hero-banner__slide {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
}

.hero-banner__slide picture {
  display: block;
  width: 100%;
  height: auto;
}

.hero-banner__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

/* Banner Slide Link - Makes entire banner clickable */
.banner-slide-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

/* Default slide without image */
.hero-banner__slide--default {
  background: linear-gradient(135deg, #F8F9FE 0%, #FFFFFF 100%);
  min-height: 400px;
}

.hero-banner__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
  font-size: var(--font-size-14);
}

/* =============================================
 * SWIPER NAVIGATION - HIDDEN
 * ============================================= */

.hero-banner__nav {
  display: none;
  /* Hide navigation buttons */
}

/* =============================================
 * SWIPER PAGINATION - Centered in feature cards overlay
 * ============================================= */

.hero-banner__pagination {
  position: absolute;
  bottom: 140px;
  /* Position at center where cards overlap banner */
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
  /* Above feature cards */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2, 8px);
}

/* Override Swiper default styles */
.hero-banner__pagination.swiper-pagination-horizontal {
  width: 100%;
  left: 0;
  transform: none;
}

.hero-banner__pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--color-gray-300, #D1D5DB);
  border: none;
  border-radius: 50%;
  opacity: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

.hero-banner__pagination .swiper-pagination-bullet:hover {
  background: var(--color-gray-400, #9CA3AF);
}

.hero-banner__pagination .swiper-pagination-bullet-active {
  background: var(--color-primary, #4564ED);
  transform: scale(1.2);
}

/* =============================================
 * RESPONSIVE - TABLET
 * ============================================= */

@media (min-width: 768px) {
  .swiper-hero-banner {
    padding: 0;
  }

  .hero-banner__slide--default {
    min-height: 400px;
  }

  .hero-banner__pagination {
    bottom: 110px;
    /* Adjusted for tablet feature cards overlap */
  }
}

/* =============================================
 * RESPONSIVE - DESKTOP
 * ============================================= */

@media (min-width: 1024px) {
  .swiper-hero-banner {
    padding: 0;
  }

  .hero-banner__slide--default {
    min-height: 500px;
  }

  .hero-banner__pagination {
    bottom: 140px;
    /* Center of feature cards overlap */
  }

  .hero-banner__pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
  }
}

/* =============================================
 * RESPONSIVE - MOBILE
 * ============================================= */

@media (max-width: 767px) {
  .hero-banner {
    padding-bottom: 0;
    /* No overlap on mobile */
  }

  .hero-banner__pagination {
    bottom: 16px;
    /* Position above feature cards on mobile */
  }

  .hero-banner__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
  }
}

/* =============================================
 * ACCESSIBILITY & UTILITIES
 * ============================================= */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

  .hero-banner__slide,
  .swiper-hero-banner .swiper-slide,
  .hero-banner__nav {
    transition: none;
  }
}

/* Focus states for keyboard navigation */
.hero-banner__nav:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.swiper-pagination-bullet:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}