/* Jakobs.ai hub – "Prøv noget nyt!" carousel (hub/carousel.js). Prefix jc-. Tablet-first, also phone + desktop. */
.jc {
  position: relative; width: 100%; max-width: 980px; margin: 4px auto 6px;
  font-family: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif; color: var(--ink, #2b3a55);
}
.jc[hidden] { display: none; }

/* ---------- header: "Prøv noget nyt!" + arrows ---------- */
.jc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 8px; }
.jc-head {
  margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 6px 18px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .72);
  box-shadow: 0 4px 0 rgba(43, 58, 85, .1);
  font-size: clamp(20px, 2.8vw, 28px); font-weight: 700; line-height: 1.15; color: var(--ink, #2b3a55);
}
.jc-spark {
  display: inline-block; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  animation: jc-twinkle 2.8s ease-in-out infinite;
}
.jc-arrows { display: flex; gap: 10px; flex: none; }
.jc-arrow {
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: #fff; color: var(--ink, #2b3a55);
  box-shadow: 0 4px 0 rgba(43, 58, 85, .16), 0 6px 14px rgba(43, 58, 85, .12);
  transition: transform .12s ease, box-shadow .12s ease; touch-action: manipulation;
}
.jc-arrow svg { width: 26px; height: 26px; display: block; }
.jc-arrow:hover { box-shadow: 0 0 0 4px var(--sun, #ffd24a), 0 4px 0 rgba(43, 58, 85, .16); }
.jc-arrow:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43, 58, 85, .16); }
.jc-arrow:focus-visible, .jc-dot:focus-visible { outline: 4px solid var(--orange, #ff7a45); outline-offset: 3px; }

/* ---------- slides (stacked in one grid cell: the tallest one sets the height) ---------- */
.jc-viewport {
  position: relative; display: grid; overflow: hidden;
  padding: 6px 8px 18px; margin: -6px -8px -18px; /* room for the card's shadow + focus ring */
  touch-action: pan-y;
}
.jc-slide {
  grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden;
  transform: translateX(56px) scale(.97);
  transition: opacity .45s ease, transform .6s cubic-bezier(.22, .9, .3, 1), visibility 0s linear .6s;
}
.jc-slide.to-left { transform: translateX(-56px) scale(.97); }
.jc-slide.is-on {
  z-index: 1; opacity: 1; visibility: visible; transform: none;
  transition: opacity .5s ease .05s, transform .6s cubic-bezier(.22, .9, .3, 1), visibility 0s;
}

.jc-card {
  position: relative; overflow: hidden; height: 100%;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 30px);
  padding: clamp(12px, 1.8vw, 18px) max(20%, 24px) clamp(12px, 1.8vw, 18px) clamp(14px, 2.6vw, 28px);
  border: 4px solid rgba(255, 255, 255, .8); border-radius: 30px;
  background: linear-gradient(112deg, var(--c-1) 0%, var(--c-1) 34%, var(--c-2) 76%, var(--c-3) 100%);
  box-shadow: 0 7px 0 var(--c-d), 0 12px 24px rgba(43, 58, 85, .18);
  color: var(--ink, #2b3a55); text-decoration: none; cursor: pointer;
  -webkit-user-drag: none; -webkit-touch-callout: none; touch-action: pan-y;
}
.jc-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--orange, #ff7a45), 0 7px 0 var(--c-d); }
.jc-card.going { animation: jc-go .5s ease-in forwards; }

/* soft light bubbles in the background */
.jc-bubbles {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .34) 0 42px, rgba(255, 255, 255, 0) 43px),
    radial-gradient(circle at 72% 96%, rgba(255, 255, 255, .22) 0 70px, rgba(255, 255, 255, 0) 71px),
    radial-gradient(circle at 99% 66%, rgba(255, 255, 255, .2) 0 30px, rgba(255, 255, 255, 0) 31px),
    radial-gradient(circle at 6% 8%, rgba(255, 255, 255, .5) 0 18px, rgba(255, 255, 255, 0) 19px);
}

.jc-deco {
  position: absolute; z-index: 0; pointer-events: none; line-height: 1;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  filter: drop-shadow(0 4px 5px rgba(43, 58, 85, .2));
}
.jc-deco-1 { --r: 12deg; right: 5%; top: 12%; font-size: clamp(44px, 6.6vw, 70px); animation: jc-float 5s ease-in-out infinite; }
.jc-deco-2 { --r: -10deg; right: 12%; bottom: 10%; font-size: clamp(34px, 5vw, 54px); animation: jc-float 6s ease-in-out -2.4s infinite; }

.jc-art {
  --art: clamp(104px, 14.5vw, 158px);
  position: relative; z-index: 1; flex: none; width: var(--art); height: var(--art); border-radius: 23%;
  box-shadow: 0 6px 0 rgba(43, 58, 85, .1), 0 10px 22px rgba(43, 58, 85, .22);
  transform: rotate(-4deg);
}
.jc-art img { display: block; width: 100%; height: 100%; border-radius: 23%; pointer-events: none; }
.jc-slide.is-on .jc-art { animation: jc-hop 3.6s ease-in-out infinite; }

.jc-text { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.jc-title { font-size: clamp(24px, 3.5vw, 38px); font-weight: 700; line-height: 1.05; overflow-wrap: anywhere; }
.jc-tag { font-size: clamp(16px, 2.1vw, 21px); font-weight: 500; line-height: 1.2; opacity: .82; }
.jc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 8px; }
.jc-age {
  font-size: 17px; font-weight: 600; padding: 5px 13px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .9);
}
.jc-play {
  display: inline-flex; align-items: center; gap: 6px; min-height: 58px; padding: 0 26px 0 18px;
  border-radius: 999px; white-space: nowrap; font-size: clamp(20px, 2.5vw, 25px); font-weight: 700; color: #fff;
  background: linear-gradient(180deg, #ff9a5c, var(--orange, #ff7a45));
  box-shadow: 0 5px 0 #d9582a, 0 9px 16px rgba(217, 88, 42, .32);
  transition: transform .12s ease, box-shadow .12s ease;
}
.jc-play svg { width: 26px; height: 26px; flex: none; }
.jc-slide.is-on .jc-play { animation: jc-glow 2.4s ease-in-out infinite; }
.jc-card:hover .jc-play { box-shadow: 0 5px 0 #d9582a, 0 0 0 4px rgba(255, 255, 255, .7); }
.jc-card:active .jc-play { transform: translateY(4px); box-shadow: 0 1px 0 #d9582a; animation: none; }

/* ---------- dots ---------- */
.jc-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; margin-top: 6px; }
.jc-dot {
  min-width: 34px; height: 30px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; touch-action: manipulation;
}
.jc-dot::before {
  content: ''; display: block; width: 13px; height: 13px; border-radius: 7px;
  background: rgba(255, 255, 255, .72); box-shadow: 0 2px 0 rgba(43, 58, 85, .16);
  transition: width .3s ease, background .3s ease;
}
.jc-dot.on::before { width: 32px; background: #fff; box-shadow: inset 0 0 0 4px var(--c), 0 2px 0 rgba(43, 58, 85, .16); }

/* ---------- animations ---------- */
@keyframes jc-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(14deg); } }
@keyframes jc-float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-8px) rotate(var(--r, 0deg)); } }
@keyframes jc-hop {
  0%, 70%, 100% { transform: rotate(-4deg) translateY(0); }
  80% { transform: rotate(-2deg) translateY(-8px); }
  88% { transform: rotate(-5deg) translateY(0); }
}
@keyframes jc-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes jc-go { to { transform: scale(1.03); opacity: .85; } }

/* ---------- phones (portrait): art + title side by side, the button row underneath ---------- */
@media (max-width: 600px) {
  .jc-top { margin-bottom: 6px; }
  .jc-head { font-size: 20px; padding: 5px 14px 5px 8px; }
  .jc-arrows { gap: 8px; }
  .jc-arrow { width: 48px; height: 48px; }
  .jc-arrow svg { width: 24px; height: 24px; }
  .jc-card {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 2px;
    align-items: start; padding: 12px 14px 14px; border-radius: 26px;
  }
  .jc-text { display: contents; }
  .jc-art { --art: 88px; grid-row: 1 / 3; align-self: center; }
  .jc-title { grid-column: 2; align-self: end; font-size: 23px; padding-right: 4px; }
  .jc-tag { grid-column: 2; align-self: start; font-size: 16px; }
  .jc-meta { grid-column: 1 / -1; margin-top: 10px; padding-right: 54px; }
  .jc-age { font-size: 16px; }
  .jc-play { min-height: 52px; font-size: 21px; padding: 0 22px 0 16px; }
  .jc-deco-1 { top: auto; bottom: 14px; right: 12px; font-size: 40px; }
  .jc-deco-2 { display: none; }
}
@media (max-width: 380px) {
  .jc-head { font-size: 18px; }
  .jc-art { --art: 76px; }
  .jc-title { font-size: 21px; }
  .jc-play { padding: 0 18px 0 14px; font-size: 20px; }
}

/* ---------- short landscape screens (phones turned sideways): keep it low ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .jc { margin-top: 0; }
  .jc-top { margin-bottom: 4px; }
  .jc-head { font-size: 19px; padding: 4px 14px 4px 8px; }
  .jc-arrow { width: 48px; height: 48px; }
  .jc-card { padding: 8px max(18%, 24px) 8px 12px; border-radius: 24px; gap: 16px; }
  .jc-art { --art: 92px; }
  .jc-title { font-size: 23px; }
  .jc-tag { font-size: 15px; }
  .jc-meta { margin-top: 4px; }
  .jc-age { font-size: 15px; padding: 4px 11px; }
  .jc-play { min-height: 48px; font-size: 19px; padding: 0 20px 0 14px; }
  .jc-play svg { width: 22px; height: 22px; }
  .jc-deco-1 { font-size: 44px; }
  .jc-deco-2 { font-size: 34px; }
  .jc-dots { margin-top: 2px; }
  .jc-dot { height: 26px; }
}

/* ---------- reduced motion: no sliding, no bobbing (the JS also stops the auto-play) ---------- */
@media (prefers-reduced-motion: reduce) {
  .jc-slide, .jc-slide.is-on, .jc-slide.to-left { transform: none; transition: none; }
  .jc-spark, .jc-deco, .jc-art, .jc-play, .jc-card.going, .jc-slide.is-on .jc-art, .jc-slide.is-on .jc-play { animation: none; }
  .jc-dot::before { transition: none; }
}
