:root {
  --tssfc-navy: #082a52;
  --tssfc-orange: #df5f22;
  --tssfc-muted: #213b55;
  --tssfc-dot: rgba(8, 42, 82, 0.22);
}

/* The Platform theme reserves the hero slot. This plugin supplies the carousel only. */
.tss-hero-carousel-reserve {
  pointer-events: auto !important;
  overflow: visible !important;
  z-index: 4 !important;
}

.tssfc,
.tssfc * {
  box-sizing: border-box;
}

.tssfc {
  --tssfc-card-depth: 16px;
  --tssfc-perspective: 1000px;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 272px 44px 96px 18px;
  align-content: start;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tssfc-navy);
  isolation: isolate;
}

.tssfc__header {
  text-align: center;
  padding: 0 10px;
}

.tssfc__header h2 {
  margin: 0;
  color: var(--tssfc-navy);
  font-size: clamp(25px, 2.25vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 760;
}

.tssfc__header p {
  margin: 6px 0 0;
  color: var(--tssfc-orange);
  font-size: clamp(12px, 0.95vw, 15px);
  line-height: 1.3;
}

.tssfc__stage {
  position: relative;
  min-height: 272px;
  margin-top: -2px;
  outline: none;
  touch-action: pan-y;
}

.tssfc__stage:focus-visible {
  outline: 3px solid rgba(66, 133, 181, 0.35);
  outline-offset: 4px;
  border-radius: 18px;
}

.tssfc__viewport {
  position: absolute;
  inset: 0 20px;
  overflow: visible;
  perspective: var(--tssfc-perspective);
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
}

.tssfc__card {
  --tssfc-x: 0px;
  --tssfc-y: 0px;
  --tssfc-rotate: 0deg;
  --tssfc-scale: 1;
  --tssfc-opacity: 1;
  --tssfc-z: 1;
  --tssfc-card-width: 158px;

  position: absolute;
  left: 50%;
  top: 48%;
  width: var(--tssfc-card-width);
  aspect-ratio: 0.625;
  transform:
    translate(-50%, -50%)
    translate3d(var(--tssfc-x), var(--tssfc-y), 0)
    rotateY(var(--tssfc-display-angle, var(--tssfc-rotate)))
    rotateX(-4deg)
    scale(var(--tssfc-scale));
  transform-origin: center center;
  /* Opacity and filters on a 3D parent flatten its child faces. */
  opacity: 1;
  filter: none;
  overflow: visible;
  transform-style: preserve-3d;
  z-index: var(--tssfc-z);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: transform 620ms cubic-bezier(0.2, 0.78, 0.2, 1);
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}

.tssfc__card[data-position="hidden"] {
  visibility: hidden;
  pointer-events: none;
}

.tssfc__card[data-position="0"] {
  cursor: pointer;
  --tssfc-display-angle: -17deg;
}

.tssfc__card[data-position]:not([data-position="0"]):not([data-position="hidden"]) {
  cursor: pointer;
}

.tssfc__card:focus-visible {
  outline: 3px solid rgba(223, 95, 34, 0.62);
  outline-offset: 5px;
}

.tssfc__cover,
.tssfc__cover img {
  display: block;
  width: 100%;
  height: 100%;
}

.tssfc__cover {
  position: absolute;
  inset: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  box-shadow: 1px 2px 5px rgba(8, 30, 50, 0.18);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 4px;
  background: var(--tssfc-cover-background, #233a4a);
}

.tssfc__cover img {
  object-fit: contain;
  object-position: center;
}


/* Solid card faces sit behind the existing front plane. The layout, sizing
   calculations, links and navigation remain owned by the original carousel. */
.tssfc__card[data-position="-1"] { --tssfc-display-angle: 32deg; }
.tssfc__card[data-position="1"] { --tssfc-display-angle: -32deg; }
.tssfc__card[data-position="-2"] { --tssfc-display-angle: 43deg; }
.tssfc__card[data-position="2"] { --tssfc-display-angle: -43deg; }

.tssfc__book {
  position: absolute;
  inset: 0;
  display: block;
  overflow: visible;
  transform-style: preserve-3d;
  pointer-events: none;
}
.tssfc__book::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  background: #122a42;
  transform: translateZ(calc(-1 * var(--tssfc-card-depth) - 1px));
  box-shadow: 7px 17px 19px rgba(8, 32, 55, .23);
}
.tssfc__card[data-position="0"] .tssfc__book::before {
  box-shadow: 8px 20px 24px rgba(8, 32, 55, .3);
}
.tssfc__face {
  position: absolute;
  display: block;
  pointer-events: none;
  backface-visibility: hidden;
}
.tssfc__face--back {
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(115deg, #244767, #102b45);
  transform: translateZ(calc(-1 * var(--tssfc-card-depth))) rotateY(180deg);
}
.tssfc__face--spine {
  left: 0;
  top: 0;
  width: var(--tssfc-card-depth);
  height: 100%;
  transform-origin: left center;
  transform: translateZ(calc(-1 * var(--tssfc-card-depth))) rotateY(-90deg);
  background: linear-gradient(to right, #102c47, #315976 36%, #244961 78%, #17384f);
  border-top: 1px solid #50738b;
  border-bottom: 1px solid #102c47;
}
.tssfc__face--pages {
  left: 100%;
  top: 2px;
  width: var(--tssfc-card-depth);
  height: calc(100% - 4px);
  transform-origin: left center;
  transform: rotateY(90deg);
  background: repeating-linear-gradient(to right, #e3e7e8 0, #f8f7f2 1px, #c8d2d9 2px, #f5f4ef 3px);
  border-inline: 1px solid #476277;
}
.tssfc__face--top,
.tssfc__face--bottom {
  left: 2px;
  width: calc(100% - 4px);
  height: var(--tssfc-card-depth);
  transform-origin: center top;
  background: repeating-linear-gradient(to bottom, #e3e7e8 0, #f8f7f2 1px, #c8d2d9 2px, #f5f4ef 3px);
  border-block: 1px solid #476277;
}
.tssfc__face--top {
  top: 0;
  transform: translateZ(calc(-1 * var(--tssfc-card-depth))) rotateX(90deg);
}
.tssfc__face--bottom {
  top: 100%;
  transform: rotateX(-90deg);
}
.tssfc__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255,255,255,.24), transparent 22%, transparent 75%, rgba(9,26,45,.12));
  box-shadow: inset 4px 0 6px rgba(255,255,255,.08), inset -2px 0 4px rgba(9,26,45,.18);
}

.tssfc__new {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 5px;
  background: var(--tssfc-orange);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.045em;
}

.tssfc__controls {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -8px;
}

.tssfc__arrow {
  position: relative;
  z-index: 12;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--tssfc-navy);
  color: #fff;
  box-shadow: 0 12px 24px rgba(8, 42, 82, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.tssfc__arrow:hover {
  background: #0d3b6f;
  transform: scale(1.05);
}

.tssfc__arrow:focus-visible {
  outline: 3px solid rgba(223, 95, 34, 0.55);
  outline-offset: 3px;
}

.tssfc__arrow span {
  display: block;
  margin-top: -4px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.tssfc.has-one-item .tssfc__controls { display: none; }

.tssfc__details {
  min-height: 96px;
  margin-top: -1px;
  padding: 0 12px;
  text-align: center;
}

.tssfc__details h3 {
  margin: 0;
  color: var(--tssfc-navy);
  font-size: clamp(22px, 1.82vw, 29px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.tssfc__meta,
.tssfc__type {
  margin: 7px 0 0;
  color: var(--tssfc-muted);
  font-size: clamp(13px, 1.04vw, 16px);
  line-height: 1.22;
}

.tssfc__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  color: var(--tssfc-orange);
  text-decoration: none;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.2;
  font-weight: 650;
}

.tssfc__link:hover {
  color: #b84414;
}

.tssfc__dots {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding-top: 1px;
}

.tssfc__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tssfc-dot);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.tssfc__dot:hover {
  transform: scale(1.15);
}

.tssfc__dot.is-active {
  background: var(--tssfc-orange);
}

.tssfc__dot:focus-visible {
  outline: 2px solid var(--tssfc-navy);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .tssfc__viewport {
    inset-inline: 16px;
  }
}

@media (max-width: 820px) {
  /* The Platform theme hides the reserved desktop slot at this breakpoint. A shortcode instance placed elsewhere remains responsive. */
  .tssfc {
    min-height: 0;
  }

  .tssfc__header h2 {
    font-size: 29px;
  }

  .tssfc__viewport {
    inset-inline: 14px;
  }
}

@media (max-width: 560px) {
  .tssfc {
    min-height: 0;
    grid-template-rows: auto 236px 42px 92px 18px;
  }

  .tssfc__header h2 {
    font-size: 26px;
  }

  .tssfc__header p {
    font-size: 12px;
  }

  .tssfc__stage {
    min-height: 236px;
  }

  .tssfc__viewport {
    inset-inline: 10px;
  }

  .tssfc__arrow {
    width: 40px;
    height: 40px;
  }

  .tssfc__controls {
    min-height: 42px;
    gap: 10px;
  }

  .tssfc__details h3 {
    font-size: 23px;
  }

  .tssfc__dots {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tssfc__card,
  .tssfc__arrow,
  .tssfc__dot {
    transition: none;
  }
}

.tssfc [data-tssfc-link][aria-disabled="true"], .tssfc [data-tssfc-preview-link][aria-disabled="true"] { cursor: default; text-decoration: none; opacity: .75; }
