/* =========================================================
   v0.12.26 — SISTEMA GLOBAL DE IMÁGENES EDITORIALES

   GRID (cinco secciones):
   - Pensamientos
   - Poesías
   - Arcanos Mayores
   - Arcanos Menores
   - Símbolos y Misterios

   HERO con imagen (cuatro tipos):
   - Pensamientos
   - Arcanos Mayores
   - Arcanos Menores
   - Símbolos y Misterios

   Poesías NO lleva imagen de portada dentro de la entrada.
   Su imagen destacada se reserva únicamente para GRID/listado.

   GRID: 1551 × 1014.
   HERO escritorio: cada mitad es 1:1; imagen recomendada 1600 × 1600.
   HERO móvil: imagen 870:768 (1740 × 1536 recomendada).
   El texto nunca puede estirar la imagen del Hero.
   ========================================================= */

/* ---------------------------------------------------------
   1. GRID / LISTADOS — MISMA CAJA EN LAS CINCO SECCIONES
   --------------------------------------------------------- */
:is(
  body.page-id-2059,
  body.page-id-1471,
  body.page-id-1421,
  body.page-id-1423,
  body.page-id-1425
) .lm-post-row__image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1551 / 1014 !important;
  overflow: hidden !important;
}

:is(
  body.page-id-2059,
  body.page-id-1471,
  body.page-id-1421,
  body.page-id-1423,
  body.page-id-1425
) .lm-post-row__image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* ---------------------------------------------------------
   2. HERO ESCRITORIO — DOS MITADES; CADA MITAD CUADRADA
   --------------------------------------------------------- */
@media (min-width: 901px) {
  body.lm-single-pensamientos .lm-thought-hero,
  body.lm-single-arcanos .lm-arcano-hero,
  body.lm-single-simbolos .lm-sm-hero {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
    grid-template-rows: minmax(0,1fr) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art,
  body.lm-single-arcanos .lm-arcano-hero__art,
  body.lm-single-simbolos .lm-sm-hero__art {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art picture,
  body.lm-single-arcanos .lm-arcano-hero__art picture,
  body.lm-single-simbolos .lm-sm-hero__art picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art img,
  body.lm-single-arcanos .lm-arcano-hero__art img,
  body.lm-single-simbolos .lm-sm-hero__art img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__copy,
  body.lm-single-arcanos .lm-arcano-hero__copy,
  body.lm-single-simbolos .lm-sm-hero__copy {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  /* Símbolos: imagen izquierda + texto derecha. */
  body.lm-single-simbolos .lm-sm-hero__art {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.lm-single-simbolos .lm-sm-hero__copy {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

/* ---------------------------------------------------------
   3. TABLET — APILADO; PORTADA ESCRITORIO SIGUE 1:1
   --------------------------------------------------------- */
@media (min-width: 681px) and (max-width: 900px) {
  body.lm-single-pensamientos .lm-thought-hero,
  body.lm-single-arcanos .lm-arcano-hero,
  body.lm-single-simbolos .lm-sm-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art,
  body.lm-single-arcanos .lm-arcano-hero__art,
  body.lm-single-simbolos .lm-sm-hero__art {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    order: 1 !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__copy,
  body.lm-single-arcanos .lm-arcano-hero__copy,
  body.lm-single-simbolos .lm-sm-hero__copy {
    height: auto !important;
    min-height: 0 !important;
    order: 2 !important;
    overflow: visible !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art img,
  body.lm-single-arcanos .lm-arcano-hero__art img,
  body.lm-single-simbolos .lm-sm-hero__art img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
  }
}

/* ---------------------------------------------------------
   4. MÓVIL — MISMA PROPORCIÓN 870:768 EN ENTRADAS CON PORTADA
   --------------------------------------------------------- */
@media (max-width: 680px) {
  body.lm-single-pensamientos .lm-thought-hero,
  body.lm-single-arcanos .lm-arcano-hero,
  body.lm-single-simbolos .lm-sm-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art,
  body.lm-single-arcanos .lm-arcano-hero__art,
  body.lm-single-simbolos .lm-sm-hero__art {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 870 / 768 !important;
    order: 1 !important;
    overflow: hidden !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__art picture,
  body.lm-single-arcanos .lm-arcano-hero__art picture,
  body.lm-single-simbolos .lm-sm-hero__art picture,
  body.lm-single-pensamientos .lm-thought-hero__art img,
  body.lm-single-arcanos .lm-arcano-hero__art img,
  body.lm-single-simbolos .lm-sm-hero__art img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  body.lm-single-pensamientos .lm-thought-hero__copy,
  body.lm-single-arcanos .lm-arcano-hero__copy,
  body.lm-single-simbolos .lm-sm-hero__copy {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    order: 2 !important;
    overflow: visible !important;
  }
}


/* ---------------------------------------------------------
   5. SOMBRA DEL ARCANO — ESCRITORIO: DOS MITADES 1:1

   La longitud del texto ya no puede estirar la imagen.
   En escritorio amplio cada lado es un cuadrado exacto.
   En anchos intermedios/móvil se conserva el responsive
   existente del tema para evitar texto excesivamente pequeño.
   --------------------------------------------------------- */
@media (min-width: 1101px) {
  body.lm-single-arcanos .lm-ad-sombra {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__copy,
  body.lm-single-arcanos .lm-ad-sombra__art {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__copy {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: var(--lm-shadow-padding, clamp(42px, 4.2vw, 86px))
             5vw
             var(--lm-shadow-padding, clamp(42px, 4.2vw, 86px))
             max(5vw, calc((100vw - 1240px) / 2)) !important;
  }

  body.lm-single-arcanos .lm-ad-sombra h2 {
    font-size: var(--lm-shadow-heading-size, clamp(34px, 2.7vw, 48px)) !important;
    line-height: 1.08 !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__heading {
    margin-bottom: var(--lm-shadow-heading-margin, 26px) !important;
  }

  body.lm-single-arcanos .lm-ad-sombra p {
    font-size: var(--lm-shadow-body-size, clamp(14px, 1vw, 16px)) !important;
    line-height: var(--lm-shadow-line-height, 1.68) !important;
    margin-bottom: var(--lm-shadow-paragraph-gap, 18px) !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__art {
    align-self: stretch !important;
    background-position: center 26% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
}

/*
 * En escritorio estrecho no comprimimos las dos columnas.
 * Antes de que el texto obligue a una tipografía demasiado pequeña,
 * la sección pasa a flujo vertical y la imagen sigue siendo cuadrada.
 */
@media (min-width: 901px) and (max-width: 1100px) {
  body.lm-single-arcanos .lm-ad-sombra {
    display: grid !important;
    grid-template-columns: 1fr !important;
    aspect-ratio: auto !important;
    min-height: 0 !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__copy {
    height: auto !important;
    min-height: 0 !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__art {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    background-size: cover !important;
    background-position: center 26% !important;
  }
}
/* =========================================================
   SOMBRA DEL ARCANO — IMAGEN HORIZONTAL 3:2
   Mantiene la composición original sin deformar ni recortar
   agresivamente la imagen.
   Solo escritorio / tablet horizontal.
   ========================================================= */

@media (min-width: 1101px) {

  body.lm-single-arcanos .lm-ad-sombra {
    aspect-ratio: 3 / 1 !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__copy {
    aspect-ratio: auto !important;
    height: 100% !important;
  }

  body.lm-single-arcanos .lm-ad-sombra__art {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 3 / 2 !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}


/* Escritorio estrecho / tablet horizontal:
   cuando la sección se apila, la imagen también permanece 3:2. */
@media (min-width: 901px) and (max-width: 1100px) {

  body.lm-single-arcanos .lm-ad-sombra__art {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}