/* Estudios «¿Cuánto cuesta?» (1.21.0; inc/study.php, template-parts/study/). Con modelo de portada se carga encima de
   css/home-base.css y css/single.css y usa sus tonos; sin modelo, los valores de reserva de cada var(). */

.imk-study-page .entry-meta, .imk-study-page .post-thumb-img-content { display: none }  /* autor y foto de Astra: sobran */
.imk-study { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; color: var(--imk-ink, inherit) }  /* minmax: las tablas anchas se desplazan dentro, no estiran la página */
.imk-study h2 { margin: 0; font-family: var(--imk-display, inherit); font-weight: 500; font-size: 1.45rem; line-height: 1.2; text-wrap: balance }
.imk-study p { margin: 0; max-width: 72ch }
.imk-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }

/* Barra de precios: la franja de la mitad de los modelos y el precio típico, a escala entre el mínimo y el máximo */
.imk-study figure.imk-study-range { display: grid; gap: 10px; margin: 0; padding-block: 28px 4px; padding-inline: 0; border: 0; background: none; box-shadow: none !important }  /* Astra pone sombra a las figuras del post */
.imk-study-figures { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: .9rem; color: var(--imk-muted, #666) }
.imk-study-figures b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--imk-ink, #222);
  font-variant-numeric: tabular-nums; white-space: nowrap }
.imk-study-track { position: relative; height: 14px; border-radius: 7px; background: var(--imk-line, #e5e5e5) }
.imk-study-band { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--imk-accent, #555) }
.imk-study-mark { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--imk-ink, #222) }
.imk-study-ticks { display: flex; justify-content: space-between; font-size: .8rem; color: var(--imk-muted, #666); font-variant-numeric: tabular-nums }

.imk-study-section { display: grid; gap: 10px }
.imk-study-section p, .imk-study-method p { line-height: 1.6 }

/* Tablas */
.imk-study-scroll { overflow-x: auto }
.imk-single table.imk-study-table, table.imk-study-table { width: 100%; min-width: 560px; margin: 0; border-collapse: collapse; border: 0; font-size: .92rem }
.imk-study-table th, .imk-study-table td { padding: 12px; border: 0; border-bottom: 1px solid var(--imk-line, #e5e5e5); text-align: left; vertical-align: top; background: none }
.imk-study-table thead th { border-bottom: 2px solid var(--imk-ink, #222); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--imk-muted, #666) }
.imk-study-table .imk-num { text-align: right }
.imk-study-bandname { font-weight: 700; color: var(--imk-accent, inherit); white-space: nowrap }
.imk-study-bands tbody + tbody tr:first-child > * { border-top: 2px solid var(--imk-line, #e5e5e5) }
.imk-study-model-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0 }  /* miniatura y datos (1.21.2) */
.imk-study-model-row .imk-guide-photo { width: 64px; height: 64px }
.imk-study-model-in { display: grid; gap: 5px; justify-items: start; min-width: 0 }
.imk-study-page .entry-content .imk-study a:not(.imk-study-guide) { text-decoration: none }  /* Astra subraya los enlaces del contenido */
.imk-home a.imk-study-name, a.imk-study-name { font-weight: 600; line-height: 1.3 }
.imk-home a.imk-study-name:hover { color: var(--imk-accent) }
.imk-study-badge { font-size: .72rem; font-weight: 700; color: var(--imk-accent, inherit); border: 1px solid currentColor; border-radius: 999px; padding: 1px 9px }
.imk-study-offer { font-size: .82rem; line-height: 1.4; color: var(--imk-muted, #666) }
.imk-study-tags { display: flex; flex-wrap: wrap; gap: 4px }
.imk-study-tags .imk-chip { font-size: .7rem }
.imk-study-price b { font-size: 1rem }
.imk-study-price small { display: block; max-width: 22ch; margin-left: auto; white-space: normal; text-align: right; font-size: .7rem; color: var(--imk-muted, #666) }
.imk-study-links-in { display: grid; gap: 6px; justify-items: center; min-width: 140px }
.imk-home a.imk-btn.imk-study-deal { min-height: 38px; width: 100%; padding: 0 16px; font-size: .85rem }
.imk-home a.imk-study-guide, a.imk-study-guide { font-size: .78rem; color: var(--imk-muted, #666); text-decoration: underline; text-underline-offset: 3px }
.imk-home a.imk-study-guide:hover { color: var(--imk-accent) }

/* Preguntas frecuentes y método */
.imk-study-faq { display: grid; gap: 8px }
.imk-study-faq .imk-title { margin-bottom: 6px }
.imk-study-faq details { border: 1px solid var(--imk-line, #e5e5e5); border-radius: 10px; padding: 12px 16px }
.imk-study-faq summary { cursor: pointer; font-weight: 600; line-height: 1.35 }
.imk-study-faq details[open] summary { color: var(--imk-accent, inherit) }
.imk-study-faq details p { margin-top: 8px }
.imk-study-method { display: grid; gap: 6px; margin-top: 34px; padding-top: 18px !important; border-top: 1px solid var(--imk-line, #e5e5e5); font-size: .88rem; color: var(--imk-muted, #666) }
.imk-study .imk-study-method h2 { font-family: var(--imk-body, inherit); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase }

/* Listado */
.imk-study-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.imk-study-card { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 18px 20px; border: 1px solid var(--imk-line); border-radius: 10px; background: var(--imk-surface) }
.imk-study-card .imk-eyebrow { color: var(--imk-accent) }
.imk-study-card-title { font-family: var(--imk-display); font-weight: 500; font-size: 1.2rem; line-height: 1.2; text-wrap: balance }
.imk-study-card:hover { border-color: var(--imk-accent) }
.imk-study-card:hover .imk-study-card-title { color: var(--imk-accent) }
.imk-study-card-figures { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .82rem; color: var(--imk-muted) }
.imk-study-card-figures b { display: block; font-size: 1.1rem; color: var(--imk-ink); font-variant-numeric: tabular-nums; white-space: nowrap }

@media (max-width: 860px) {
  .imk-study-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}
@media (max-width: 700px) {
  .imk-study-cards { grid-template-columns: minmax(0, 1fr) }
  /* Modelos por presupuesto en tarjetas: cada modelo en su bloque, con la franja encima del primero */
  .imk-study-bands { min-width: 0 !important }
  .imk-study-bands thead { display: none }
  .imk-study-bands, .imk-study-bands tbody, .imk-study-bands tr, .imk-study-bands th, .imk-study-bands td { display: block; width: 100% }
  .imk-study-bands tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--imk-line, #e5e5e5) }
  .imk-study-bands th, .imk-study-bands td { padding: 0 !important; border: 0 !important }
  .imk-study-bandname { grid-column: 1 / -1; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase }
  .imk-study-model { grid-column: 1 / -1 }
  .imk-study-bands .imk-study-price { text-align: left }
  .imk-study-price small { margin-left: 0; text-align: left }
  .imk-study-links-in { min-width: 0; justify-items: end }
  .imk-home a.imk-btn.imk-study-deal { width: auto }
}
