/**
 * GSSMG Before/After Carousel — custom styles.
 * Only covers what Elementor's built-in carousel CSS does not provide.
 */

/* ---- Button row ---- */
.gssmg-bac-buttons {
  display: flex;
  justify-content: center; /* overridden via Elementor selector */
  gap: 10px;               /* overridden via Elementor selector */
  margin-bottom: 24px;
}

/* ---- Individual button ---- */
.gssmg-bac-btn {
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 32px;
  border-radius: 30px;     /* overridden via Elementor selector */
  color: #fff;
  transition: box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}

.gssmg-bac-btn--before { background: #3BBDC4; } /* overridden via Elementor selector */
.gssmg-bac-btn--after  { background: #3D4F5F; } /* overridden via Elementor selector */

.gssmg-bac-btn.is-active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.gssmg-bac-btn:not(.is-active) {
  opacity: 0.7;
}

.gssmg-bac-btn:hover {
  opacity: 1;
}

.gssmg-bac-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---- Gallery visibility ---- */

/*
 * No CSS transition on display toggle — Swiper cannot calculate dimensions
 * while the container is hidden or transitioning.
 */
.gssmg-bac-gallery         { display: none; }
.gssmg-bac-gallery.is-active { display: block; }

/* ---- Swiper container (replaces the .swiper class we removed to prevent Elementor hijacking) ---- */
/* These rules mirror the essential bits of Swiper's own stylesheet, scoped to our wrapper. */
.gssmg-bac-swiper-wrapper {
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  width: 100%;
  list-style: none;
  padding: 0;
  z-index: 1;
  display: block;
}

.gssmg-bac-swiper-wrapper .swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  transition-property: transform;
  box-sizing: content-box;
}

.gssmg-bac-swiper-wrapper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: auto;
  position: relative;
  transition-property: transform;
}

.gssmg-bac-swiper-wrapper .swiper-slide-inner {
  margin: 0;
  padding: 0;
}

/* ---- Pagination dots ---- */
.gssmg-bac-swiper-wrapper {
  padding-bottom: 30px;
}

.gssmg-bac-swiper-wrapper .swiper-pagination {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  text-align: center;
  z-index: 10;
  line-height: 1;
}

.gssmg-bac-swiper-wrapper .swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3D4F5F;
  opacity: 0.3;
  margin: 0 4px;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  border: 0;
  padding: 0;
}

.gssmg-bac-swiper-wrapper .swiper-pagination-bullet-active {
  opacity: 1;
  background: #3BBDC4;
}

/* ---- Navigation arrows ---- */
.gssmg-bac-swiper-wrapper .elementor-swiper-button {
  position: absolute;
  top: calc(50% - 15px);
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #3D4F5F;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s;
}

.gssmg-bac-swiper-wrapper .elementor-swiper-button:hover {
  background: #fff;
}

.gssmg-bac-swiper-wrapper .elementor-swiper-button-prev { left: 10px; }
.gssmg-bac-swiper-wrapper .elementor-swiper-button-next { right: 10px; }

.gssmg-bac-swiper-wrapper .elementor-swiper-button i {
  font-size: 18px;
  line-height: 1;
}

/* ---- Slide images ---- */
.gssmg-bac-gallery .swiper-slide-image {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;       /* overridden via Elementor selector */
  border-radius: 12px;     /* overridden via Elementor selector */
}

/* ---- Editor placeholder notice ---- */
.gssmg-bac-editor-notice {
  padding: 12px 16px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 2px;
}
