/* Patrones de imágenes CPA · V1.6. Sin cambios en la cabecera ni en Rank Math. */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern{
  --cpa-p-green:#214d3a;--cpa-p-ochre:#d79a49;--cpa-p-cream:#f6f4ea;
  margin-block:26px 32px;max-width:100%;clear:both;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern *,
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern *::before,
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern *::after{box-sizing:border-box}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .cpa-gd-cols{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;
  margin-block:0;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .wp-block-column{min-width:0;max-width:100%;margin:0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .wp-block-image{margin:0;max-width:100%;min-width:0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .wp-block-image img{
  display:block;max-width:100%;width:100%;height:100%;object-fit:cover;border-radius:13px;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .wp-block-image figcaption{font-size:12px;line-height:1.5;margin-top:7px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern p{font-size:16px;line-height:1.65;margin:0 0 14px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern h3{
  color:var(--cpa-p-green);font-size:21px;line-height:1.32;font-weight:800;
  margin:0 0 10px;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .cpa-gd-pattern-tip{
  background:#faf0df;border-left:4px solid var(--cpa-p-ochre);border-radius:12px;
  padding:14px 17px;margin:10px 0 0;font-size:15px;line-height:1.6;
}
/* 01. Texto + consejo izquierda, foto derecha */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p01 .cpa-gd-cols{grid-template-columns:1.12fr .96fr}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p01 .wp-block-image{height:270px}
/* 02. Panorámica editorial */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p02>.wp-block-image{height:330px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p02 .cpa-gd-caption{color:#607064;font-size:13px;margin-top:8px}
/* 03. Foto izquierda + texto derecha */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p03 .cpa-gd-cols{grid-template-columns:.87fr 1.13fr;align-items:center}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p03 .wp-block-image{height:275px}
/* 04. Dos tarjetas comparativas */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card{
  border:1px solid #e5e5dc;border-radius:14px;overflow:hidden;background:#fff;
  box-shadow:0 8px 20px #173c2a0d;height:100%;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>.wp-block-image{height:205px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>h3,
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>p{margin-left:15px;margin-right:15px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>h3{margin-top:13px;font-size:18px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>p{font-size:14px;margin-bottom:14px}
/* 05. Gran foto con mensaje superpuesto, editables por bloques nativos */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-cover-frame{position:relative;min-height:335px;border-radius:15px;overflow:hidden;background:linear-gradient(115deg,#214d3a,#73945a)}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-cover-frame>.wp-block-image{position:absolute;inset:0;height:100%;width:100%}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-cover-frame>.wp-block-image img{border-radius:0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-cover-frame:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0c3025ef,#0c3025b0 58%,transparent);z-index:1;pointer-events:none}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text{
  position:relative;z-index:2;color:white;max-width:57%;padding:30px 28px;min-height:335px;
  display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text h3{font-size:25px;color:#fff;margin:12px 0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text p{color:#fff}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text .cpa-gd-tag{border-radius:99px;background:#d79a49;color:#173526;font-size:12px;font-weight:800;padding:5px 12px;margin:0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05>.cpa-gd-caption{font-size:13px;background:#f6f4ea;border-left:3px solid #d79a49;padding:9px 12px;margin-top:12px}
/* 06. Galería asimétrica; cada imagen es un bloque seleccionable en Gutenberg. */
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-cols{grid-template-columns:1.32fr 1fr;gap:12px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-large>.wp-block-image{height:370px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-side>.wp-block-image{height:175px}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-large,
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-side{min-width:0}
:where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-photo-caption{font-size:12px;color:#637368;margin:5px 0 8px}
/* En el editor, señalar contenedores sin fotografías como lugares de inserción. */
.editor-styles-wrapper .cpa-gd-pattern .wp-block-image:not(:has(img)){min-height:145px;background:repeating-linear-gradient(-45deg,#f5f3ea,#f5f3ea 9px,#ecece3 9px,#ecece3 18px);border:1px dashed #b7bdab;border-radius:12px}
.editor-styles-wrapper .cpa-gd-pattern .wp-block-image:not(:has(img))::after{content:'Selecciona una fotografía de Medios';display:block;text-align:center;font-size:12px;color:#506452;padding:12px}
@media(max-width:780px){
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .cpa-gd-cols{display:flex;flex-direction:column;gap:15px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-pattern .cpa-gd-cols>.wp-block-column{width:100%}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p01 .wp-block-image,
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p03 .wp-block-image{height:230px;width:100%}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p02>.wp-block-image{height:215px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card{width:100%}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p04 .cpa-gd-photo-card>.wp-block-image{height:195px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-cover-frame{min-height:310px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text{min-height:310px;max-width:82%;padding:23px 18px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p05 .cpa-gd-overlay-text h3{font-size:22px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-large>.wp-block-image{height:230px}
  :where(.cpa-gd-body,.editor-styles-wrapper) .cpa-gd-p06 .cpa-gd-mosaic-side>.wp-block-image{height:200px}
}

/* V1.6: photo placeholders are valid core/image blocks; visually mark them. */
.editor-styles-wrapper .cpa-gd-pattern img[src*="foto-pendiente.svg"]{border:2px dashed #9cab99;object-fit:cover}
