/* =================================================================
   EJECUTORA.COM — Elementor Compatibility CSS
   Ajustes para que el design system coexista sin conflictos
   con el editor y el frontend de Elementor.
   ================================================================= */


/* ─── Resetear márgenes que Elementor agrega al body ─────────── */

body.elementor-page {
  margin: 0 !important;
  padding: 0 !important;
}


/* ─── Eliminar padding del wrapper de secciones Elementor ──────── */

.elementor-section-wrap,
.elementor-container {
  max-width: 100% !important;
}


/* ─── Secciones de Elementor full-width ──────────────────────── */

.elementor-section.elementor-section-full_width > .elementor-container {
  max-width: 100% !important;
}


/* ─── Preservar sticky del header nativo del tema ──────────────── */

#ej-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}


/* ─── Fuentes del sistema de diseño disponibles en Elementor ──── */


/* ─── Variables CSS disponibles dentro del editor de Elementor ── */

.elementor-editor-active :root,
.elementor-preview :root {
  --ej-cyan:         #00C2CB;
  --ej-cyan-dark:    #00A8B0;
  --ej-cyan-light:   #E8FFFE;
  --ej-navy:         #1A1F6E;
  --ej-violet:       #7B5CF5;
  --ej-pink:         #FF6B8A;
  --ej-white:        #FFFFFF;
  --ej-bg:           #FFFFFF;
  --ej-body:         #2A2A3A;
  --ej-secondary:    #5A5A72;
  --ej-border:       #E0E8FF;
  --ej-font-display: 'Poppins', sans-serif;
  --ej-font-body:    'Nunito Sans', sans-serif;
  --ej-font-mono:    'JetBrains Mono', monospace;
  --shadow-sm:  0 2px 8px rgba(26,31,110,0.08);
  --shadow-md:  0 4px 20px rgba(26,31,110,0.10);
  --shadow-lg:  0 8px 40px rgba(26,31,110,0.14);
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  50px;
}


/* ─── Corregir conflicto de box-sizing en widgets de Elementor ── */

.elementor-widget-wrap,
.elementor-widget-container {
  box-sizing: border-box;
}


/* ─── Evitar que Elementor override el color de links globales ── */

.elementor-widget a:not([class]) {
  color: var(--ej-cyan-dark);
  text-decoration: none;
}

.elementor-widget a:not([class]):hover {
  color: var(--ej-cyan);
}


/* ─── Shortcodes dentro de Elementor Text Editor ────────────────  */

.elementor-widget-text-editor .ej-blog-archive-wrapper,
.elementor-widget-shortcode .ej-blog-archive-wrapper {
  width: 100%;
  margin: 0 -40px; /* compensar padding del widget */
}


/* ─── Template Elementor Canvas (sin header/footer) ─────────── */

body.elementor-template-canvas #ej-header,
body.elementor-template-canvas .ej-footer {
  display: none !important;
}


/* ─── Template Elementor Full Width ──────────────────────────── */

body.elementor-template-full-width .site-content,
body.elementor-template-full-width #page {
  padding: 0 !important;
  margin: 0 !important;
}


/* ─── Evitar doble margin en posts con Elementor ────────────── */

.single-post .elementor-section:first-child {
  margin-top: 0 !important;
}


/* ─── Panel del editor: preview de las clases ej-* ─────────── */

.elementor-preview .ej-badge,
.elementor-preview .ej-kicker,
.elementor-preview .ej-tag {
  display: inline-flex;
}

.elementor-preview .ej-post-cover {
  height: 210px;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
