/**
 * @file
 * WMD Solutions Base Theme - Swiper carousel styles.
 * Ties Swiper's theming into the WMD CSS variable system.
 * Override variables in your subtheme CSS file.
 */

/* ======================================================
   SWIPER VARIABLE OVERRIDES
   ====================================================== */

:root {
  --swiper-theme-color: var(--color-accent);
  --swiper-pagination-bullet-inactive-color: var(--color-secondary);
  --swiper-pagination-bullet-inactive-opacity: 0.4;
  --swiper-pagination-bullet-size: 10px;
  --swiper-pagination-bullet-horizontal-gap: 5px;
  --swiper-navigation-color: var(--color-accent);
  --swiper-navigation-size: 24px;
}

/* ======================================================
   BASE CAROUSEL CONTAINER
   ====================================================== */

.wmd-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.wmd-carousel .swiper-wrapper {
  align-items: stretch;
}

.wmd-carousel .swiper-pagination {
  position: relative;
  margin-top: 1.5rem;
}

/* ======================================================
   TESTIMONIAL CAROUSEL
   ====================================================== */

.wmd-carousel[data-wmd-type="testimonial"] {
  padding: 0 3rem;
}

.wmd-carousel[data-wmd-type="testimonial"] .swiper-slide {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 0;
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-image {
  flex: 0 0 180px;
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-image img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-body {
  flex: 1;
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-body blockquote,
.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-name {
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-text);
}

.wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-subtitle {
  font-size: 0.85rem;
  color: var(--color-secondary);
}

@media (max-width: 767px) {
  .wmd-carousel[data-wmd-type="testimonial"] {
    padding: 0 2rem;
  }
  .wmd-carousel[data-wmd-type="testimonial"] .swiper-slide {
    flex-direction: column;
    text-align: center;
  }
  .wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-image {
    flex: 0 0 120px;
  }
  .wmd-carousel[data-wmd-type="testimonial"] .wmd-testimonial-image img {
    width: 120px;
    height: 120px;
  }
}

/* ======================================================
   GALLERY CAROUSEL
   ====================================================== */

.wmd-carousel[data-wmd-type="gallery"] .swiper-slide {
  width: auto;
}

.wmd-carousel[data-wmd-type="gallery"] .swiper-slide img {
  height: 300px;
  width: auto;
  object-fit: cover;
  display: block;
}

/* ======================================================
   CARDS CAROUSEL
   ====================================================== */

.wmd-carousel[data-wmd-type="cards"] .swiper-slide {
  height: auto;
}

/* ======================================================
   NAVIGATION BUTTONS
   ====================================================== */

.wmd-carousel .swiper-button-prev,
.wmd-carousel .swiper-button-next {
  color: var(--swiper-navigation-color);
}

.wmd-carousel .swiper-button-prev:after,
.wmd-carousel .swiper-button-next:after {
  font-size: var(--swiper-navigation-size);
}

/* ======================================================
   SLIDESHOW (wmd_slideshow block type)
   ====================================================== */

.wmd-slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Height modes - mirrors hero banner */
.wmd-slideshow.hero-height--full {
  height: calc(100vh - var(--drupal-displace-offset-top, 0px));
}

.wmd-slideshow.hero-height--half {
  height: 50vh;
  min-height: 300px;
}

.wmd-slideshow.hero-height--auto {
  height: auto;
  min-height: var(--hero-min-height, 400px);
}

/* Slides */
.wmd-slideshow .swiper-wrapper,
.wmd-slideshow .swiper-slide {
  height: 100%;
}

.wmd-slideshow .wmd-slide {
  position: relative;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay */
.wmd-slideshow .wmd-slide__overlay {
  position: absolute;
  inset: 0;
  background-color: #000000;
  z-index: 1;
  pointer-events: none;
}

/* Slide content */
.wmd-slideshow .wmd-slide__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--hero-content-padding, 4rem 0);
}

/* Light text (default) */
.wmd-slideshow .hero-text--light .wmd-slide__title,
.wmd-slideshow .hero-text--light .wmd-slide__caption {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Dark text */
.wmd-slideshow .hero-text--dark .wmd-slide__title,
.wmd-slideshow .hero-text--dark .wmd-slide__caption {
  color: var(--color-text);
}

.wmd-slideshow .wmd-slide__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.wmd-slideshow .wmd-slide__caption {
  font-size: clamp(1rem, 2vw, 1.4rem);
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Nav buttons */
.wmd-slideshow .swiper-button-prev,
.wmd-slideshow .swiper-button-next {
  color: rgba(255, 255, 255, 0.8);
}

.wmd-slideshow .swiper-button-prev:hover,
.wmd-slideshow .swiper-button-next:hover {
  color: #ffffff;
}

/* Pagination dots */
.wmd-slideshow .swiper-pagination {
  position: absolute;
  bottom: 1.5rem;
}

.wmd-slideshow .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.wmd-slideshow .swiper-pagination-bullet-active {
  background: #ffffff;
}
