/* =====================
   CASE DETAIL — Categoría, título, video y cuerpo del caso
   ===================== */
.case-detail {
  padding-block: var(--space-3xl);
  background-color: var(--color-bg-white);
}

.case-detail__inner {
  display: flex;
  flex-direction: column;
  gap: 52px;
  max-width: calc(var(--container-max) + 4rem);
  margin-inline: auto;
  padding-inline: calc(2rem + 30px);
}

.case-detail__category {
  display: inline-flex;
  align-items: center;
  padding: 3px 15px;
  background-color: rgba(254, 80, 0, 0.2);
  border-radius: 100px;
  font-size: 18px;
  font-weight: var(--fw-semibold);
  line-height: 24px;
  color: var(--color-orange-ultra-dark);
  align-self: flex-start;
}

.case-detail__heading {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case-detail__title {
  font-size: 44px;
  font-weight: var(--fw-semibold);
  line-height: 56px;
  color: var(--color-navy);
  margin: 0;
}

.case-detail__subtitle {
  font-size: 28px;
  font-weight: var(--fw-regular);
  line-height: 52px;
  color: #636363;
  margin: 0;
}

.case-detail__video {
  position: relative;
  height: 680px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--color-navy);
  isolation: isolate;
}

.case-detail__video img,
.case-detail__video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-detail__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 165px;
  height: 165px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: opacity var(--transition);
}

.case-detail__play:hover {
  opacity: 1;
}

.case-detail__play img {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-detail__body {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 20px;
  font-weight: var(--fw-light);
  line-height: 30px;
  color: var(--color-navy);
}

.case-detail__body p {
  margin: 0;
}

/* =====================
   RELATED CASES — "Otras experiencias" (reusa .case-card)
   ===================== */
.related-cases {
  padding-block: var(--space-3xl);
  background-color: var(--color-bg-white);
}

.related-cases__inner {
  display: flex;
  flex-direction: column;
  gap: 44px;
  max-width: calc(var(--container-max) + 4rem);
  margin-inline: auto;
  padding-inline: calc(2rem + 30px);
}

.related-cases__title {
  font-size: var(--fs-h5);
  font-weight: var(--fw-semibold);
  line-height: 56px;
  color: var(--color-navy);
  margin: 0;
}

.related-cases__swiper {
  width: 100%;
}

.related-cases__swiper .swiper-wrapper {
  align-items: stretch;
}

/* =====================
   RESPONSIVE — CASO INTERIOR
   ===================== */
@media (max-width: 991.98px) {
  .case-detail__title {
    font-size: 32px;
    line-height: 42px;
  }

  .case-detail__subtitle {
    font-size: 20px;
    line-height: 34px;
  }

  .case-detail__video {
    height: 420px;
  }

  .case-detail__play {
    width: 100px;
    height: 100px;
  }

  .related-cases__title {
    font-size: 28px;
    line-height: 38px;
  }
}

@media (max-width: 575.98px) {
  .case-detail__title {
    font-size: 24px;
    line-height: 34px;
  }

  .case-detail__subtitle {
    font-size: 18px;
    line-height: 28px;
  }

  .case-detail__video {
    height: 240px;
    border-radius: 16px;
  }

  .case-detail__play {
    width: 72px;
    height: 72px;
  }

  .case-detail__body {
    font-size: var(--fs-md);
  }

  .related-cases__title {
    font-size: 22px;
    line-height: 32px;
  }
}

/* ---- Reset mobile: el padding alineado al navbar (calc(2rem + 30px)) solo aplica en desktop; en mobile se usa el gutter estándar ---- */
@media (max-width: 991.98px) {
  .case-detail__inner {
    padding-inline: var(--container-pad);
  }

  .related-cases__inner {
    padding-inline: var(--container-pad);
  }
}

/* El CPT caso usa el editor, así que the_content() emite etiquetas peladas.
   base.css les quita viñetas y márgenes, se replican por elemento. */
.case-detail__body h2,
.case-detail__body h3 {
  margin: 0;
  font-size: 24px;
  font-weight: var(--fw-bold);
  color: var(--color-navy);
}

.case-detail__body ul,
.case-detail__body ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.case-detail__body ol {
  list-style: decimal;
}

.case-detail__body blockquote {
  margin: 0;
  padding-left: 24px;
  border-left: 4px solid var(--color-orange);
  font-size: 20px;
  font-style: italic;
  color: #555;
}

.case-detail__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.case-detail__body figure {
  margin: 0;
}

.case-detail__body a {
  color: var(--color-orange);
  text-decoration: underline;
}

/* Al reproducir, el bloque cambia el thumbnail por un <video>. */
.case-detail__video.is-playing .case-detail__play {
  display: none;
}
