/* EMFF en WordPress: compatibilidad del diseño con Elementor y con el editor de entradas. */

/* Los envoltorios de Elementor no generan caja en la web: el marcado del diseño queda
   como en el original (cabecera fija, portada «sticky», bordes redondeados entre bloques).
   En el editor sí se mantienen para poder seleccionar cada sección. */
body:not(.elementor-editor-active) [data-elementor-type]:has(> .e-con.emff-page),
body:not(.elementor-editor-active) .e-con.emff-page,
body:not(.elementor-editor-active) .e-con.emff-page > .e-con-inner,
body:not(.elementor-editor-active) .emff-page .elementor-element.elementor-widget,
body:not(.elementor-editor-active) .emff-page .elementor-widget > .elementor-widget-container {
  display: contents;
}

/* Elementor no debe añadir márgenes ni rellenos a las secciones del diseño. */
.e-con.emff-page { --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px; --widgets-spacing: 0px; --content-width: 100%; --width: 100%; }
.emff-page .elementor-widget { margin: 0; }
.emff-page .elementor-widget:not(:last-child) { margin-block-end: 0; }
.elementor .emff-page img, .emff-page img { border-radius: inherit; box-shadow: none; }

/* El contenido que sigue a la portada «sticky» de Inicio queda por encima de ella
   (en el diseño: [data-el="hero-full"] ~ *). */
.elementor-element:has([data-el="hero-full"]) ~ .elementor-element > * { position: relative; z-index: 1; }

/* Elementos ocultos por el script (estados de formularios, botón de vídeo). */
[hidden] { display: none !important; }

/* Cuerpo de las entradas: estilos para el texto escrito con el editor de bloques
   (los artículos importados ya traen sus estilos en línea). */
[data-emff-cuerpo] > h2:not([style]) { margin-top: 16px; font: 500 clamp(24px, 2.4vw, 34px) / 1.18 Switzer, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; letter-spacing: -0.028em; color: #043948; text-wrap: pretty; }
[data-emff-cuerpo] > h3:not([style]) { margin-top: 8px; font: 500 clamp(18px, 1.6vw, 22px) / 1.3 Switzer, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; letter-spacing: -0.02em; color: #043948; }
[data-emff-cuerpo] > ul:not([style]), [data-emff-cuerpo] > ol:not([style]) { display: flex; flex-direction: column; gap: 10px; padding-left: 1.2em; }
[data-emff-cuerpo] > ul:not([style]) { list-style: disc; }
[data-emff-cuerpo] > ol:not([style]) { list-style: decimal; }
[data-emff-cuerpo] > blockquote:not([style]), [data-emff-cuerpo] > .wp-block-quote { margin: 12px 0 0; padding: clamp(26px, 3vw, 40px); border-radius: 32px; background: #FFFFFF; border: 0; }
[data-emff-cuerpo] > figure:not([style]), [data-emff-cuerpo] > .wp-block-image { margin: 8px 0 0; overflow: hidden; border-radius: 24px; }
[data-emff-cuerpo] > .wp-block-image img { display: block; width: 100%; height: auto; }
[data-emff-cuerpo] figcaption { padding: 12px 4px 0; font: 400 13px/1.5 "Geist Mono", monospace; color: rgba(4, 57, 72, 0.72); }
[data-emff-cuerpo] a:not([style]) { color: #056876; text-decoration: underline; text-underline-offset: 2px; }

/* Barra de administración de WordPress con la cabecera fija del diseño. */
.admin-bar [data-el="header"] { top: 32px; }
@media (max-width: 782px) { .admin-bar [data-el="header"] { top: 46px; } }
