/* =========================================================
   EGDF · Estilos del sitio
   Lleva el resto del sitio al estilo de las landings de cursos:
   mismas tipografías (Barlow Condensed + DM Sans), mismo rojo,
   botones redondeados, tarjetas claras y mejor contraste.
   Las landings (.egdf-lp) tienen sus propios estilos y no se tocan.
   ========================================================= */

:root:root {
  --egdf-rojo: #C8161D;
  --egdf-rojo-hover: #A81218;
  --egdf-rojo-claro: #FF8A8E;
  --egdf-tinta: #111111;
  --egdf-texto: #3D3D3D;
  --egdf-borde: #E6E1D8;
  --egdf-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --egdf-cuerpo: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Colores globales del tema Astra (botones y links de la tienda, carrito, checkout) */
  --ast-global-color-0: var(--egdf-rojo);
  --ast-global-color-1: var(--egdf-rojo-hover);
}

/* ---------- 1. Estilos globales de Elementor (kit del sitio) ---------- */
html [class*="elementor-kit-"] {
  --e-global-color-accent: var(--egdf-rojo);
  --e-global-color-text: #4A4A4A;
  --e-global-typography-primary-font-family: 'Barlow Condensed';
  --e-global-typography-secondary-font-family: 'Barlow Condensed';
  --e-global-typography-text-font-family: 'DM Sans';
  --e-global-typography-accent-font-family: 'DM Sans';
  --e-global-typography-e1dac20-font-family: 'Barlow Condensed'; /* H1 */
  --e-global-typography-270d9cf-font-family: 'Barlow Condensed'; /* texto destacado */
  --e-global-typography-697ae2a-font-family: 'Barlow Condensed'; /* contadores */
  --e-global-typography-7eea746-font-family: 'Barlow Condensed'; /* nombres del equipo */
  --e-global-typography-3c286be-font-family: 'DM Sans';          /* menú */
  --e-global-typography-48c3c9e-font-family: 'DM Sans';          /* submenú */
  --e-global-typography-8e0cee8-font-family: 'DM Sans';          /* H5 */
  --e-global-typography-1afaa81-font-family: 'DM Sans';          /* H6 */
  --e-global-typography-73b1c24-font-family: 'DM Sans';          /* títulos de entradas */
}

/* ---------- 2. Tipografía ---------- */
/* Texto: DM Sans en todo el sitio (muchos bloques tenían Montserrat, Raleway o Roboto fijos). */
body,
body .elementor-widget-text-editor,
body .elementor-icon-list-text,
body .elementor-button,
body .elementor-nav-menu a,
body .elementor-image-box-description,
body .elementor-icon-box-description,
body .elementor-testimonial-content,
body .elementor-field-group,
body .woocommerce,
body input, body select, body textarea, body button {
  font-family: var(--egdf-cuerpo) !important;
}
body .elementor-widget-text-editor {
  font-size: 16px !important;
  line-height: 1.65 !important;
}

/* Títulos grandes: Barlow Condensed en mayúsculas, como en las landings. */
body .elementor-widget-heading h1.elementor-heading-title,
body .elementor-widget-heading h2.elementor-heading-title,
body .elementor-widget-heading h3.elementor-heading-title,
body .elementor-image-box-title,
body .elementor-icon-box-title,
body .woocommerce-products-header__title,
body .product_title,
body h1.entry-title,
body .cart_totals > h2,
body #order_review_heading,
body .woocommerce-billing-fields > h3,
body .woocommerce-MyAccount-content h2,
body .woocommerce form.login > h2, body .u-column1 > h2, body .u-column2 > h2 {
  font-family: var(--egdf-display) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0 !important;
  line-height: 1.02 !important;
}
/* Títulos chicos (h4 a h6): DM Sans en negrita, sin mayúsculas forzadas. */
body .elementor-widget-heading h4.elementor-heading-title,
body .elementor-widget-heading h5.elementor-heading-title,
body .elementor-widget-heading h6.elementor-heading-title {
  font-family: var(--egdf-cuerpo) !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
}

/* ---------- 3. Botones ---------- */
body .elementor-button:not(.hfe-cart-container) {
  border-radius: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 14px 24px !important;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
body .elementor-button:not(.hfe-cart-container):hover { transform: translateY(-1px); }

/* Botones de la tienda, el carrito, el checkout y los formularios: rojo de la marca (antes azul del tema). */
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button,
body .woocommerce #respond input#submit,
body .woocommerce a.button.alt,
body .woocommerce button.button.alt,
body.woocommerce-page a.button,
body .add_to_cart_button,
body .single_add_to_cart_button,
body .checkout-button,
body #place_order,
body .wc-block-components-button,
body .wpforms-submit,
body .ff-btn-submit,
body .woocommerce-message .button {
  background: var(--egdf-rojo) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  font-family: var(--egdf-cuerpo) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  padding: 14px 22px !important;
  min-height: 48px;
  text-transform: none !important;
  box-shadow: none !important;
}
body .woocommerce a.button:hover,
body .woocommerce button.button:hover,
body .add_to_cart_button:hover,
body .single_add_to_cart_button:hover,
body .checkout-button:hover,
body #place_order:hover,
body .wpforms-submit:hover,
body .ff-btn-submit:hover {
  background: var(--egdf-rojo-hover) !important;
}
body .woocommerce button.button:disabled,
body .woocommerce button.button:disabled[disabled] { opacity: .45 !important; }

/* ---------- 4. Tienda: tarjetas de cursos ---------- */
body .woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid var(--egdf-borde);
  border-radius: 18px;
  padding: 12px 12px 18px !important;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
body .woocommerce ul.products li.product:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
body .woocommerce ul.products li.product a img {
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 12px !important;
}
body .woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--egdf-cuerpo) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  color: var(--egdf-tinta) !important;
}
body .woocommerce ul.products li.product .price {
  font-family: var(--egdf-cuerpo) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--egdf-tinta) !important;
}
body .woocommerce ul.products li.product .price del { color: #8A8A8A !important; font-weight: 400 !important; font-size: 14px !important; }
body .woocommerce ul.products li.product .price ins { color: var(--egdf-rojo) !important; text-decoration: none !important; }
body .woocommerce ul.products li.product .button {
  margin-top: auto !important;
  align-self: stretch;
  text-align: center;
  white-space: normal;
}
/* Galería de la página de producto: WooCommerce la deja invisible hasta que corre su script,
   y en producción LiteSpeed demora ese script hasta que el visitante interactúa. */
body .woocommerce-product-gallery { opacity: 1 !important; }
body.single-product div.product .woocommerce-product-gallery__image img { border-radius: 18px; }
body .woocommerce span.onsale,
body .ast-onsale-card {
  background: var(--egdf-rojo) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  border: 0 !important;
}

/* ---------- 5. Formularios (carrito, checkout, mi cuenta, contacto, inscripciones) ---------- */
body .woocommerce form .input-text,
body .woocommerce form select,
body .woocommerce-page form .input-text,
body .select2-container .select2-selection--single,
body .elementor-field-group .elementor-field-textual,
body .wpforms-container input[type="text"],
body .wpforms-container input[type="email"],
body .wpforms-container input[type="tel"],
body .wpforms-container input[type="number"],
body .wpforms-container select,
body .wpforms-container textarea,
body .ff-el-form-control {
  border: 1px solid #D8D3CA !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--egdf-tinta) !important;
  font-family: var(--egdf-cuerpo) !important;
  font-size: 16px !important;
  min-height: 48px;
}
body .woocommerce form .input-text,
body .elementor-field-group .elementor-field-textual,
body .wpforms-container input, body .wpforms-container textarea,
body .ff-el-form-control { padding: 12px 14px !important; }
body .select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px !important; }
body .woocommerce form .input-text:focus,
body .elementor-field-group .elementor-field-textual:focus,
body .wpforms-container input:focus, body .wpforms-container textarea:focus,
body .ff-el-form-control:focus {
  border-color: var(--egdf-rojo) !important;
  outline: 3px solid rgba(200, 22, 29, .15) !important;
}

/* ---------- 6. Header del sitio ---------- */
/* Ícono del carrito: el ícono de la bolsa no se dibujaba y solo se veía el cuadrado rojo. */
body .elementor-widget-hfe-cart.toggle-icon--bag-medium .elementor-button-icon i::before,
body .elementor-widget-hfe-cart .elementor-button-icon i.eicon:empty::before {
  content: "\e8e4";
  font-family: eicons;
}

/* El botón del carrito tomaba el rojo de acento como fondo y la bolsa (también roja) no se veía.
   Bolsa blanca con el contador en rojo: se lee sobre el header negro y sobre el rojo del inicio. */
body #masthead .hfe-cart-container.elementor-button {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 6px !important;
}
body #masthead .hfe-cart-container .elementor-button-icon,
body #masthead .hfe-cart-container .elementor-button-icon i { color: #fff !important; font-size: 26px !important; }
body #masthead .hfe-cart-container .elementor-button-icon[data-counter]::before {
  background: var(--egdf-rojo) !important;
  color: #fff !important;
  font-family: var(--egdf-cuerpo) !important;
  font-weight: 700;
}

/* Celular y tablet: logo, carrito y menú en una sola fila (antes quedaban apilados, ~300px de alto). */
@media (max-width: 1024px) {
  body .elementor-element-76a2e5f { min-height: 0 !important; }
  body .elementor-element-76a2e5f > .elementor-container {
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 64px !important;
    padding: 6px 12px;
  }
  body .elementor-element-76a2e5f > .elementor-container > .elementor-column { width: auto !important; }
  body .elementor-element-76a2e5f .elementor-element-2725c92 { flex: 1 1 auto; }
  body .elementor-element-76a2e5f .elementor-element-2725c92 > .elementor-widget-wrap { padding: 0 !important; justify-content: flex-start !important; }
  body .elementor-element-76a2e5f .elementor-element-2725c92 img { height: 52px !important; max-height: none !important; width: auto !important; max-width: none !important; }
  body .elementor-element-76a2e5f .elementor-element-2725c92 .elementor-widget-container,
  body .elementor-element-76a2e5f .elementor-element-2725c92 .elementor-image { text-align: left !important; }
  body .elementor-element-76a2e5f .elementor-element-d2c8de7 { flex: 0 0 auto; order: 2; }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 { flex: 0 0 auto; order: 3; }
  /* El menú desplegado ocupa todo el ancho, debajo del header, en lugar de una columna angosta. */
  body .elementor-element-76a2e5f { position: relative; }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63,
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 > .elementor-widget-wrap,
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 .elementor-widget,
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 .elementor-widget-container { position: static !important; align-self: center; }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    z-index: 999;
    background: #111 !important;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .35);
  }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown a {
    color: #fff !important;
    background: transparent !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 14px 20px !important;
    line-height: 1.3 !important;
    border-bottom: 1px solid #222;
  }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown > ul { margin: 0 !important; }
  body #masthead .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown.elementor-nav-menu__container { margin-top: 0 !important; }
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown a:hover,
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 nav.elementor-nav-menu--dropdown a.elementor-item-active { color: var(--egdf-rojo-claro) !important; }
  body .elementor-element-76a2e5f .elementor-element-d2c8de7 > .elementor-widget-wrap,
  body .elementor-element-76a2e5f .elementor-element-5ef0a63 > .elementor-widget-wrap { padding: 0 6px !important; }
}

/* Menú (☰) en blanco y centrado: antes era gris oscuro sobre el header negro. */
body #masthead .elementor-menu-toggle { color: #fff !important; background: transparent !important; }
body #masthead .elementor-menu-toggle svg { fill: #fff !important; }
body .elementor-element-76a2e5f > .elementor-container > .elementor-column > .elementor-widget-wrap { align-content: center !important; align-items: center !important; }

/* Animaciones de entrada de Elementor: en producción LiteSpeed demora el JavaScript hasta que el visitante
   interactúa, y mientras tanto el contenido animado (como el título del inicio) quedaba invisible.
   Así se ve siempre; cuando el script carga, la animación corre igual. */
body .elementor-invisible { visibility: visible !important; }

/* ---------- 7. Páginas de categoría: la lista de cursos como tarjetas ---------- */
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-items:not(.elementor-inline-items) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-item {
  background: #1C1C1C;
  border: 1px solid #2A2A2A;
  border-radius: 14px;
  padding: 0 !important;
  margin: 0 !important;
  transition: border-color .2s, background-color .2s;
}
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-item:hover {
  border-color: var(--egdf-rojo);
  background: #232323;
}
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-item > a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
}
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-text {
  font-size: 15px !important;
  line-height: 1.35 !important;
  color: #fff !important;
  padding: 0 !important;
}
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-icon i,
:is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-icon svg {
  color: var(--egdf-rojo-claro) !important;
  fill: var(--egdf-rojo-claro) !important;
}

/* ---------- 8. Cursos a distancia: títulos legibles sobre el fondo gris oscuro ---------- */
.elementor-333 .elementor-widget-heading .elementor-heading-title { color: #fff !important; }
.elementor-333 .elementor-widget-text-editor,
.elementor-333 .elementor-icon-list-text { color: #EDEDED !important; }
/* Subtítulos escritos en el editor con el rojo a mano: pasan a títulos blancos en Barlow. */
.elementor-333 .elementor-widget-text-editor span[style*="C8161D"] {
  display: block;
  color: #fff !important;
  font-family: var(--egdf-display) !important;
  font-weight: 800 !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- 9. Celular: imágenes centradas y listas que no se cortan ---------- */
@media (max-width: 767px) {
  body .elementor-widget-image { text-align: center !important; }
  body .elementor-widget-image img { margin-left: auto !important; margin-right: auto !important; }
  :is(.elementor-350, .elementor-348, .elementor-346, .elementor-352, .elementor-660) .elementor-icon-list-items:not(.elementor-inline-items) { grid-template-columns: minmax(0, 1fr); }
  body .elementor-widget-text-editor { font-size: 15px !important; }
  /* Tienda en celular: tarjetas de dos columnas, botón en una línea. */
  body .woocommerce ul.products li.product { padding: 8px 8px 12px !important; }
  body .woocommerce ul.products li.product .button { font-size: 13px !important; padding: 10px 12px !important; min-height: 40px; white-space: nowrap; align-self: stretch; text-align: center; }
  body .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; }
}
