@charset "utf-8";

/* =========================================================
   File: electpress-carousel.css

   Electpress HTML-Only Carousel
   Namespace: epU

   BEHAVIOR:
   - Shows all cards when they fit
   - Scrolls horizontally when cards do not fit
   - Touch/swipe compatible with iPhone/iPad
   - First card aligns with left edge
   - No JavaScript required
========================================================= */


/* =========================================================
   OUTER CAROUSEL WRAPPER
========================================================= */

.ep-carousel-wrap {
  width: 100%;

  /*
     Prevent legacy table/flex layouts from allowing
     the carousel to become wider than the screen.
  */
  max-width: min(1290px, calc(100vw - 32px));

  min-width: 0;

  margin: 0 auto;

  padding: 10px 16px 20px;

  box-sizing: border-box;

  overflow: visible;
}


/* =========================================================
   CAROUSEL CONTAINER
========================================================= */

.epU {
  position: relative;

  display: block;

  width: 100%;

  max-width: 100%;

  min-width: 0;

  margin: 0;

  padding: 0;

  box-sizing: border-box;

  overflow: visible;
}


/* =========================================================
   SCROLLING VIEWPORT

   IMPORTANT:
   This element handles scrolling only.

   The oversized card row is contained inside
   .epU-track below.
========================================================= */

.epU-viewport {
  display: block;

  position: relative;

  width: 100%;

  max-width: 100%;

  min-width: 0;

  margin: 0;

  padding: 10px 0 18px;

  box-sizing: border-box;

  overflow-x: auto;

  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;

  scroll-behavior: smooth;

  scroll-snap-type: x proximity;

  overscroll-behavior-x: contain;

  /*
     Allows normal vertical page scrolling while
     horizontal movement remains available.
  */
  touch-action: pan-x pan-y;

  /*
     Firefox scrollbar
  */
  scrollbar-width: auto;

  scrollbar-color: #8a8a8a #e8e8e8;
}


/* =========================================================
   INNER TRACK

   THIS IS THE IMPORTANT CHANGE.

   width:max-content forces the row to retain the
   combined width of all cards.

   min-width:100% allows the track to fill the viewport
   when only a few cards are present.
========================================================= */

.epU-track {
  display: flex;

  flex-direction: row;

  flex-wrap: nowrap;

  justify-content: flex-start;

  align-items: stretch;

  width: max-content;

  min-width: 100%;

  gap: 16px;

  margin: 0;

  padding: 0;

  box-sizing: border-box;
}


/* =========================================================
   HORIZONTAL SCROLLBAR
   CHROME / EDGE / SAFARI
========================================================= */

.epU-viewport::-webkit-scrollbar {
  height: 12px;
}

.epU-viewport::-webkit-scrollbar-track {
  background: #e8e8e8;

  border-radius: 6px;
}

.epU-viewport::-webkit-scrollbar-thumb {
  background: #8a8a8a;

  border-radius: 6px;

  border: 2px solid #e8e8e8;
}

.epU-viewport::-webkit-scrollbar-thumb:hover {
  background: #555555;
}


/* =========================================================
   KEYBOARD FOCUS
========================================================= */

.epU-viewport:focus {
  outline: 2px solid #0099ff;

  outline-offset: 3px;
}


/* =========================================================
   CAROUSEL CARD
========================================================= */

.epU-card {
  flex: 0 0 220px;

  width: 220px;

  min-width: 220px;

  max-width: 220px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: flex-start;

  margin: 0;

  padding: 12px;

  background: #ffffff;

  border: 1px solid #d8d8d8;

  border-radius: 8px;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

  text-align: center;

  box-sizing: border-box;

  scroll-snap-align: start;
}


/* =========================================================
   CARD IMAGE LINK
========================================================= */

.epU-card > a {
  display: block;

  width: 100%;

  text-align: center;
}


/* =========================================================
   CARD IMAGE
========================================================= */

.epU-card img {
  display: block;

  width: 100%;

  max-width: 100%;

  height: auto;

  margin: 0 auto;

  border: 0;

  object-fit: contain;

  /*
     Helps prevent image dragging from interfering
     with horizontal carousel movement.
  */
  -webkit-user-drag: none;

  user-select: none;
}


/* =========================================================
   CARD TITLE
========================================================= */

.epU-title {
  width: 100%;

  margin: 12px 0 4px;

  padding: 0;

  font-size: 15px;

  font-weight: 700;

  line-height: 1.35;

  text-align: center;
}


/* =========================================================
   CARD TITLE LINKS
========================================================= */

.epU-title a,
.epU-title a:link,
.epU-title a:visited {
  color: #0066cc;

  text-decoration: none;
}

.epU-title a:hover,
.epU-title a:focus {
  color: #f39c12;

  text-decoration: underline;
}


/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 768px) {

  .ep-carousel-wrap {
    max-width: calc(100vw - 24px);

    padding-left: 12px;

    padding-right: 12px;
  }


  .epU-track {
    gap: 14px;
  }


  .epU-card {
    flex: 0 0 200px;

    width: 200px;

    min-width: 200px;

    max-width: 200px;
  }

}


/* =========================================================
   PHONE
========================================================= */

@media screen and (max-width: 480px) {

  .ep-carousel-wrap {
    max-width: calc(100vw - 16px);

    padding-left: 8px;

    padding-right: 8px;
  }


  .epU-viewport {
    width: 100%;

    max-width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
  }


  .epU-track {
    gap: 12px;
  }


  .epU-card {
    flex: 0 0 180px;

    width: 180px;

    min-width: 180px;

    max-width: 180px;
  }


  .epU-title {
    font-size: 14px;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .epU-viewport {
    scroll-behavior: auto;
  }

}