/* ==========================================================================
   Events Slider — events-slider.css
   Infinite auto-cycling band of event flyers ([aumbase_events_slider]).
   ========================================================================== */

.aumbase-events-slider {
  --aumbase-slider-card-w: 448px;   /* overridden inline from shortcode (4:5) */
  --aumbase-slider-card-h: 560px;
  --aumbase-slider-gap: 56px;       /* space between flyers */
  --aumbase-slider-pad-y: 56px;     /* breathing room above + below the band */
  --aumbase-slider-fade: #ffffff;   /* edge fade color — match page background */

  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: var(--aumbase-slider-pad-y) 0;
}

/* Full-bleed: break out of the Divi column to span the whole viewport */
.aumbase-events-slider--bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ==========================================================================
   Viewport + Track
   ========================================================================== */

.aumbase-events-slider__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;            /* Firefox */
  -ms-overflow-style: none;         /* IE/Edge */
  -webkit-overflow-scrolling: touch;
}

.aumbase-events-slider__viewport::-webkit-scrollbar {
  display: none;                    /* WebKit */
}

.aumbase-events-slider__track {
  display: flex;
  gap: var(--aumbase-slider-gap);
  width: max-content;
  padding: 6px 28px;                /* lead-in space + room for hover lift */
}

/* ==========================================================================
   Card
   ========================================================================== */

.aumbase-events-slider__card {
  flex: 0 0 auto;
  width: var(--aumbase-slider-card-w);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease;
}

.aumbase-events-slider__card:hover {
  transform: translateY(-6px);
  text-decoration: none;
  color: inherit;
}

.aumbase-events-slider__image-wrap {
  position: relative;
  width: 100%;
  height: var(--aumbase-slider-card-h);
  aspect-ratio: 4 / 5;              /* enforced 4:5 flyer ratio */
  overflow: hidden;
  border-radius: 8px;
  background: var(--aumbase-purple-light, rgba(120, 82, 169, 0.05));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
}

.aumbase-events-slider__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aumbase-events-slider__no-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.aumbase-events-slider__no-image .dashicons {
  font-size: 64px;
  width: 64px;
  height: 64px;
  color: var(--aumbase-purple, #7852a9);
  opacity: 0.25;
}

/* ==========================================================================
   Date Badge (mirrors the grid badge)
   ========================================================================== */

.aumbase-events-slider__date-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--aumbase-gold, #f9a109);
  color: var(--aumbase-white, #fff);
  border-radius: 6px;
  padding: 8px 12px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  min-width: 54px;
  z-index: 1;
}

.aumbase-events-slider__date-month {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.aumbase-events-slider__date-day {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2px;
}

.aumbase-events-slider__date-badge--schedule {
  padding: 8px 14px;
  min-width: auto;
}

.aumbase-events-slider__date-schedule {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* ==========================================================================
   Title
   ========================================================================== */

.aumbase-events-slider__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--aumbase-text, #555);
  margin: 0;
  padding: 12px 4px 0;
  line-height: 1.35;
  text-align: center;
  transition: color 0.15s ease;
}

.aumbase-events-slider__card:hover .aumbase-events-slider__title {
  color: var(--aumbase-gold, #f9a109);
}

/* ==========================================================================
   Edge Fades — soft "off the screen" look
   ========================================================================== */

.aumbase-events-slider::before,
.aumbase-events-slider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}

.aumbase-events-slider::before {
  left: 0;
  background: linear-gradient(to right, var(--aumbase-slider-fade), rgba(255, 255, 255, 0));
}

.aumbase-events-slider::after {
  right: 0;
  background: linear-gradient(to left, var(--aumbase-slider-fade), rgba(255, 255, 255, 0));
}

/* ==========================================================================
   Arrows
   ========================================================================== */

.aumbase-events-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--aumbase-white, #fff);
  color: var(--aumbase-purple, #7852a9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  line-height: 1;
  padding: 0 0 4px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.aumbase-events-slider__arrow:hover {
  background: var(--aumbase-gold, #f9a109);
  color: var(--aumbase-white, #fff);
}

.aumbase-events-slider__arrow:focus-visible {
  outline: 2px solid var(--aumbase-purple, #7852a9);
  outline-offset: 2px;
}

.aumbase-events-slider__arrow--prev {
  left: 16px;
}

.aumbase-events-slider__arrow--next {
  right: 16px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  .aumbase-events-slider {
    /* Shrink the flyers on small screens (keeps 4:5 via aspect-ratio) */
    --aumbase-slider-card-w: 280px;
    --aumbase-slider-card-h: 350px;
    --aumbase-slider-gap: 28px;
    --aumbase-slider-pad-y: 36px;
  }

  .aumbase-events-slider__image-wrap {
    height: auto; /* let aspect-ratio drive height from the smaller width */
  }

  .aumbase-events-slider::before,
  .aumbase-events-slider::after {
    width: 40px;
  }

  .aumbase-events-slider__arrow {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   Reduced Motion — no auto-scroll, no hover lift (JS also halts the loop)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .aumbase-events-slider__card,
  .aumbase-events-slider__title,
  .aumbase-events-slider__arrow {
    transition: none;
  }
}
