/*
  Súťaž Hrdé pexeso: stránky /sutaz a /sutaz/podmienky (resources/views/pages/sutaz*.blade.php,
  partials/pexeso-game.blade.php, partials/pexeso-ended.blade.php). Všetko je pod triedou .pex,
  aby sa štýly nebili s Webflow CSS.
*/

.pex {
  --pex-navy: #012161;
  --pex-navy-deep: #011a4f;
  --pex-panel: #0a2a6e;
  --pex-line: rgba(255, 255, 255, 0.14);
  --pex-red: #df001a;
  --pex-red-hover: #bd0016;
  --pex-honey: #f8d57e;
  --pex-warn: #ffb020;
  --pex-ok: #4fd18b;
  --pex-muted: #b3bfdd;
  --pex-soft: #dde3f1;
  --pex-ink: #012161;
  --pex-gray: #5f6886;
  --pex-display: Germania-Hrdy, "Germania One", Impact, sans-serif;
  --pex-condensed: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --pex-sans: Barlow, "Segoe UI", Arial, sans-serif;

  display: block;
  background: var(--pex-navy);
  color: #fff;
  font-family: var(--pex-sans);
  font-size: 17px;
  line-height: 1.55;
}

.pex *,
.pex *::before,
.pex *::after {
  box-sizing: border-box;
}

.pex [hidden] {
  display: none !important;
}

/* :where() drží špecificitu na úrovni jednej triedy, takže triedy nižšie tieto základy prepíšu. */
.pex :where(h1, h2, h3, p, ul, ol) {
  margin: 0;
}

.pex :where(a) {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

.pex :where(a:hover) {
  text-decoration-color: currentColor;
}

.pex :focus-visible {
  outline: 3px solid var(--pex-honey);
  outline-offset: 3px;
}

.pex-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pex-muted {
  color: var(--pex-muted);
}

.pex-container {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 24px;
}

.pex-section {
  padding-block: 88px;
}

.pex-section-tight {
  padding-top: 24px;
}

.pex-section-last {
  padding-bottom: 120px;
}

.pex-h2 {
  font-family: var(--pex-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 2.75rem);
  line-height: 1.1;
  color: #fff;
  text-align: center;
  text-wrap: balance;
}

.pex-intro {
  max-width: 38rem;
  margin: 14px auto 0;
  color: var(--pex-muted);
  font-size: 18px;
  text-align: center;
  text-wrap: pretty;
}

/* ============================================================
   TLAČIDLÁ (tvar a písmo ako .main-button na webe)
   ============================================================ */
.pex-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 14px 34px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--pex-condensed);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pex-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pex-btn-red {
  background: var(--pex-red);
  color: #fff;
}

.pex-btn-red:hover:not(:disabled) {
  background: var(--pex-red-hover);
}

.pex-btn-outline {
  background: transparent;
  border-color: var(--pex-navy);
  color: var(--pex-navy);
}

.pex-btn-outline:hover {
  background: var(--pex-navy);
  color: #fff;
}

.pex-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.pex-btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.pex-btn-block {
  display: flex;
  width: 100%;
}

.pex-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pex-spin 0.65s linear infinite;
}

@keyframes pex-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   ÚVOD
   ============================================================ */
.pex-hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--pex-ink);
  padding-block: 48px 56px;
}

.pex-hero :focus-visible {
  outline-color: var(--pex-navy);
}

.pex-hero-label {
  position: absolute;
  top: 0;
  right: -64px;
  z-index: 3;
  width: clamp(150px, 17vw, 250px);
  pointer-events: none;
}

.pex-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: center;
}

.pex-hero-text {
  position: relative;
  z-index: 2;
}

.pex-kicker {
  color: var(--pex-gray);
  font-size: 17px;
  font-weight: 600;
}

.pex-title {
  margin: 4px 0 18px;
  font-family: var(--pex-display);
  font-size: clamp(3.4rem, 8vw, 5.75rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pex-red);
}

.pex-lead {
  max-width: 32ch;
  font-size: 21px;
  line-height: 1.45;
  text-wrap: pretty;
}

.pex-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pex-hero-visual {
  position: relative;
  z-index: 1;
}

/* ============================================================
   ANIMÁCIA NA ÚVODE (partials/pexeso-hero-demo.blade.php)
   Rozmery sú v cqw (percentá šírky animácie), takže sa celá zmenšuje spolu s úvodom.
   ============================================================ */
.pex-demo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  container-type: inline-size;
  pointer-events: none;
  user-select: none;
}

.pex-demo-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 1500px;
}

.pex-demo-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.8cqw;
  width: 82%;
  transform: rotateX(34deg) rotateZ(-24deg);
  transform-style: preserve-3d;
}

.pex-demo-card {
  position: relative;
  aspect-ratio: 1;
  transform-style: preserve-3d;
}

.pex-demo-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.pex-demo-card.is-up .pex-demo-inner {
  transform: rotateY(180deg);
}

.pex-demo-face {
  position: absolute;
  inset: 0;
  border-radius: 12%;
  background: #fff center / cover no-repeat;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* hrana kartičky a tieň na stole */
  box-shadow: 0.5cqw 0.6cqw 0 #d8dde9, 0.8cqw 2.4cqw 2.8cqw -0.6cqw rgba(1, 33, 97, 0.28);
  transition: box-shadow 0.25s ease;
}

.pex-demo-back {
  background-image: url("../images/pexeso/pexeso_back_light2.png");
}

.pex-demo-front {
  transform: rotateY(180deg);
}

.pex-demo-card.is-wrong .pex-demo-front {
  box-shadow: 0 0 0 0.7cqw var(--pex-red), 0.8cqw 2.4cqw 2.8cqw -0.6cqw rgba(1, 33, 97, 0.28);
}

.pex-demo-card.is-matched .pex-demo-front {
  box-shadow: 0 0 0 0.7cqw var(--pex-honey), 0.8cqw 2.4cqw 2.8cqw -0.6cqw rgba(1, 33, 97, 0.28);
}

.pex-demo-card.is-matched {
  animation: pex-demo-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes pex-demo-pop {
  50% { transform: translateZ(3cqw) scale(1.07); }
}

/* Pred rozdaním sú karty skryté (len so zapnutým JS, w-mod-js pridáva webflow do <html>). */
.w-mod-js .pex-demo.is-waiting .pex-demo-card {
  opacity: 0;
}

/* Rozdanie: karty padajú zhora a pri dopade sa zakývajú ako lístie */
.pex-demo.is-dealing .pex-demo-card {
  animation: pex-demo-drop 1.15s cubic-bezier(0.22, 0.7, 0.25, 1) both;
  animation-delay: calc(var(--i) * 75ms + 150ms);
}

@keyframes pex-demo-drop {
  0% {
    opacity: 0;
    transform: translate3d(calc(var(--dx) * 0.5), -10cqw, 48cqw) rotateZ(var(--r)) rotateX(40deg);
  }
  30% {
    opacity: 1;
  }
  62% {
    transform: translate3d(calc(var(--dx) * -0.25), -3cqw, 7cqw) rotateZ(calc(var(--r) * -0.3)) rotateX(-8deg);
  }
  82% {
    transform: translate3d(calc(var(--dx) * 0.06), 0, 1cqw) rotateZ(calc(var(--r) * 0.08)) rotateX(3deg);
  }
  100% {
    transform: none;
  }
}

/* Odpočet a počet dvojíc ako v hre */
.pex-demo-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 1.4cqw;
  padding: 1.6cqw 2.8cqw;
  border-radius: 999px;
  background: #fff;
  color: var(--pex-navy);
  font-family: var(--pex-condensed);
  font-size: max(15px, 4.6cqw);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1.6cqw 4cqw -1cqw rgba(1, 33, 97, 0.35);
}

.pex-demo-chip img {
  width: auto;
  height: 1.15em;
}

.pex-demo-timer {
  top: 10%;
  left: 3%;
}

.pex-demo-pairs {
  right: 3%;
  bottom: 13%;
}

.pex-demo-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 2.4cqw 4.4cqw 2.4cqw 2.6cqw;
  border-radius: 999px;
  background: var(--pex-navy);
  color: #fff;
  font-family: var(--pex-condensed);
  font-size: max(19px, 6cqw);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2cqw 6cqw -1cqw rgba(1, 33, 97, 0.55);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.pex-demo.is-won .pex-demo-toast {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pex-demo-check {
  display: grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: var(--pex-honey);
  color: var(--pex-navy);
  font-size: 0.75em;
}

/* Srdiečka a iskry pri nájdenej dvojici */
.pex-demo-piece {
  position: absolute;
  z-index: 5;
  width: 3.6cqw;
  height: 3.6cqw;
  margin: -1.8cqw 0 0 -1.8cqw;
  animation: pex-demo-burst 1s cubic-bezier(0.15, 0.8, 0.3, 1) var(--delay, 0ms) both;
}

.pex-demo-piece.is-dot {
  width: 1.3cqw;
  height: 1.3cqw;
  margin: -0.65cqw 0 0 -0.65cqw;
  border-radius: 50%;
  background: #e9c46a;
}

@keyframes pex-demo-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(var(--s)) rotate(var(--rot));
  }
}

/* Srdiečka a bodky, ktoré sa okolo stola pomaly vznášajú */
.pex-demo-float {
  position: absolute;
  width: 3.2cqw;
  height: 3.2cqw;
  animation: pex-demo-float 5.5s ease-in-out var(--d, 0s) infinite alternate;
}

.pex-demo-float.is-dot {
  width: 1.1cqw;
  height: 1.1cqw;
  border-radius: 50%;
  background: #e9c46a;
  opacity: 0.8;
}

@keyframes pex-demo-float {
  from { transform: translateY(0) rotate(-10deg); }
  to { transform: translateY(-2.6cqw) rotate(12deg); }
}

.pex-demo svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #ffe1e5;
  stroke: var(--pex-red);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

/* ============================================================
   ŽREBOVACÍ LÍSTOK (úvod a súčet cien)
   Výrez na perforácii kreslia kruhy vo farbe pozadia za lístkom (--pex-behind).
   ============================================================ */
.pex-ticket {
  --pex-behind: #fff;
  --pex-notch: 13px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 580px;
  margin: 30px 0 32px;
  border-radius: 18px;
  background: var(--pex-navy);
  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(1, 33, 97, 0.7);
}

.pex-ticket-main {
  display: flex;
  flex-direction: column;
  padding: 22px 28px 24px 30px;
}

.pex-ticket-label {
  color: var(--pex-muted);
  font-size: 16px;
}

.pex-ticket-value {
  margin: 6px 0 8px;
  font-family: var(--pex-display);
  font-size: clamp(3.1rem, 6.5vw, 4.4rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--pex-honey);
  white-space: nowrap;
}

.pex-ticket-sub {
  font-size: 16px;
  font-weight: 600;
}

.pex-ticket-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-width: 190px;
  padding: 20px 26px;
  list-style: none;
  border-left: 2px dashed rgba(255, 255, 255, 0.32);
  color: var(--pex-muted);
  font-size: 14px;
  line-height: 1.3;
}

.pex-ticket-stub strong {
  display: block;
  font-family: var(--pex-condensed);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.pex-ticket-stub::before,
.pex-ticket-stub::after {
  content: "";
  position: absolute;
  left: calc(var(--pex-notch) * -1 - 1px);
  width: calc(var(--pex-notch) * 2);
  height: calc(var(--pex-notch) * 2);
  border-radius: 50%;
  background: var(--pex-behind);
}

.pex-ticket-stub::before {
  top: calc(var(--pex-notch) * -1);
}

.pex-ticket-stub::after {
  bottom: calc(var(--pex-notch) * -1);
}

.pex-ticket-total {
  --pex-behind: var(--pex-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 460px;
  margin: 56px auto 0;
  padding: 24px 40px 26px;
  background: var(--pex-honey);
  color: var(--pex-ink);
  text-align: center;
  box-shadow: none;
}

.pex-ticket-total .pex-ticket-label {
  color: var(--pex-ink);
  font-size: 19px;
}

.pex-ticket-total .pex-ticket-value {
  margin-bottom: 0;
  color: var(--pex-ink);
  font-size: clamp(3.4rem, 9vw, 5rem);
}

/* Výrezy po bokoch súčtu cien */
.pex-ticket-total::before,
.pex-ticket-total::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--pex-behind);
}

.pex-ticket-total::before {
  left: -13px;
}

.pex-ticket-total::after {
  right: -13px;
}

/* ============================================================
   O INICIATÍVE A PARTNERI
   ============================================================ */
.pex-about {
  padding-block: 96px 16px;
}

.pex-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px 72px;
  align-items: end;
}

.pex-about-lead {
  font-size: clamp(1.6rem, 3.1vw, 2.35rem);
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.pex-about-lead strong {
  font-weight: 700;
}

.pex-about-text {
  color: var(--pex-soft);
  font-size: 18px;
}

.pex-about-text p + p {
  margin-top: 12px;
}

.pex-about-text strong {
  color: #fff;
}

.pex-partners-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 72px 0 20px;
  color: var(--pex-muted);
  font-family: var(--pex-sans);
  font-size: 15px;
  font-weight: 600;
}

.pex-partners-title::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--pex-line);
}

/* Logá partnerov na dlaždiciach, neúplný posledný rad je na strede */
.pex-logos {
  --pex-logo-gap: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pex-logo-gap);
  padding: 0;
  list-style: none;
}

.pex-logos li {
  flex: 0 0 calc((100% - 4 * var(--pex-logo-gap)) / 5);
}

.pex-logo {
  display: grid;
  place-items: center;
  height: 116px;
  padding: 14px;
  border: 1px solid var(--pex-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

a.pex-logo:hover {
  border-color: var(--pex-honey);
  background: rgba(255, 255, 255, 0.08);
}

/* Na menších obrazovkách sa všetky logá zmenšia rovnakým pomerom (--pex-logo-scale), aby ostali vyvážené. */
.pex-logo img {
  width: calc(var(--pex-logo-w) * var(--pex-logo-scale, 1) * 1px);
  max-width: 100%;
  height: auto;
}

.pex-logo-name {
  color: #fff;
  font-family: var(--pex-condensed);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.pex-section-cta {
  margin-top: 56px;
  text-align: center;
}

/* ============================================================
   AKO PEXESO FUNGUJE
   Každý krok má ikonu na dlaždici ako kartička pexesa, kroky spája prerušovaná čiara.
   ============================================================ */
.pex-steps {
  --pex-tile: 112px;
  --pex-gap: 28px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 48px var(--pex-gap);
  margin-top: 64px;
  padding: 0;
  list-style: none;
}

.pex-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
}

.pex-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--pex-tile) / 2);
  left: calc(var(--pex-tile) + 12px);
  right: calc(var(--pex-gap) * -1 + 12px);
  border-top: 2px dashed rgba(255, 255, 255, 0.22);
}

.pex-step-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--pex-tile);
  aspect-ratio: 1;
  margin-bottom: 22px;
  border: 1px solid var(--pex-line);
  border-radius: 24px;
  background: var(--pex-panel);
}

.pex-step-tile img {
  width: 82%;
  height: auto;
}

.pex-step-num {
  position: absolute;
  top: -12px;
  left: -12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pex-honey);
  box-shadow: 0 0 0 4px var(--pex-navy);
  color: var(--pex-navy);
  font-family: var(--pex-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.pex-step-title {
  display: block;
  font-size: 18px;
  line-height: 1.3;
  text-wrap: balance;
}

.pex-step-text {
  display: block;
  margin-top: 6px;
  color: var(--pex-muted);
  font-size: 15px;
  line-height: 1.45;
}

/* ============================================================
   HRA
   ============================================================ */
.pex-play {
  background: var(--pex-navy-deep);
}

.pex-board {
  display: grid;
  /* Celá plocha (5 radov kariet) sa má zmestiť na výšku okna aj na notebooku. */
  max-width: min(760px, max(340px, calc(80vh - 60px)));
  margin: 40px auto 0;
  padding: 22px;
  border: 1px solid var(--pex-line);
  border-radius: 24px;
  background: var(--pex-panel);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.65);
  transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Hracia plocha a okná sú v tej istej bunke gridu, plocha sa tak natiahne podľa vyššieho z nich. */
.pex-board > * {
  grid-area: 1 / 1;
}

.pex-board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px 14px;
}

.pex-timer,
.pex-pairs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pex-condensed);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pex-timer {
  font-size: 36px;
}

.pex-timer img {
  width: 28px;
  height: auto;
}

.pex-pairs {
  font-size: 26px;
  color: var(--pex-soft);
}

.pex-pairs img {
  width: 36px;
  height: auto;
}

#pex-timer-display {
  display: inline-block;
  transition: color 0.3s ease;
}

.pex-countdown {
  height: 8px;
  margin: 0 6px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.pex-countdown-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--pex-honey);
  transform-origin: left center;
  transition: background-color 0.3s ease;
}

.pex-board.is-hurry .pex-countdown-fill {
  background: var(--pex-red);
}

.pex-board.is-hurry #pex-timer-display {
  color: #ff6b6b;
}

/* Posledných 5 sekúnd: plocha pulzuje načerveno (rámik, žiara aj pozadie) v rytme odpočtu. */
.pex-board.is-panic {
  border-color: var(--pex-red);
  animation: pex-panic 0.5s ease-in-out infinite alternate;
}

@keyframes pex-panic {
  from {
    background-color: #5e0a22;
    box-shadow: 0 0 0 2px var(--pex-red), 0 0 14px rgba(223, 0, 26, 0.35);
  }
  to {
    background-color: #9c0720;
    box-shadow: 0 0 0 5px var(--pex-red), 0 0 48px rgba(223, 0, 26, 0.8);
  }
}

.pex-board.is-panic #pex-timer-display {
  color: #fff;
  animation: pex-pulse 0.5s ease-in-out infinite alternate;
}

.pex-board.is-panic .pex-pairs {
  color: #fff;
}

.pex-board.is-panic .pex-countdown {
  background: rgba(255, 255, 255, 0.25);
}

.pex-board.is-panic .pex-countdown-fill {
  background: #fff;
}

@keyframes pex-pulse {
  to { transform: scale(1.12); }
}

.pex-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pex-card {
  display: block;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  perspective: 1000px;
  -webkit-tap-highlight-color: transparent;
}

.pex-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.pex-card.is-flipped .pex-card-inner,
.pex-card.is-matched .pex-card-inner {
  transform: rotateY(180deg);
}

.pex-card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #fff center / cover no-repeat;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pex-card-back {
  background-image: url("../images/pexeso/pexeso_back_light2.png");
  border: 1px solid var(--pex-line);
}

.pex-card-front {
  transform: rotateY(180deg);
  border: 2px solid var(--pex-navy);
  transition: box-shadow 0.2s ease, opacity 0.3s ease;
}

.pex-card.is-wrong .pex-card-front {
  box-shadow: 0 0 0 3px var(--pex-red);
}

.pex-card.is-matched {
  cursor: default;
}

.pex-card.is-matched .pex-card-front {
  opacity: 0.55;
}

/* Okná nad hracou plochou */
.pex-overlay {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -22px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(1, 26, 79, 0.84);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.pex-enter .pex-modal {
  animation: pex-modal-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pex-modal-in {
  from { opacity: 0; transform: translateY(14px); }
}

.pex-modal {
  width: 100%;
  max-width: 460px;
  padding: 30px;
  border: 1px solid var(--pex-line);
  border-radius: 20px;
  background: var(--pex-navy);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

/* Formulár v okne po výhre ostáva zarovnaný vľavo, popisy polí a súhlas sa tak čítajú lepšie. */
.pex-modal form {
  text-align: left;
}

.pex-modal > p,
.pex-modal > div > p {
  margin-bottom: 18px;
  color: var(--pex-soft);
  font-size: 16px;
}

.pex-modal .pex-muted {
  color: var(--pex-muted);
}

.pex-modal .pex-btn + .pex-btn,
.pex-modal form + .pex-btn {
  margin-top: 10px;
}

/* Ikona okna na dlaždici ako v krokoch „Ako pexeso funguje“ */
.pex-modal-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  padding: 7px;
  border: 1px solid var(--pex-line);
  border-radius: 18px;
  background: var(--pex-panel);
}

.pex-modal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.pex-modal-head .pex-modal-icon,
.pex-modal-head .pex-badge {
  margin: 0;
}

.pex-modal-title {
  margin-bottom: 10px;
  font-family: var(--pex-condensed);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-wrap: balance;
}

.pex-modal-title:focus {
  outline: none;
}

.pex-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(79, 209, 139, 0.15);
  color: var(--pex-ok);
  font-size: 15px;
  font-weight: 600;
}

.pex-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.pex-field input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 16px;
}

.pex-field input.is-invalid {
  border-color: var(--pex-warn);
}

.pex-field input[readonly] {
  background: #e8ecf5;
}

.pex-error {
  margin: 6px 0 0;
  color: var(--pex-warn);
  font-size: 14px;
  line-height: 1.4;
}

.pex-error:empty {
  display: none;
}

.pex-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
}

.pex-check input {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.pex-check input:checked {
  background: var(--pex-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.pex-check input[aria-invalid="true"] {
  box-shadow: 0 0 0 2px var(--pex-warn);
}

.pex-check label {
  color: var(--pex-soft);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.pex-check a {
  color: #fff;
}

#pex-submit-btn {
  margin-top: 20px;
}

/* Oznam namiesto hry (pred začiatkom, po konci, medzi ročníkmi) */
.pex-notice {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px clamp(22px, 5vw, 48px);
  border: 1px solid var(--pex-line);
  border-radius: 24px;
  background: var(--pex-panel);
  text-align: center;
}

.pex-notice-icon {
  width: 104px;
  height: 104px;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid var(--pex-line);
  border-radius: 24px;
  background: var(--pex-navy);
}

.pex-notice .pex-h2 {
  margin-bottom: 16px;
}

.pex-notice p {
  max-width: 34rem;
  margin: 0 auto 10px;
  color: var(--pex-soft);
}

.pex-notice .pex-muted {
  color: var(--pex-muted);
}

/* ============================================================
   CENY
   ============================================================ */
/* Všetky ceny rovnako veľké, neúplný posledný rad je na strede */
.pex-prizes {
  --pex-prize-cols: 4;
  --pex-prize-gap: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pex-prize-gap);
  margin-top: 48px;
}

.pex-prize {
  flex: 0 0 calc((100% - (var(--pex-prize-cols) - 1) * var(--pex-prize-gap)) / var(--pex-prize-cols));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pex-line);
  border-radius: 16px;
  background: var(--pex-panel);
}

.pex-prize-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 24px;
  background: var(--pex-navy-deep);
}

.pex-prize-media.has-image {
  padding: 8% 10% 10%;
}

/* Fotka s priehľadným pozadím na tmavomodrej */
.pex-prize-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.35));
}

.pex-prize-brand {
  font-family: var(--pex-condensed);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
}

.pex-prize-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
}

.pex-prize-rank {
  color: var(--pex-honey);
  font-size: 14px;
  font-weight: 600;
}

.pex-prize-name {
  font-family: var(--pex-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-wrap: balance;
}

.pex-prize-from {
  color: var(--pex-muted);
  font-size: 15px;
}

.pex-prize-from a {
  color: #fff;
}

.pex-prize-value {
  margin-top: auto;
  padding-top: 8px;
  color: var(--pex-muted);
  font-size: 15px;
}

.pex-prize-value strong {
  font-family: var(--pex-condensed);
  font-size: 23px;
  font-weight: 700;
  color: var(--pex-honey);
}

/* ============================================================
   ŽREBOVANIE
   ============================================================ */
.pex-draw {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
  counter-reset: pex-draw;
}

.pex-draw li {
  position: relative;
  padding: 0 0 32px 72px;
  counter-increment: pex-draw;
}

.pex-draw li::before {
  content: counter(pex-draw);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pex-red);
  font-family: var(--pex-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.pex-draw li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 56px;
  bottom: 8px;
  left: 23px;
  border-left: 2px dotted rgba(255, 255, 255, 0.3);
}

.pex-draw h3 {
  margin-bottom: 6px;
  padding-top: 8px;
  font-family: var(--pex-condensed);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.pex-draw p {
  color: var(--pex-muted);
}

.pex-draw a {
  color: #fff;
}

/* ============================================================
   ČASTÉ OTÁZKY
   ============================================================ */
.pex-faq {
  max-width: 820px;
  margin: 40px auto 0;
  border-top: 1px solid var(--pex-line);
}

.pex-faq details {
  border-bottom: 1px solid var(--pex-line);
}

.pex-faq summary {
  position: relative;
  padding: 20px 44px 20px 4px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.pex-faq summary::-webkit-details-marker {
  display: none;
}

.pex-faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-family: var(--pex-condensed);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: var(--pex-honey);
}

.pex-faq details[open] summary::after {
  content: "–";
}

.pex-faq summary:hover {
  color: var(--pex-honey);
}

.pex-faq details p {
  max-width: 65ch;
  padding: 0 4px 22px;
  color: var(--pex-muted);
}

.pex-faq details a {
  color: #fff;
}

/* ============================================================
   TESTOVACIA VERZIA /sutaz-test
   ============================================================ */
.pex-test-bar {
  padding: 10px 20px;
  background: var(--pex-honey);
  color: var(--pex-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.pex-lock {
  padding: 96px 20px 120px;
}

.pex-lock-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--pex-line);
  border-radius: 22px;
  background: var(--pex-panel);
  text-align: center;
}

.pex-lock-title {
  margin-bottom: 10px;
  font-family: var(--pex-condensed);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.pex-lock-text {
  color: var(--pex-soft);
  font-size: 16px;
}

.pex-lock-card .pex-field {
  margin: 24px 0 18px;
  text-align: left;
}

/* ============================================================
   PODMIENKY SÚŤAŽE
   ============================================================ */
.pex-terms {
  background: #f4f6fb;
  color: #16204a;
}

.pex-terms :where(a) {
  color: var(--pex-red);
  text-decoration-color: currentColor;
}

.pex-terms :focus-visible {
  outline-color: var(--pex-red);
}

.pex-terms-head {
  padding: 44px 24px 72px;
  background: var(--pex-navy);
  color: #fff;
}

.pex-terms-head-in {
  max-width: 820px;
  margin: 0 auto;
}

.pex-terms-back {
  display: inline-block;
  margin-bottom: 22px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.pex-terms-back::before {
  content: "‹ ";
}

.pex-terms-org {
  margin-bottom: 8px;
  color: var(--pex-muted);
  font-size: 15px;
}

.pex-terms-title {
  font-family: var(--pex-display);
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  color: #fff;
  text-wrap: balance;
}

.pex-terms-paper {
  max-width: 820px;
  margin: -40px auto 96px;
  padding: 40px clamp(20px, 5vw, 56px) 48px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(1, 33, 97, 0.08);
}

.pex-terms-lead {
  font-size: 18px;
  line-height: 1.6;
}

.pex-terms-toc {
  margin: 26px 0 8px;
  padding: 16px 20px;
  border: 1px solid #dde2f0;
  border-radius: 12px;
  font-size: 15px;
}

.pex-terms-paper .pex-terms-toc h2 {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-family: var(--pex-sans);
  font-size: 15px;
  font-weight: 700;
  color: #16204a;
}

.pex-terms-toc ol {
  columns: 2;
  column-gap: 32px;
  padding-left: 20px;
}

.pex-terms-toc a {
  color: #16204a;
  text-decoration: none;
}

.pex-terms-toc a:hover {
  color: var(--pex-red);
  text-decoration: underline;
}

.pex-terms section {
  scroll-margin-top: 24px;
}

.pex-terms-paper h2 {
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #dde2f0;
  font-family: var(--pex-condensed);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pex-navy);
}

.pex-terms-paper p,
.pex-terms-paper li {
  font-size: 17px;
  line-height: 1.6;
}

.pex-cl {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}

.pex-cl > span:first-child {
  color: #56608a;
  font-weight: 700;
}

.pex-terms-paper ul {
  margin: 4px 0 14px;
  padding-left: 66px;
}

.pex-terms-paper li {
  margin-bottom: 4px;
}

.pex-terms-table {
  margin: 8px 0 18px;
  overflow-x: auto;
  border: 1px solid #dde2f0;
  border-radius: 12px;
}

.pex-terms-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
}

.pex-terms-table th,
.pex-terms-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dde2f0;
  text-align: left;
  vertical-align: top;
}

.pex-terms-table th {
  background: var(--pex-navy);
  color: #fff;
  font-weight: 600;
}

.pex-terms-table tbody tr:nth-child(even) {
  background: #f6f8fd;
}

.pex-terms-table .n {
  width: 72px;
  text-align: center;
}

.pex-terms-table .v {
  text-align: right;
  white-space: nowrap;
}

.pex-terms-table tfoot td {
  border-bottom: 0;
  font-weight: 700;
}

.pex-terms-sign {
  margin-top: 36px;
  color: #56608a;
}

.pex-terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #dde2f0;
}

/* ============================================================
   RESPONZÍVNE
   ============================================================ */
@media (max-width: 1100px) {
  .pex-prizes {
    --pex-prize-cols: 3;
  }

  .pex-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pex-steps li:nth-child(3n)::after {
    display: none;
  }
}

@media (max-width: 991px) {
  .pex-section {
    padding-block: 72px;
  }

  .pex-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .pex-hero-text {
    padding-bottom: 0;
  }

  .pex-hero-visual {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }

  .pex-about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 767px) {
  .pex {
    font-size: 16px;
  }

  .pex-container {
    padding-inline: 20px;
  }

  .pex-about {
    padding-top: 72px;
  }

  .pex-partners-title {
    margin-top: 48px;
  }

  .pex-logos {
    --pex-logo-gap: 8px;
  }

  .pex-logos li {
    flex-basis: calc((100% - 2 * var(--pex-logo-gap)) / 3);
  }

  .pex-logo {
    height: 80px;
    padding: 8px;
    border-radius: 12px;
  }

  .pex-logos {
    --pex-logo-scale: 0.58;
  }

  .pex-logo-name {
    font-size: 21px;
  }

  .pex-prizes {
    --pex-prize-cols: 2;
    --pex-prize-gap: 14px;
  }

  .pex-prize-body {
    padding: 14px 16px 16px;
  }

  .pex-prize-name {
    font-size: 17px;
  }

  .pex-faq summary {
    font-size: 17px;
  }
}

@media (max-width: 560px) {
  .pex-hero {
    padding-top: 28px;
  }

  .pex-hero-label {
    width: 128px;
    right: -44px;
  }


  .pex-lead {
    font-size: 19px;
  }

  /* Lístok: ústrižok pod hlavnou časťou, perforácia vodorovne */
  .pex-ticket:not(.pex-ticket-total) {
    grid-template-columns: minmax(0, 1fr);
  }

  .pex-ticket-main {
    padding: 20px 22px;
  }

  .pex-ticket-stub {
    flex-direction: row;
    gap: 18px;
    min-width: 0;
    padding: 16px 22px 18px;
    border-left: 0;
    border-top: 2px dashed rgba(255, 255, 255, 0.32);
  }

  .pex-ticket-stub li {
    flex: 1;
  }

  .pex-ticket-stub strong {
    font-size: 22px;
  }

  .pex-ticket-stub::before,
  .pex-ticket-stub::after {
    top: calc(var(--pex-notch) * -1 - 1px);
    bottom: auto;
  }

  .pex-ticket-stub::before {
    left: calc(var(--pex-notch) * -1);
  }

  .pex-ticket-stub::after {
    left: auto;
    right: calc(var(--pex-notch) * -1);
  }

  .pex-ticket-total {
    padding: 22px 28px;
  }

  .pex-cta .pex-btn {
    flex: 1 1 100%;
  }

  /* Kroky pod sebou: dlaždica vľavo, text vpravo, čiara zvislo */
  .pex-steps {
    --pex-tile: 76px;
    --pex-gap: 30px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 44px;
  }

  .pex-steps li {
    display: grid;
    grid-template-columns: var(--pex-tile) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 20px;
  }

  .pex-steps li:not(:last-child)::after,
  .pex-steps li:nth-child(3n):not(:last-child)::after {
    display: block;
    top: calc(var(--pex-tile) + 10px);
    right: auto;
    bottom: calc(var(--pex-gap) * -1 + 10px);
    left: calc(var(--pex-tile) / 2 - 1px);
    border-top: 0;
    border-left: 2px dashed rgba(255, 255, 255, 0.22);
  }

  .pex-step-tile {
    grid-row: 1 / span 2;
    margin: 0;
    border-radius: 18px;
  }

  .pex-step-num {
    top: -9px;
    left: -9px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .pex-step-title {
    align-self: end;
    padding-top: 6px;
  }

  .pex-step-text {
    align-self: start;
  }

  .pex-board {
    margin-top: 28px;
    padding: 12px;
    border-radius: 18px;
  }

  .pex-overlay {
    margin: -12px;
    padding: 12px;
    border-radius: 18px;
  }

  .pex-modal {
    padding: 20px;
  }

  .pex-modal-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    padding: 5px;
    border-radius: 14px;
  }

  .pex-modal-title {
    font-size: 26px;
  }

  .pex-timer {
    font-size: 30px;
  }

  .pex-pairs {
    font-size: 22px;
  }

  .pex-grid {
    gap: 6px;
  }

  .pex-card,
  .pex-card-face {
    border-radius: 8px;
  }

  /* Ceny vedľa seba: fotka vľavo, text vpravo */
  .pex-prizes {
    --pex-prize-cols: 1;
  }

  .pex-prize {
    flex-direction: row;
  }

  .pex-prize .pex-prize-media {
    flex: 0 0 38%;
    aspect-ratio: auto;
    min-height: 140px;
    padding: 14px;
  }

  .pex-prize .pex-prize-brand {
    font-size: 22px;
  }

  .pex-draw li {
    padding-left: 60px;
  }

  .pex-draw li::before {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .pex-draw li:not(:last-child)::after {
    top: 50px;
    left: 20px;
  }

  .pex-draw h3 {
    padding-top: 6px;
    font-size: 22px;
  }

  .pex-terms-toc ol {
    columns: 1;
  }

  .pex-terms-paper ul {
    padding-left: 52px;
  }

  .pex-cl {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pex-board.is-panic,
  .pex-board.is-panic #pex-timer-display,
  .pex-enter .pex-modal {
    animation: none;
  }

  .pex-board.is-panic {
    background-color: #8a0820;
    box-shadow: 0 0 0 3px var(--pex-red);
  }

  .pex-card-inner,
  .pex-demo-inner {
    transition: none;
  }

  .pex-demo-card,
  .pex-demo-float,
  .pex-demo.is-dealing .pex-demo-card {
    animation: none;
  }
}

@media print {
  .navbar,
  .footer-section,
  .fs-cc-components,
  .pex-terms-back,
  .pex-terms-toc,
  .pex-terms-actions {
    display: none !important;
  }

  .pex-terms,
  .pex-terms-head,
  .pex-terms-paper {
    background: none;
    color: #000;
    box-shadow: none;
  }

  .pex-terms-head {
    padding: 0 0 12px;
  }

  .pex-terms-title,
  .pex-terms-org,
  .pex-terms-paper h2 {
    color: #000;
  }

  .pex-terms-paper {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .pex-terms-paper h2 {
    break-after: avoid;
  }

  .pex-terms-paper p,
  .pex-terms-paper li {
    font-size: 11pt;
  }

  .pex-terms-table {
    overflow: visible;
    border: 0;
  }

  .pex-terms-table th {
    background: #eee;
    color: #000;
  }
}
