/*
  Series Card Modules – frontend styles
  Scoped under .mdcs-wrap to reduce theme conflicts.
*/

.mdcs-wrap,
.mdcs-wrap * {
  box-sizing: border-box;
}

.mdcs-wrap {
  --mdcs-cols: 3;
  --mdcs-gap: 14px;
  --mdcs-radius: 18px;
  --mdcs-pad: 14px;
  --mdcs-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  --mdcs-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.24);

  --mdcs-badge-bg: #ff9800;
  --mdcs-badge-fg: #ffffff;

  --mdcs-title-fg: #ffffff;
  --mdcs-desc-fg: rgba(255, 255, 255, 0.85);
  --mdcs-cta-fg: rgba(255, 255, 255, 0.95);
  --mdcs-cta-badge-bg: #e53935;
  --mdcs-cta-badge-fg: #ffffff;

  /* CTA overlay is a variable so you can theme per-site without fighting the theme */
  --mdcs-cta-overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.10) 0%,
    rgba(0, 0, 0, 0.18) 50%,
    rgba(0, 0, 0, 0.86) 100%
  );

  font-family: inherit;
}

.mdcs-grid {
  display: grid;
  grid-template-columns: repeat(var(--mdcs-cols), minmax(0, 1fr));
  gap: var(--mdcs-gap);
  margin: 0;
  padding: 0;
}

@media (max-width: 960px) {
  .mdcs-wrap { --mdcs-cols: 2; }
}

@media (max-width: 560px) {
  .mdcs-wrap { --mdcs-cols: 1; }
}

.mdcs-card {
  border-radius: var(--mdcs-radius);
  overflow: hidden;
  box-shadow: var(--mdcs-shadow);
  transform: translateZ(0);
}

.mdcs-card__link {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  text-decoration: none;
  border-radius: var(--mdcs-radius);
  overflow: hidden;
}

.mdcs-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.06);
}

.mdcs-card__bg--blank {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,30,30,1), rgba(0,0,0,1));
}

.mdcs-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.82) 100%
  );
}

.mdcs-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.mdcs-card__play::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.mdcs-card__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 14px solid rgba(255, 255, 255, 0.95);
}

.mdcs-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  background: var(--mdcs-badge-bg);
  color: var(--mdcs-badge-fg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.mdcs-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--mdcs-pad);
}

.mdcs-card__title {
  color: var(--mdcs-title-fg);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
  margin: 0 0 6px 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.mdcs-card__desc {
  color: var(--mdcs-desc-fg);
  font-size: 13px;
  line-height: 1.25;
  margin: 0;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.mdcs-card__cta {
  margin-top: 10px;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--mdcs-cta-fg);
  font-weight: 700;
  font-size: 12px;
}

.mdcs-card__link:focus {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

@media (hover: hover) {
  .mdcs-card__link:hover {
    box-shadow: var(--mdcs-shadow-hover);
  }

  .mdcs-card__link:hover .mdcs-card__bg {
    transform: scale(1.06);
  }

  .mdcs-card__link:hover .mdcs-card__play::before {
    background: rgba(255, 255, 255, 0.28);
  }
}

/* CTA style (image-first)
   - we keep the exact same markup, but stop painting a solid red layer over the artwork
   - if you want a colored tint per-site, override --mdcs-cta-overlay on .mdcs-wrap */
.mdcs-card--cta .mdcs-card__overlay {
  background: var(--mdcs-cta-overlay);
}

.mdcs-card--cta .mdcs-card__bg {
  opacity: 1;
}

.mdcs-card--cta .mdcs-card__badge {
  background: var(--mdcs-cta-badge-bg);
  color: var(--mdcs-cta-badge-fg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}

.mdcs-card--cta .mdcs-card__title {
  font-size: 20px;
}

.mdcs-card--cta .mdcs-card__desc {
  color: rgba(255, 255, 255, 0.9);
}

.mdcs-card--cta .mdcs-card__cta {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
