/* ==========================================================================
   ESTILOS UNIFICADOS PARA BLOG Y ARTÍCULOS - BEST INFRARED SOLUTIONS (BIS)
   ========================================================================== */

/* 1. VARIABLES GLOBALES Y RESET DE TIPOGRAFÍA */
:root {
  --bis-primary: #0f172a;
  --bis-secondary: #00477d;
  --bis-accent: #0284c7;
  --bis-orange: #ff5722;
  --bis-danger: #ef4444;
  --bis-success: #10b981;
  --bis-warning: #f59e0b;
  --bis-bg-light: #f8fafc;
  --bis-card-bg: #ffffff;
  --bis-border: #e2e8f0;
  --bis-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --bis-gradient-hero: linear-gradient(rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.95));
}

body {
  font-family: 'Open Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bis-bg-light);
  color: #334155;
  line-height: 1.7;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 2. TIPOGRAFÍA Y ENCABEZADOS */
h1 {
  font-family: 'Rubik', sans-serif;
  color: var(--bis-card-bg);
  font-weight: 700;
  margin-top: 0;
}

h2, h3, h4, h5, h6 {
  font-family: 'Rubik', sans-serif;
  color: var(--bis-primary);
  font-weight: 700;
  margin-top: 0;
}

.bis-blue { color: var(--bis-primary); }
.bis-orange { color: var(--bis-orange); }

/* 3. HERO / CABECERAS DE BLOG Y ARTÍCULOS */
.blog-hero-pro,
.blog-hero-section {
  background: var(--bis-gradient-hero), url('img/carousel-1.jpg') center/cover no-repeat;
  padding: 100px 0 80px 0;
  position: relative;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
}

.blog-hero-pro::before,
.blog-hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.blog-hero-pro p,
.blog-hero-section p {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 750px;
  margin: 0 auto;
}

.blog-hero-badge,
.badge-category {
  display: inline-block;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.blog-meta-info {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #94a3b8;
  font-size: 0.95rem;
  margin-top: 20px;
}

.blog-meta-info span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =================================================================
   ESTILOS DINÁMICOS PARA EL HERO PRO DE CADA PÁGINA
   ================================================================= */

/* Estilo base común para el Hero con imagen de fondo */
.blog-hero-pro,
.blog-hero-camaras-termograficas-pro,
.blog-hero_termografia-industrial-pro,
.blog-hero-ventajas-termografia-pro,
.blog-hero-gas-metano-pro,
.blog-hero-thermal-pro,
.blog-hero-gases-pro,
.blog-hero-asea-normativas-pro,
.blog-gas-sf6-pro,
.blog-si2-series-pro,
.blog-hero-si2-ld-pro {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Capa oscura superpuesta (overlay) para garantizar legibilidad del texto blanco */
    background-blend-mode: overlay;
    background-color: rgba(15, 23, 42, 0.45); /* Tono oscuro corporativo BIS */
    padding-top: 5rem;
    padding-bottom: 5rem;
    color: #ffffff;
}

/* Imagen específica para este primer archivo (Termografía Eléctrica) */
/* Asegúrate de cambiar la ruta de la imagen si usas otra distinta para cada página */
.blog-hero-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.5)), url('../img/bis_blog_errores_en_termografia_electrica.png');
}

/* Si deseas personalizar el Hero para otras páginas futuras de tu sitio, 
   puedes declarar clases únicas por archivo, por ejemplo: */
.blog-hero-camaras-termograficas-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_blog_que_son_las_camaras_de_termografia.png');
}
.blog-hero_termografia-industrial-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_blog_la_importancia_de_tener_una_camara_termografica_en_la_industria.png');
}
.blog-hero-ventajas-termografia-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.45), rgba(15, 23, 42, 0.7)), url('../img/bis_blog_ventajas_de_usar_termografia_en_la_industria.png');
}
.blog-hero-gas-metano-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_equipos_ogi_deteccion-de-gas.png');
}
.blog-hero-gas-metano-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_equipos_ogi_deteccion-de-gas.png');
}
.blog-hero-thermal-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_equipo_termografia_flir.png');
}
.blog-hero-gases-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_equipos_ogi_deteccion-de-gas.png');
}
.blog-hero-asea-normativas-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_blog_asea_normativas.png');
}
.blog-gas-sf6-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_equipos_ogi_deteccion-de-gas.png');
}
.blog-si2-series-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_linea_acustico_si2_pro.png');
}
.blog-hero-si2-ld-pro {
    background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.7)), url('../img/bis_linea_acustico_si2_ld.png');
}

/* 4. CONTENEDORES PRINCIPALES DE ARTÍCULOS */
.article-pro-container,
.article-container-pro,
.blog-article-container {
  max-width: 1000px;
  margin: -50px auto 60px auto;
  padding: 50px;
  background: var(--bis-card-bg);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  position: relative;
  z-index: 10;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.article-body-pro {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--bis-border);
  padding: 50px 60px;
  margin: -50px auto 50px auto;
  max-width: 1050px;
  position: relative;
  z-index: 10;
}

.article-body-pro h2,
.article-pro-container h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.article-body-pro h2::after,
.article-pro-container h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: var(--bis-accent);
  border-radius: 2px;
}

.article-body-pro p,
.article-pro-container p,
.blog-card p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 25px;
}

/* 5. TARJETAS BENTO Y SECCIONES DE CONTENIDO MODULAR */
.blog-bento-card,
.error-bento-card,
.pro-article-section,
.blog-card-pro,
.blog-card {
  background: #ffffff;
  border: 1px solid var(--bis-border);
  border-radius: 20px;
  padding: 35px;
  margin-bottom: 35px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.blog-bento-card:hover,
.error-bento-card:hover,
.pro-article-section:hover,
.blog-card-pro:hover,
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(2, 132, 199, 0.12);
  border-color: #38bdf8;
}

.blog-bento-card::before,
.error-bento-card::before,
.pro-article-section::before,
.blog-card-pro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--bis-accent), var(--bis-success));
}

.blog-card-pro.success-bar::before,
.blog-card-pro.solucion-ok::before { background: var(--bis-success); }
.blog-card-pro.warning-bar::before { background: var(--bis-warning); }
.blog-card-pro.danger-bar::before { background: var(--bis-danger); }

.blog-header-flex,
.error-header-flex,
.section-header-flex {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.blog-number-badge,
.error-number-badge,
.section-number-badge,
.step-badge,
.step-badge-pro {
  background: #e0f2fe;
  color: #0369a1;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

/* 6. GRIDS DE IMAGEN Y CONTENIDO */
.blog-content-grid,
.error-content-grid,
.pro-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

@media (min-width: 992px) {
  .blog-content-grid,
  .error-content-grid,
  .pro-content-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.blog-img-wrapper,
.error-img-wrapper,
.pro-img-wrapper,
.figure-pro {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  background: #f1f5f9;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 25px 0;
  border: 1px solid var(--bis-border);
  transition: all 0.3s ease;
}

.blog-img-wrapper img,
.error-img-wrapper img,
.pro-img-wrapper img,
.figure-pro img,
.article-featured-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain; /* Cambiado a contain para evitar que la imagen se recorte o expanda de más */
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  transition: transform 0.5s ease;
}

.blog-img-wrapper,
.error-img-wrapper,
.pro-img-wrapper,
.figure-pro {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  background: #f1f5f9;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 25px 0;
  border: 1px solid var(--bis-border);
  box-sizing: border-box;
}

.blog-bento-card:hover .blog-img-wrapper img,
.error-bento-card:hover .error-img-wrapper img,
.pro-article-section:hover .pro-img-wrapper img,
.figure-pro:hover img {
  transform: scale(1.04);
}

.figure-caption,
.blog-img-caption {
  font-size: 0.9rem;
  color: #64748b;
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* 7. CAJAS DE DIAGNÓSTICO, SOLUCIÓN E INFORMACIÓN */
.diagnostic-box,
.info-box-tech {
  background: #fff5f5;
  border-radius: 12px;
  padding: 18px;
  border-left: 4px solid var(--bis-danger);
  margin-bottom: 15px;
}
.info-box-tech {
  background: #f8fafc;
  border-left-color: var(--bis-accent);
}

.solution-box,
.info-box-benefit,
.pro-box-info,
.highlight-box-pro {
  background: #f0fdf4;
  border-radius: 12px;
  padding: 18px;
  border-left: 4px solid var(--bis-success);
  margin-bottom: 15px;
}

.box-tag,
.pro-box-info .tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}
.diagnostic-box .box-tag { color: #b91c1c; }
.solution-box .box-tag, .pro-box-info .tag { color: #047857; }
.info-box-tech .box-tag { color: #0369a1; }

.box-desc {
  font-size: 0.95rem;
  margin: 0;
  color: #334155;
  line-height: 1.5;
}

/* 8. LISTAS ESTILIZADAS */
ul.blog-list,
.article-body-pro ul {
  list-style: none;
  padding-left: 0;
  margin: 20px 0;
}

ul.blog-list li,
.article-body-pro ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-size: 1.02rem;
  color: #444;
  line-height: 1.6;
}

ul.blog-list li::before,
.article-body-pro ul li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--bis-success);
  font-weight: bold;
  font-size: 1.1rem;
}

/* 9. TABLAS MODERNAS PRO */
.table-modern,
.table-pro {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  margin: 2rem 0;
}

.table-modern th,
.table-pro thead th {
  background-color: var(--bis-primary);
  color: #ffffff;
  padding: 16px;
  font-weight: 600;
  border: none;
}

.table-modern td,
.table-pro tbody td {
  padding: 16px;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

.table-modern tr:hover td,
.table-pro tbody tr:hover {
  background-color: #f8fafc;
}

/* 10. CTA / LLAMADOS A LA ACCIÓN */
.blog-cta-box,
.blog-cta-pro,
.cta-banner-blog {
  background: var(--bis-gradient);
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  color: white;
  margin-top: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.2);
}

.blog-cta-box h3,
.blog-cta-pro h3 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.blog-cta-box p,
.blog-cta-pro p {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto 30px auto;
}

.btn-whatsapp-pro,
.btn-bis-action {
  background: #25d366;
  color: white;
  font-weight: 600;
  padding: 15px 35px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.05rem;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-whatsapp-pro:hover,
.btn-bis-action:hover {
  background: #20ba5a;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
  color: white;
}

.btn-bis-action {
  background-color: var(--bis-orange);
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4);
}
.btn-bis-action:hover {
  background-color: #e44d1f;
}

/* 11. DISEÑO RESPONSIVO ADAPTATIVO */
@media (max-width: 991.98px) {
  .article-body-pro,
  .article-pro-container {
    padding: 30px 20px;
    margin-top: -30px;
  }
}

@media (max-width: 768px) {
  .blog-hero-pro h1,
  .blog-hero-section h1 {
    font-size: 1.8rem;
  }
  .blog-meta-info {
    flex-direction: column;
    gap: 10px;
  }
}