/* ======================================
   AiPrank.ru — Showcase Dual Ribbon
   Two auto-scrolling rows, portrait + landscape mix
   ======================================*/

/* ─── Showcase Section ─── */
.showcase {
  background: var(--dark);
  padding: 60px 0 80px;
  overflow: hidden; /* clip scrolling ribbons */
}

/* ─── Section header stays contained ─── */
.showcase > .container {
  margin-bottom: 48px;
}

/* ─── Ribbon Wrapper ─── */
.showcase__ribbons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden; /* critical: clip horizontal scroll */
}

/* ─── Single ribbon row ─── */
.showcase__ribbon {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
}

/* Row 1 scrolls left */
.showcase__ribbon--row1 {
  animation: ribbonLeft 40s linear infinite;
}

/* Row 2 scrolls right */
.showcase__ribbon--row2 {
  animation: ribbonRight 45s linear infinite;
}

/* Pause both on hover over ribbons area */
.showcase__ribbons:hover .showcase__ribbon {
  animation-play-state: paused;
}

@keyframes ribbonLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes ribbonRight {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* ─── Individual card ─── */
.sc-card {
  position: relative;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--dark2);
  border: 2px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.sc-card:hover {
  transform: scale(1.04);
  border-color: var(--yellow);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--yellow);
  z-index: 10;
}

/* Portrait card: 9:16 → width = height * (9/16) */
.sc-card--portrait {
  width: calc(320px * 9 / 16); /* ≈ 180px */
}

/* Landscape card: 16:9 → width = height * (16/9) */
.sc-card--landscape {
  width: calc(320px * 16 / 9); /* ≈ 568px */
}

/* ─── Video fill ─── */
.sc-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ─── Overlay (gradient + info) ─── */
.sc-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 18, 0.92) 0%,
    rgba(10, 10, 18, 0.4) 40%,
    transparent 70%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.sc-card:hover .sc-card__overlay {
  opacity: 1;
}

.sc-card__badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  align-self: flex-start;
}

.sc-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
}

.sc-card--portrait .sc-card__title {
  font-size: 16px;
}

/* ─── Play button ─── */
.sc-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 52px;
  height: 52px;
  background: rgba(255, 215, 0, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--dark);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.sc-card:hover .sc-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ─── Responsive ─── */

/* Large screens: taller ribbons */
@media (min-width: 1400px) {
  .sc-card {
    height: 360px;
  }
  .sc-card--portrait {
    width: calc(360px * 9 / 16);
  }
  .sc-card--landscape {
    width: calc(360px * 16 / 9);
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .sc-card {
    height: 260px;
  }
  .sc-card--portrait {
    width: calc(260px * 9 / 16);
  }
  .sc-card--landscape {
    width: calc(260px * 16 / 9);
  }
  .showcase__ribbons {
    gap: 12px;
  }
  .showcase__ribbon {
    gap: 12px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .showcase {
    padding: 40px 0 60px;
  }
  .sc-card {
    height: 200px;
    border-radius: 10px;
  }
  .sc-card--portrait {
    width: calc(200px * 9 / 16);
  }
  .sc-card--landscape {
    width: calc(200px * 16 / 9);
  }
  .showcase__ribbons {
    gap: 10px;
  }
  .showcase__ribbon {
    gap: 10px;
  }
  /* Overlay always visible on mobile */
  .sc-card__overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(10, 10, 18, 0.85) 0%,
      transparent 60%
    );
  }
  .sc-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.85);
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .sc-card__title {
    font-size: 14px;
  }
  .sc-card--portrait .sc-card__title {
    font-size: 13px;
  }
  .sc-card__badge {
    font-size: 10px;
    padding: 2px 8px;
  }
}

/* Very small screens: slow down a bit */
@media (max-width: 400px) {
  .showcase__ribbon--row1 {
    animation-duration: 30s;
  }
  .showcase__ribbon--row2 {
    animation-duration: 34s;
  }
}
