/* ================================================
   GOWEBIX TEXT BLOCK PRO v3.0 - BLOQUE DE TEXTO PROFESIONAL
   ================================================ */

/* ========================
   1. BASE Y ESTRUCTURA
   ======================== */

/* Icono WPBakery Backend */
.gowebix-custom-icon.fa-align-left {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
  font-size: 22px;
  color: #00C2E5;
}

/* Contenedor principal */
.gowebix-textblock-pro {
  box-sizing: border-box;
  position: relative;
  margin-bottom: 20px;
  
  /* Variables CSS por defecto */
  --tb-font-size: 16px;
  --tb-font-weight: 300;
  --tb-line-height: 1.7;
  --tb-letter-spacing: 0px;
  --tb-text-color: #6F6F6F;
  --tb-link-color: #00C2E5;
  --tb-link-hover-color: #0099B8;
  --tb-max-width: none;
  --tb-text-transform: none;
  
  /* Aplicar variables */
  font-size: var(--tb-font-size);
  font-weight: var(--tb-font-weight);
  line-height: var(--tb-line-height);
  letter-spacing: var(--tb-letter-spacing);
  color: var(--tb-text-color);
  max-width: var(--tb-max-width);
  text-transform: var(--tb-text-transform);
}

/* Contenedor de contenido */
.gowebix-textblock-pro-content {
  position: relative;
  z-index: 1;
  text-transform: inherit;
}

/* ========================
   2. ELEMENTOS DE CONTENIDO
   ======================== */

/* Párrafos */
.gowebix-textblock-pro-content p {
  margin-top: 0;
  margin-bottom: 1.2em;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  opacity: 0.95;
  text-transform: inherit;
}

.gowebix-textblock-pro-content p:last-child {
  margin-bottom: 0;
}

/* Encabezados */
.gowebix-textblock-pro-content h1,
.gowebix-textblock-pro-content h2,
.gowebix-textblock-pro-content h3,
.gowebix-textblock-pro-content h4,
.gowebix-textblock-pro-content h5,
.gowebix-textblock-pro-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
  opacity: 0.98;
  text-transform: inherit;
}

.gowebix-textblock-pro-content > h1:first-child,
.gowebix-textblock-pro-content > h2:first-child,
.gowebix-textblock-pro-content > h3:first-child,
.gowebix-textblock-pro-content > h4:first-child,
.gowebix-textblock-pro-content > h5:first-child,
.gowebix-textblock-pro-content > h6:first-child {
  margin-top: 0;
}

/* Listas */
.gowebix-textblock-pro-content ul,
.gowebix-textblock-pro-content ol {
  margin: 0 0 1.2em 1.5em;
  padding: 0;
}

.gowebix-textblock-pro-content li {
  margin-bottom: 0.4em;
  line-height: inherit;
  opacity: 0.9;
  text-transform: inherit;
}

/* Enlaces */
.gowebix-textblock-pro-content a {
  color: var(--tb-link-color);
  text-decoration: none;
  transition: color 0.3s ease;
  opacity: 1;
  text-transform: inherit;
}

.gowebix-textblock-pro-content a:hover {
  color: var(--tb-link-hover-color);
  opacity: 0.9;
}

/* Excepciones para elementos especiales */
.gowebix-textblock-pro-content code,
.gowebix-textblock-pro-content pre,
.gowebix-textblock-pro-content abbr,
.gowebix-textblock-pro-content kbd,
.gowebix-textblock-pro-content var {
  text-transform: none !important;
}

.gowebix-textblock-pro-content abbr[title] {
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
}

/* ========================
   3. ALINEACIONES Y TRANSFORMACIONES
   ======================== */

/* Alineaciones */
.gowebix-textblock-pro.gowebix-tb-align-left {
  text-align: left;
}

.gowebix-textblock-pro.gowebix-tb-align-center {
  text-align: center;
}

.gowebix-textblock-pro.gowebix-tb-align-right {
  text-align: right;
}

.gowebix-textblock-pro.gowebix-tb-align-justify {
  text-align: justify;
  hyphens: auto;
}

/* Transformaciones de texto */
.gowebix-textblock-pro[style*="--tb-text-transform:uppercase"] {
  text-transform: uppercase !important;
}

.gowebix-textblock-pro[style*="--tb-text-transform:lowercase"] {
  text-transform: lowercase !important;
}

.gowebix-textblock-pro[style*="--tb-text-transform:capitalize"] {
  text-transform: capitalize !important;
}

/* ========================
   4. EFECTOS AVANZADOS
   ======================== */

/* Texto ultra fino - SIN OPACIDAD QUE CREA MARRÓN */
.gowebix-textblock-pro.gowebix-tb-ultra-thin {
  /* Aplicar a todo el bloque */
  font-weight: 200 !important;
  letter-spacing: 0.02em !important;
  color: var(--tb-text-color, #6F6F6F) !important;
}

/* Párrafos específicos - mantener color */
.gowebix-textblock-pro.gowebix-tb-ultra-thin .gowebix-textblock-pro-content p {
  font-weight: 200 !important;
  letter-spacing: 0.02em !important;
  color: inherit !important; /* Hereda del padre */
  opacity: 1 !important; /* FIJAR OPACIDAD A 1 */
}

/* Listas */
.gowebix-textblock-pro.gowebix-tb-ultra-thin .gowebix-textblock-pro-content li {
  font-weight: 200 !important;
  color: inherit !important;
  opacity: 1 !important;
}

/* Suavizado de fuentes */
.gowebix-textblock-pro.gowebix-tb-smoothed .gowebix-textblock-pro-content,
.gowebix-textblock-pro.gowebix-tb-smoothed .gowebix-textblock-pro-content * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* COMBO: Ultra Thin + Smoothed - color sólido */
.gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed {
  color: var(--tb-text-color, #6F6F6F) !important;
  opacity: 1 !important;
}

.gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed .gowebix-textblock-pro-content p {
  color: inherit !important;
  opacity: 1 !important;
}


/* ========================
   5. DETECCIÓN INTELIGENTE DE FONDOS
   ======================== */

/* Fondos oscuros - Texto blanco automático */
[class*="bg-dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light),
[class*="dark-bg"] .gowebix-textblock-pro:not(.gowebix-tb-force-light),
.bg-black .gowebix-textblock-pro:not(.gowebix-tb-force-light),
.bg-extra-dark-gray .gowebix-textblock-pro:not(.gowebix-tb-force-light),
section[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light),
section.dark .gowebix-textblock-pro:not(.gowebix-tb-force-light),
.dark-section .gowebix-textblock-pro:not(.gowebix-tb-force-light),
.vc_section[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light),
.wpb_column[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Párrafos en fondos oscuros */
[class*="bg-dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content p,
[class*="dark-bg"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content p,
section[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content p {
  opacity: 0.9;
}

/* Enlaces en fondos oscuros */
[class*="bg-dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a,
[class*="dark-bg"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a,
section[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a {
  color: rgba(255, 255, 255, 0.95) !important;
}

[class*="bg-dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a:hover,
[class*="dark-bg"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a:hover,
section[class*="dark"] .gowebix-textblock-pro:not(.gowebix-tb-force-light) .gowebix-textblock-pro-content a:hover {
  color: #ffffff !important;
}

/* Forzar modo claro - Lógica corregida */
.gowebix-textblock-pro.gowebix-tb-force-light {
  color: rgba(255, 255, 255, 0.95) !important;
}

.gowebix-textblock-pro.gowebix-tb-force-light .gowebix-textblock-pro-content p {
  opacity: 0.9;
}

.gowebix-textblock-pro.gowebix-tb-force-light .gowebix-textblock-pro-content a {
  color: rgba(255, 255, 255, 0.95) !important;
}

.gowebix-textblock-pro.gowebix-tb-force-light .gowebix-textblock-pro-content a:hover {
  color: #ffffff !important;
}

/* Excepción: "Forzar modo claro" en fondos CLAROS = texto oscuro */
.bg-white .gowebix-textblock-pro.gowebix-tb-force-light,
[class*="bg-light"] .gowebix-textblock-pro.gowebix-tb-force-light,
.bg-extra-light-gray .gowebix-textblock-pro.gowebix-tb-force-light {
  color: #374151 !important;
  opacity: 0.95 !important;
}

.bg-white .gowebix-textblock-pro.gowebix-tb-force-light .gowebix-textblock-pro-content a,
[class*="bg-light"] .gowebix-textblock-pro.gowebix-tb-force-light .gowebix-textblock-pro-content a {
  color: #374151 !important;
}

/* ========================
   6. CORRECCIONES ESPECIALES
   ======================== */

/* Corrección para Ultra Thin + Smoothed en fondos oscuros */
/* [class*="bg-dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed:not(.gowebix-tb-force-light),
[class*="dark-bg"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed:not(.gowebix-tb-force-light),
section[class*="dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed:not(.gowebix-tb-force-light) {
  color: rgba(255, 255, 255, 0.98) !important;
  opacity: 0.98 !important;
  -webkit-font-smoothing: subpixel-antialiased;
} */

/* Corrección para Force Light + Smoothed en fondos oscuros */
[class*="bg-dark"] .gowebix-textblock-pro.gowebix-tb-force-light.gowebix-tb-smoothed,
[class*="dark-bg"] .gowebix-textblock-pro.gowebix-tb-force-light.gowebix-tb-smoothed,
section[class*="dark"] .gowebix-textblock-pro.gowebix-tb-force-light.gowebix-tb-smoothed {
  color: rgba(255, 255, 255, 0.98) !important;
  opacity: 0.98 !important;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* Corrección para combinación triple (Ultra Thin + Force Light + Smoothed) */
[class*="bg-dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-force-light.gowebix-tb-smoothed,
[class*="dark-bg"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-force-light.gowebix-tb-smoothed,
section[class*="dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-force-light.gowebix-tb-smoothed {
  color: rgba(255, 255, 255, 0.98) !important;
  opacity: 0.98 !important;
  font-weight: 200 !important;
  letter-spacing: 0.02em !important;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* Seguridad: bloques con texto blanco explícito */
.gowebix-textblock-pro[style*="--tb-text-color:#FFFFFF"],
.gowebix-textblock-pro[style*="--tb-text-color:#ffffff"],
.gowebix-textblock-pro[style*="--tb-text-color:rgb(255,255,255)"],
.gowebix-textblock-pro[style*="--tb-text-color:rgba(255,255,255"] {
  color: #ffffff !important;
}

/* ========================
   9. FIX PARA COLORES CON EFECTOS AVANZADOS - AGREGADO
   ======================== */

/* FIX CRÍTICO: Color de texto predeterminado con !important */
.gowebix-textblock-pro {
    color: var(--tb-text-color, #6F6F6F) !important;
}

/* FIX: Forzar color cuando está configurado explícitamente como #6F6F6F */
.gowebix-textblock-pro[style*="--tb-text-color:#6F6F6F"],
.gowebix-textblock-pro[style*="--tb-text-color:#6f6f6f"] {
    color: #6F6F6F !important;
}

/* FIX: Para fondos oscuros con Ultra Thin - color blanco sólido */
[class*="bg-dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin:not(.gowebix-tb-force-light),
[class*="dark-bg"] .gowebix-textblock-pro.gowebix-tb-ultra-thin:not(.gowebix-tb-force-light),
.bg-black .gowebix-textblock-pro.gowebix-tb-ultra-thin:not(.gowebix-tb-force-light),
section[class*="dark"] .gowebix-textblock-pro.gowebix-tb-ultra-thin:not(.gowebix-tb-force-light) {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* FIX: Para Ultra Thin + Smoothed - aumentar opacidad */
.gowebix-textblock-pro.gowebix-tb-ultra-thin.gowebix-tb-smoothed {
    opacity: 1 !important;
    color: var(--tb-text-color, #6F6F6F) !important;
}

/* FIX: Sobre overlay oscuro - siempre blanco */
.vc_row-overlay-dark + .gowebix-textblock-pro,
.vc_row[class*="overlay-dark"] .gowebix-textblock-pro,
.wpb_row[class*="overlay"] .gowebix-textblock-pro {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* FIX: Para cualquier combinación con Smoothed - prevenir desvanecimiento */
.gowebix-textblock-pro.gowebix-tb-smoothed {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    color: var(--tb-text-color, #6F6F6F) !important;
}

/* FIX: Selector de máxima prioridad para colores */
body .gowebix-textblock-pro,
body #page .gowebix-textblock-pro,
body .wpb_wrapper .gowebix-textblock-pro {
    color: var(--tb-text-color, #6F6F6F) !important;
}

/* FIX ESPECÍFICO: Cuando el texto debería ser #6F6F6F pero sale marrón */
body .gowebix-textblock-pro:not([class*="force-light"]):not([class*="bg-dark"]) {
    color: var(--tb-text-color, #6F6F6F) !important;
}

/* ========================
   7. RESPONSIVE
   ======================== */

@media (max-width: 992px) {
  .gowebix-textblock-pro {
    --tb-font-size: calc(var(--tb-font-size, 16px) * 1.02);
  }
  
  .gowebix-textblock-pro.gowebix-tb-align-justify {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .gowebix-textblock-pro {
    --tb-font-size: calc(var(--tb-font-size, 16px) * 1.05);
    --tb-line-height: calc(var(--tb-line-height, 1.7) + 0.1);
  }
  
  .gowebix-textblock-pro-content p {
    margin-bottom: 1em;
  }
}

@media (max-width: 480px) {
  .gowebix-textblock-pro {
    --tb-font-size: calc(var(--tb-font-size, 16px) * 1.08);
  }
}

/* ========================
   8. BACKEND WPBakery
   ======================== */

.vc_ui-panel .gowebix-textblock-pro-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wpb_content_element .gowebix-textblock-pro {
  border-left: 3px solid #00C2E5;
  padding-left: 15px;
  margin: 10px 0;
}