/* =========================================
   ESTILOS ESPECÍFICOS PARA CATALOGO SITLAB
   ========================================= */

/* --- HEADER / HERO --- */
/* --- HEADER / HERO CON IMAGEN DESENFOCADA Y TINTE AZUL --- */
.catalog-header {
    padding-top: 160px;
    padding-bottom: 80px;
    position: relative;  /* Necesario para contener el fondo */
    overflow: hidden;    /* Recorta los bordes borrosos que se salgan */
    z-index: 1;          /* Asegura que el contenido esté sobre el fondo */
}

/* Creamos una capa virtual detrás para la imagen */
.catalog-header::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    
    /* 1. EL TINTE AZUL OSCURO Y LA IMAGEN */
    /* Usamos linear-gradient con tu color corporativo (#0B1E2D en RGB es 11, 30, 45) */
    /* El valor 0.8 es la transparencia (80% visible el color, 20% la foto) */
    background-image: 
        linear-gradient(rgba(11, 30, 45, 0.85), rgba(11, 30, 45, 0.85)),
        url(Imagenes/BackgroundheaderEnsayos1.jpg);
    
    background-size: cover;
    
    /* 2. EL DESENFOQUE (BLUR) */
    filter: blur(1px); /* Ajusta este número: más alto = más borroso */
    
    /* Truco Pro: Escalamos la imagen un poco para evitar bordes blancos por el blur */
    transform: scale(1.1); 
    
    z-index: -1; /* Esto envía la imagen DETRÁS del texto */
}
/* --- SECCIÓN PRINCIPAL (FONDO Y CONTROLES) --- */

/* Fondo con Imagen y Transparencia del 50% (Ajustado a 85% blanco para legibilidad) */
.section-background-lab {
    position: relative;
    padding: 60px 0;
    /* Capa 1: Degradado Blanco semi-transparente (ajusta el último valor 0.85 para más o menos transparencia) */
    /* Capa 2: Tu imagen de fondo */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
        url('Imagenes/BackgroundEnsayos1.jpg'); /* Asegúrate de tener esta imagen */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax elegante */
}

/* Controles de filtro */
.controls-panel {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.btn-pill {
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    padding: 0.5rem 1.25rem; /* Usando rem para escalabilidad */
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-pill:hover { border-color: var(--brand-cyan); color: var(--brand-cyan); }
.btn-pill.active {
    background: var(--brand-cyan);
    color: #0B1E2D;
    border-color: var(--brand-cyan);
    box-shadow: 0 4px 10px rgba(43, 196, 243, 0.3);
}

/* Buscador */
.search-wrapper { position: relative; }
.search-wrapper i {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.form-control-search {
    width: 100%;
    padding: 0.6rem 0.6rem 0.6rem 2.5rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    outline: none;
    transition: 0.3s;
}
.form-control-search:focus {
    background: white;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(43, 196, 243, 0.1);
}

/* --- TARJETAS --- */
.catalog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid #cddceb;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.catalog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--brand-cyan);
}

/* Header de imagen en tarjeta */
.card-image-header {
    height: 140px; 
    width: 100%;
    position: relative;
    overflow: hidden; 
}

.card-img-bg {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.5s ease;
}

.catalog-card:hover .card-img-bg {
    transform: scale(1.1);
}

.card-image-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    z-index: 1;
}

/* Colores de acento */
.card-top-accent { height: 4px; width: 100%; z-index: 2; position: relative; }
.acc-mecanico { background: #f97316; }
.acc-electrico { background: #facc15; }
.acc-termico { background: #ef4444; }
.acc-dimensional { background: #3b82f6; }
.acc-quimico { background: #8b5cf6; }
.acc-seguridad { background: #22c55e; }

/* Cuerpo de la tarjeta */
.card-body {
    padding: 1.2rem 1.5rem; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title-text {
    color: #0B1E2D; 
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.3;
}

.card-icon {
    color: #9ca3af; 
    transition: 0.3s;
}
.catalog-card:hover .card-icon { color: var(--brand-cyan); }

/* Etiquetas (Badges) */
.status-badge {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 10;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 30px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: none;
}
.badge-acreditado {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
}
.badge-verificacion {
    background: linear-gradient(135deg, #fce38a, #f38181);
    color: #333;
}

/* Bloque de productos */
.products-block {
    background: #f8fafc; 
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--brand-cyan);
    margin-top: auto;
}

.product-list-ul {
    padding-left: 0; margin-bottom: 0; list-style: none; font-size: 0.85rem; 
    color: #555; 
}
.product-list-ul li { margin-bottom: 5px; position: relative; padding-left: 15px; }
.product-list-ul li::before {
    content: "•"; color: var(--brand-cyan); font-weight: bold; position: absolute; left: 0;
}

/* =========================================
   SECCIÓN ACREDITACIÓN
   ========================================= */
.section-acreditacion {
    padding: 80px 0;
    background-color: #16324a; 
    background-image: linear-gradient(135deg, #16324a 0%, #1e405e 100%);
    position: relative;
}

.badge-container {
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}
.badge-container:hover { background: rgba(255, 255, 255, 0.1); }

.certificate-card {
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    background: rgba(11, 30, 45, 0.6); 
    backdrop-filter: blur(10px);
}

.glow-effect {
    position: absolute;
    top: -30px; right: -30px;
    width: 150px; height: 150px;
    background: var(--brand-cyan);
    filter: blur(70px); opacity: 0.15;
    pointer-events: none;
}

.alcance-box {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--brand-cyan);
}

/* =========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================= */
.whatsapp-btn {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px; /* Tamaño estándar escritorio */
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite, fadeInUp 1s ease;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MEDIA QUERIES (ADAPTABILIDAD TOTAL)
   ========================================= */

/* --- TABLETS (768px a 991px) --- */
@media (min-width: 768px) and (max-width: 991px) {
    .catalog-header {
        padding-top: 140px;
        padding-bottom: 60px;
    }
    .display-4 { font-size: 2.5rem; } /* Ajuste titulo */
    
    .card-body { padding: 1rem; }
    .card-title-text { font-size: 1rem; }
}

/* --- MÓVILES (Menos de 768px) --- */
@media (max-width: 767.98px) {
    
    /* Header compacto */
    .catalog-header {
        padding-top: 120px;
        padding-bottom: 50px;
        text-align: center;
    }
    .catalog-header .btn { width: 100%; margin-top: 10px; }
    
    /* Títulos más pequeños */
    .display-4 { font-size: 2rem; }
    .lead { font-size: 1rem; }

    /* Controles apilados */
    .controls-panel { padding: 1rem; }
    .filter-group {
        justify-content: center; /* Botones centrados */
        margin-bottom: 1rem;
    }
    .btn-pill {
        padding: 6px 15px;
        font-size: 0.8rem;
        flex-grow: 1; /* Botones ocupan espacio disponible */
        text-align: center;
    }

    /* Buscador */
    .search-wrapper i { left: 12px; }
    .form-control-search { font-size: 0.9rem; }

    /* Tarjetas */
    .card-image-header { height: 160px; /* Imagen un poco más alta en móvil para lucir */ }
    
    /* Sección Acreditación */
    .section-acreditacion { padding: 50px 0; text-align: center; }
    .d-inline-block.bg-white { margin: 0 auto 1.5rem auto; } /* Centrar código */
    
    /* Badges de acreditación en columna */
    .d-flex.gap-3 { 
        flex-direction: column; 
        gap: 1rem !important; 
    }
    .badge-container { width: 100%; justify-content: center; }
    
    .certificate-card {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    /* Botón Whatsapp Móvil */
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
        /* Quitamos animación de pulso fuerte en móvil para ahorrar batería/distracción */
        animation: fadeInUp 1s ease; 
    }
}