/**
 * Swiper Custom Styles
 *
 * Custom styling for Swiper sliders
 * Overrides and additions to default Swiper styles
 */

/* ============================================
   NAVIGATION ARROWS
   ============================================ */

.swiper-wrapper {
  flex-direction: row;
}

.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  color: var(--primary-color, #2f6a50);
  transition: all 300ms ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px;
  font-weight: bold;
}

/* Arrow variants */
.swiper-arrows-light .swiper-button-next,
.swiper-arrows-light .swiper-button-prev {
  color: #ffffff;
}

.swiper-arrows-dark .swiper-button-next,
.swiper-arrows-dark .swiper-button-prev {
  color: #000000;
}

/* Arrow positioning variants */
.swiper-arrows-outside {
  padding: 0 60px;
}

.swiper-arrows-outside .swiper-button-next {
  right: 0;
}

.swiper-arrows-outside .swiper-button-prev {
  left: 0;
}

/* ============================================
   PAGINATION
   ============================================ */

.swiper-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--primary-color, #2f6a50);
  opacity: 0.3;
  transition: all 300ms ease;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.3);
}

/* Pagination variants */
.swiper-pagination-light .swiper-pagination-bullet {
  background: #ffffff;
}

.swiper-pagination-dark .swiper-pagination-bullet {
  background: #000000;
}

/* Progressbar pagination */
.swiper-pagination-progressbar {
  background: rgba(0, 0, 0, 0.1);
}

.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
  background: var(--primary-color, #2f6a50);
}

/* ============================================
   SCROLLBAR
   ============================================ */

.swiper-scrollbar {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.swiper-scrollbar-drag {
  background: var(--primary-color, #2f6a50);
  border-radius: 10px;
  cursor: grab;
}

.swiper-scrollbar-drag:active {
  cursor: grabbing;
}

/* ============================================
   SLIDE TRANSITIONS
   ============================================ */

.swiper-slide {
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

/* Fade effect enhancement */
.swiper-fade .swiper-slide {
  pointer-events: none;
}

.swiper-fade .swiper-slide-active {
  pointer-events: auto;
}

/* ============================================
   RESPONSIVE HELPERS
   ============================================ */

/* Hide navigation on mobile if needed */
@media only screen and (max-width: 768px) {
  .swiper-hide-arrows-mobile .swiper-button-next,
  .swiper-hide-arrows-mobile .swiper-button-prev {
    display: none;
  }
}

/* ============================================
   CUSTOM VARIANTS
   ============================================ */

/* Full width slider */
.swiper-full-width {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Centered slides variant */
.swiper-centered {
  overflow: visible;
}

.swiper-centered .swiper-slide {
  opacity: 0.5;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.swiper-centered .swiper-slide-active {
  opacity: 1;
  transform: scale(1.1);
  z-index: 2;
}

/* Card style slides */
.swiper-cards .swiper-slide {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Image slider optimizations */
.swiper-images .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lazy loading */
.swiper-lazy {
  opacity: 0;
  transition: opacity 300ms ease;
}

.swiper-lazy-loaded {
  opacity: 1;
}

.swiper-lazy-preloader {
  width: 42px;
  height: 42px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -21px;
  margin-top: -21px;
  z-index: 10;
  transform-origin: 50%;
  animation: swiper-preloader-spin 1s infinite linear;
  border: 4px solid var(--primary-color, #2f6a50);
  border-radius: 50%;
  border-top-color: transparent;
}

@keyframes swiper-preloader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================
   EQUAL HEIGHT SLIDES
   ============================================ */

/* Force all slides to match tallest slide height */
.swiper-equal-height .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.swiper-equal-height .swiper-slide {
  height: auto;
  display: flex;
  flex-direction: column;
}

/* Ensure card content fills entire slide height */
.swiper-equal-height .swiper-slide > * {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Specific fix for testimonial cards */
.testimonialSwiper-wrapper {
  display: flex;
  align-items: stretch;
}

.testimonialSwiper-slide {
  height: auto;
  display: flex;
  flex-direction: column;
}

.testimonialSwiper-slide .ws-testimonials-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

/* Make text area flexible to fill space */
.testimonialSwiper-slide .ws-testimonials-card-text {
  flex: 1;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.swiper-button-next:focus,
.swiper-button-prev:focus,
.swiper-pagination-bullet:focus {
  outline: 2px solid var(--primary-color, #2f6a50);
  outline-offset: 2px;
}

/* ============================================
   CUSTOM BREAKPOINT ALIGNMENTS
   ============================================ */

/* Match theme breakpoints */
@media only screen and (min-width: 1650px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 50px;
    height: 50px;
  }

  .swiper-button-next::after,
  .swiper-button-prev::after {
    font-size: 24px;
  }

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