/* SSC Blog Photo Swipe. Every rule is scoped to #ssc-swipe so it beats the theme's button and link styles. */

#ssc-swipe {
  color: #334155;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

#ssc-swipe,
#ssc-swipe * {
  box-sizing: border-box;
}

#ssc-swipe a {
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

#ssc-swipe button {
  margin: 0;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#ssc-swipe h2,
#ssc-swipe p {
  margin: 0;
  padding: 0;
}

#ssc-swipe :focus-visible {
  outline: 3px solid #926d23;
  outline-offset: 2px;
}

#ssc-swipe .ssw-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Scroll reveal: only hides once the script has confirmed it can show it again */
#ssc-swipe.ssw-ready [data-ssw-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

#ssc-swipe.ssw-ready [data-ssw-reveal].is-shown {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

/* Heading and controls */
#ssc-swipe .ssw-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

#ssc-swipe .ssw-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ssc-swipe .ssw-kicker {
  color: #926d23;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .72px;
  text-transform: uppercase;
}

#ssc-swipe h2 {
  color: #20213e;
  font-size: clamp(1.75rem, 4.5vw, 2.3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}

#ssc-swipe .ssw-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#ssc-swipe .ssw-all {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  color: #4d3ec2;
  font-size: 15px;
  font-weight: 700;
}

#ssc-swipe .ssw-count {
  margin-right: 4px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#ssc-swipe .ssw-nav {
  width: 44px;
  height: 44px;
  border: 1px solid #d8d3ef;
  border-radius: 50%;
  background: #fff;
  color: #4d3ec2;
  font-size: 18px;
  font-weight: 700;
  transition: opacity .2s ease, background-color .15s ease;
}

#ssc-swipe .ssw-nav:hover:not(:disabled) {
  background: #f4f1fc;
}

#ssc-swipe .ssw-nav:disabled {
  opacity: .4;
  cursor: default;
}

/* The swipe row */
#ssc-swipe .ssw-track {
  display: flex;
  gap: 16px;
  padding: 10px 2px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

#ssc-swipe .ssw-track::-webkit-scrollbar {
  display: none;
}

#ssc-swipe .ssw-track.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}

#ssc-swipe .ssw-track.is-dragging a {
  pointer-events: none;
}

#ssc-swipe .ssw-slide {
  flex: 0 0 min(84%, 320px);
  scroll-snap-align: start;
}

#ssc-swipe .ssw-slide-in {
  height: 100%;
}

#ssc-swipe .ssw-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

#ssc-swipe .ssw-card:hover {
  transform: translateY(-4px);
  border-color: #d8d3ef;
  box-shadow: 0 14px 26px rgba(32, 33, 62, .12);
}

/* Photo or designed cover */
#ssc-swipe .ssw-visual {
  position: relative;
  display: block;
  aspect-ratio: 900 / 473;
  overflow: hidden;
  background: #0f6b64;
}

#ssc-swipe .ssw-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  max-width: none;
  object-fit: contain;
  background: #edf3f2;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}

#ssc-swipe .ssw-card:hover .ssw-img {
  transform: scale(1.04);
}

#ssc-swipe .ssw-cover {
  position: absolute;
  inset: 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: #fff;
}

#ssc-swipe .ssw-cover-kicker {
  color: #fcd9a0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

#ssc-swipe .ssw-cover-title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#ssc-swipe .ssw-cover-xl .ssw-cover-title {
  font-size: 32px;
  line-height: 1.05;
}

#ssc-swipe .ssw-cover-l .ssw-cover-title {
  font-size: 24px;
  line-height: 1.12;
}

#ssc-swipe .ssw-cover-m .ssw-cover-title {
  font-size: 18px;
  line-height: 1.18;
}

#ssc-swipe .ssw-cover-rule {
  flex: none;
  width: 40px;
  height: 3px;
  background: #fcd9a0;
}

#ssc-swipe .ssw-cover-sub {
  display: -webkit-box;
  overflow: hidden;
  color: #e3f4f1;
  font-size: 13px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#ssc-swipe .ssw-cover-sub:empty {
  display: none;
}

/* Card text */
#ssc-swipe .ssw-body {
  flex: 1 1 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#ssc-swipe .ssw-meta {
  color: #926d23;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

#ssc-swipe .ssw-title {
  display: -webkit-box;
  overflow: hidden;
  color: #20213e;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#ssc-swipe .ssw-go {
  margin-top: auto;
  padding-top: 4px;
  color: #4d3ec2;
  font-size: 15px;
  font-weight: 700;
}

#ssc-swipe .ssw-arrow {
  display: inline-block;
  transition: transform .18s ease;
}

#ssc-swipe .ssw-card:hover .ssw-arrow {
  transform: translateX(5px);
}

/* Progress */
#ssc-swipe .ssw-bar {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #e2e8f0;
}

#ssc-swipe .ssw-bar-fill {
  width: 30%;
  height: 100%;
  background: #4d3ec2;
  transition: width .2s ease;
}

/* Extra polish where the browser supports it. The row works fine without it. */
@supports (animation-timeline: view()) {
  #ssc-swipe .ssw-slide-in {
    animation: ssw-scale linear both;
    animation-timeline: view(inline);
    animation-range: entry 0% cover 25%;
  }
}

@keyframes ssw-scale {
  from { opacity: .55; transform: scale(.92); }
  to { opacity: 1; transform: none; }
}

/* Touch screens swipe, so the arrows only take up space there */
@media (hover: none) {
  #ssc-swipe .ssw-nav {
    display: none;
  }

  #ssc-swipe .ssw-track {
    cursor: auto;
  }

  #ssc-swipe .ssw-card:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  #ssc-swipe .ssw-wrap {
    padding: 32px 16px;
  }

  #ssc-swipe .ssw-track {
    margin: 0 -16px;
    padding: 10px 16px 18px;
    scroll-padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ssc-swipe,
  #ssc-swipe * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  #ssc-swipe.ssw-ready [data-ssw-reveal] {
    opacity: 1;
    transform: none;
  }
}
