/* ==========================================================================
   ESTILOS GLOBALES Y RESET
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif; /* Consistencia tipográfica institucional */
    background-color: #f4f6f9;
    color: #333333;
    line-height: 1.6;
}

/* ==========================================================================
   CABECERA CORPORATIVA (AZUL REY DEGRADADO VIBRANTE)
   ========================================================================== */
.header-corporativo {
    background: linear-gradient(135deg, #4169e1, #0033aa); /* Azul rey degradado de Chip Solutions */
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.btn-regresar-top {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-regresar-top:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.02);
}

.header-center-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-chip {
    width: 110px;
    height: auto;
}

.header-text-container h1 {
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.header-text-container p {
    font-size: 22px;
    color: #cbd5e1;
    margin-top: 1px;
    text-align: left;
}

/* ==========================================================================
   MAQUETACIÓN GENERAL DE LA MAQUETA DEL BLOG (REJILLA DE TARJETAS)
   ========================================================================== */
.blog-page-layout {
    max-width: 1200px;
    margin: 40px auto 10px auto;
    padding: 0 20px;
    display: block;
}

.blog-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-page-header h2 {
    font-size: 32px;
    color: #0033aa;
    margin-bottom: 10px;
    font-weight: 700;
}

.blog-page-header p {
    color: #64748b;
    font-size: 16px;
}

.blog-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

/* --- TARJETAS INDIVIDUALES DE ARTÍCULOS --- */
.blog-post-card {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.placeholder-post {
    opacity: 0.75;
    background-color: #f8fafc;
}

/* Etiquetas flotantes en las esquinas */
.blog-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-danger { background-color: #ef4444; color: #ffffff; }
.badge-primary { background-color: #0033aa; color: #ffffff; }

/* Contenedores de las imágenes de portada */
.blog-card-cover {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.cover-dark { background: linear-gradient(135deg, #1e293b, #0f172a); }
.cover-blue { background: linear-gradient(135deg, #334155, #1e293b); }

.blog-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .blog-cover-img {
    transform: scale(1.05);
}

/* Cuerpo interno de texto de las tarjetas */
.blog-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta-date {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-card-body h3 {
    font-size: 19px;
    color: #0033aa;
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-card-body p {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: justify;
}

.btn-blog-link {
    margin-top: auto;
    color: #24b35b;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.btn-blog-link:hover {
    color: #1e964c;
}

.blog-status-text {
    font-size: 13.5px;
    font-weight: bold;
    color: #94a3b8;
    margin-top: auto;
}

/* ==========================================================================
   ESTILOS DE LA SUBPÁGINA: DETALLE DEL ARTÍCULO
   ========================================================================== */
.articulo-contenedor {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.articulo-header {
    border-bottom: 2px solid #eceff1;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.categoria-etiqueta {
    background-color: #3b5998;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 0.85em;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.articulo-header h1 {
    font-size: 2.2em;
    color: #0033aa;
    margin: 15px 0 10px 0;
}

.meta-datos {
    font-size: 0.9em;
    color: #718096;
}

.divisor { margin: 0 8px; }

.articulo-imagen-contenedor {
    margin-bottom: 30px;
    text-align: center;
}

.articulo-imagen {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.imagen-pie {
    font-size: 0.85em;
    color: #718096;
    margin-top: 8px;
    font-style: italic;
}

.articulo-contenido h2 {
    font-size: 1.5em;
    color: #0033aa;
    margin-top: 35px;
    border-left: 4px solid #4169e1;
    padding-left: 10px;
}

.articulo-contenido p {
    margin-bottom: 15px;
    color: #4a5568;
    text-align: justify;
}

/* Cajas contenedoras de alertas (Consecuencias y Prevención) */
.alerta-caja {
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.consecuencia {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 5px solid #e53e3e;
}

.consecuencia h3 { color: #c53030; margin-top: 0; margin-bottom: 8px; }

.preventiva {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    border-left: 5px solid #38a169;
}

.preventiva h3 { color: #276749; margin-top: 0; margin-bottom: 8px; }
.preventiva ul { padding-left: 20px; }
.preventiva li { margin-bottom: 12px; color: #2f855a; }

.lista-protocolo { padding-left: 20px; margin: 15px 0; }
.lista-protocolo li { margin-bottom: 15px; color: #4a5568; }

.btn-soporte {
    display: inline-block;
    background-color: #24b35b; /* Verde característico de tu módulo */
    color: #ffffff;
    padding: 12px 35px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease, transform 0.2s;
}

.btn-soporte:hover {
    background-color: #1e964c;
    transform: scale(1.02);
}

/* ==========================================================================
   BOTONERA DE RETORNO INFERIOR (CORREGIDA, EVITA CONFLICTOS DE CLASES)
   ========================================================================== */
.botonera-retorno {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 10px 0;
}

/* Estilo unificado para los tres enlaces inferiores */
.btn-navegacion {
    flex: 1;
    text-align: center;
    padding: 12px 15px;
    font-size: 0.95em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-inicio-seccion { background-color: #4a5568; }
.btn-inicio-seccion:hover { background-color: #2d3748; }

.btn-blog-seccion { background-color: #3b5998; }
.btn-blog-seccion:hover { background-color: #2d4373; }

.btn-productos-seccion { background-color: #4169e1; }
.btn-productos-seccion:hover { background-color: #0033aa; }

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP e INTERFAZ DE PIE DE PÁGINA (FOOTER CORPORATIVO)
   ========================================================================== */
.whatsapp-fixed {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: transform 0.3s ease, background-color 0.2s;
    cursor: pointer;
}

.whatsapp-fixed img {
    width: 35px;
    height: 35px;
}

.whatsapp-fixed:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128c7e;
}

footer { 
    background-color: #002244; /* Azul marino profundo unificado */
    color: #ffffff; 
    text-align: center; 
    padding: 25px 20px; 
    margin-top: 40px; 
    width: 100%;
    font-size: 13.5px;
    line-height: 1.8;
}

.facebook-link { 
    color: #ffffff; 
    text-decoration: none; 
    margin-left: 5px; 
    font-weight: 600; 
    transition: color 0.2s; 
}

.facebook-link:hover { 
    color: #1877f2; 
    text-decoration: underline; 
}

/* --- RESPONSIVO PARA PANTALLAS MÓVILES (SMARTPHONES Y TABLETS) --- */
@media (max-width: 768px) {
    .header-corporativo {
        height: auto;
        padding: 30px 10px;
        flex-direction: column;
    }
    .btn-regresar-top {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin-bottom: 15px;
        display: inline-block;
    }
    .header-center-container {
        flex-direction: column;
        text-align: center;
    }
    .header-text-container p {
        text-align: center;
    }
    .header-text-container h1 {
        font-size: 32px;
    }
    .blog-page-layout {
        margin: 20px auto;
    }
    .blog-grid-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .articulo-contenedor {
        padding: 20px;
        margin: 20px 10px;
    }
    .articulo-header h1 {
        font-size: 1.7em;
    }
    .botonera-retorno {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }
}
