/* =========================================
   1. VARIABLES Y ESTILOS GENERALES
   ========================================= */
   :root {
    --primary-color: #D32F2F; /* Rojo Industrial */
    --primary-dark: #b71c1c;  /* Rojo más oscuro para hover */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #111;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal indeseado */
}

a {
    text-decoration: none;
}

/* =========================================
   2. BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    background-color: rgba(0, 0, 0, 0.95) !important; /* Negro casi sólido */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    padding: 15px 0;
}

.navbar-brand img {
    height: 50px; /* Ajusta según tu logo */
    width: auto;
}

.navbar-brand span {
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.2rem;
    color: white;
}

.nav-link {
    font-weight: 500;
    color: #ddd !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* =========================================
   3. HERO SECTION (VIDEO DE FONDO)
   ========================================= */
.hero {
    position: relative;
    height: 100vh;        /* Pantalla completa */
    min-height: 600px;    /* Altura mínima para móviles */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* Fondo de carga */
    overflow: hidden;
}

/* =========================================
   AJUSTE DE BRILLO EN HERO SECTION
   ========================================= */

/* 1. El Video: Aumentamos un poco el brillo natural */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    
    /* ESTA ES LA LÍNEA NUEVA: */
    filter: brightness(1.2) contrast(1.1); 
    /* brightness(1.2) = 20% más de luz. contrast(1.1) = Colores más vivos */
}

/* 2. La Capa Oscura: La hacemos más transparente */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* CAMBIO AQUÍ: Antes era 0.6 o 0.8, ahora lo bajamos a 0.3 (30% oscuridad) */
    background: rgba(0, 0, 0, 0.60); 
    
    /* Si prefieres degradado (más oscuro abajo), usa esta línea en su lugar: */
    /* background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6)); */

    z-index: 1;
}

/* El Texto: Capa 10 (Encima de todo) */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #ffffff !important;
    padding: 20px;
}

.hero h1 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8); /* Sombra para leerse mejor */
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* Botón principal */
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px); /* Efecto de elevación */
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}

/* =========================================
   4. SECCIONES GENERALES
   ========================================= */
section {
    padding: 80px 0;
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 40px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color);
}

/* Línea roja debajo de los títulos */
.section-title::after {
    content: '';
    position: absolute;
    left: 0; /* Si quieres centrado, usa: left: 50%; transform: translateX(-50%); */
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

/* Centrar título cuando sea necesario */
.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* =========================================
   5. HISTORIA Y CERTIFICACIÓN
   ========================================= */
.iso-badge {
    background: #fff;
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-radius: 4px;
}

/* =========================================
   6. SERVICIOS (TARJETAS)
   ========================================= */
.service-card {
    background: #fff;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card-title {
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* =========================================
   7. CLIENTES (LOGOS)
   ========================================= */
.grayscale-logos img, 
.grayscale-logos h3 {
    opacity: 0.6;
    filter: grayscale(100%); /* Blanco y negro */
    transition: all 0.3s ease;
    cursor: default;
}

.grayscale-logos div:hover img, 
.grayscale-logos div:hover h3 {
    opacity: 1;
    filter: grayscale(0%); /* Color original al pasar mouse */
    transform: scale(1.05);
}

/* =========================================
   8. CONTACTO Y FOOTER
   ========================================= */
#contacto {
    background-color: #1a1a1a;
    color: #fff;
}

#contacto .form-control {
    border-radius: 0; /* Bordes cuadrados estilo industrial */
    padding: 12px;
    border: 1px solid #444;
    background-color: #fff;
}

#contacto .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

#contacto ul li {
    font-size: 1.1rem;
}

footer {
    background-color: #000;
    color: #888;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* =========================================
   10. RESPONSIVE (CELULARES)
   ========================================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem; /* Título más pequeño en móvil */
    }
    .hero p {
        font-size: 1.1rem;
    }
    .section-title::after {
        left: 0; /* Título alineado a la izquierda en móvil si se prefiere */
    }
    .text-center .section-title::after {
        left: 50%; /* Mantener centrado si la clase text-center está presente */
    }
}

/* =========================================
   WHATSAPP FLOTANTE PROFESIONAL
   ========================================= */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    
    /* Animación de latido (Opcional, si te gusta que llame la atención) */
    animation: pulse-green 2s infinite;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1); /* Crece un poquito al tocarlo */
    text-decoration: none;
}

/* El texto "¡Escríbenos!" (Tooltip) */
.whatsapp-tooltip {
    position: absolute;
    right: 70px; /* A la izquierda del botón */
    background-color: #fff;
    color: #333;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;       /* Invisible por defecto */
    visibility: hidden;
    transform: translateX(20px); /* Empieza un poco desplazado */
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Triangulito del tooltip apuntando al botón */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    margin-top: -6px;
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
}

/* Mostrar el texto cuando pasas el mouse por el botón */
.whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0); /* Se desliza a su lugar */
}

/* Definición de la animación de latido */
@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);
    }
}

/* Ajuste de imagen ISO */
.iso-img {
    max-height: 120px; /* Altura máxima para que no deforme la caja */
    width: auto;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.1)); /* Sombra suave para que resalte */
    transition: transform 0.3s;
}

.iso-img:hover {
    transform: scale(1.05); /* Efecto zoom suave al pasar el mouse */
}

/* Ajuste del contenedor badge para que sea más flexible */
/* =========================================
   CERTIFICACIÓN ISO PROFESIONAL
   ========================================= */

/* El contenedor principal */
.iso-badge {
    background: #ffffff;
    border-left: 8px solid var(--primary-color);
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    /* Quitamos el margen superior porque la sección ya tiene padding */
}

/* Decoración de fondo (marca de agua sutil) */
.iso-badge::before {
    content: '\f0a3';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 150px;
    color: rgba(0,0,0,0.03);
    z-index: 0;
}

/* Marco para la imagen */
.iso-frame {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: inline-block;
    transition: all 0.3s ease;
}

.iso-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

/* La imagen en sí */
.iso-img-large {
    max-height: 200px;
    width: auto;
    max-width: 100%;
}

/* Efecto Hover para el enlace del certificado */
a:hover .iso-frame {
    border-color: var(--primary-color); /* El borde se pone rojo */
    transform: translateY(-5px);        /* Sube un poquito */
}

a:hover .iso-frame .text-dark {
    color: var(--primary-color) !important; /* El texto "Verificar" se pone rojo */
    opacity: 1 !important;
}

/* =========================================
   IMAGEN DE HISTORIA
   ========================================= */
.history-img {
    width: 100%;
    height: 400px;       /* Altura fija para mantener armonía */
    object-fit: cover;   /* IMPORTANTE: Recorta la foto para llenar el espacio sin deformarse */
    border: 5px solid #fff; /* Marco blanco limpio */
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.history-img:hover {
    transform: scale(1.02); /* Efecto sutil al pasar el mouse */
}

/* Caja decorativa roja detrás de la foto (Estilo Industrial) */
.deco-box {
    position: absolute;
    top: -15px;
    right: -15px; /* Sale un poco por la derecha */
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color); /* Borde rojo */
    z-index: 1;
    border-radius: 5px;
    opacity: 0.6;
}

/* Ajuste para celular */
@media (max-width: 768px) {
    .history-img {
        height: auto; /* En celular dejamos que la altura sea automática */
        margin-top: 20px;
    }
    .deco-box {
        display: none; /* Ocultamos la decoración en pantallas chicas para limpiar visualmente */
    }
}

/* =========================================
   MAPA DE CONTACTO
   ========================================= */
.map-container {
    border-radius: 8px;
    overflow: hidden; /* Para que el mapa respete los bordes redondeados */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Sombra fuerte para resaltar sobre el fondo oscuro */
    border: 2px solid #444; /* Borde gris oscuro para integrar */
    transition: transform 0.3s ease;
}

.map-container:hover {
    border-color: var(--primary-color); /* Al pasar el mouse, el borde se pone rojo */
    transform: translateY(-3px);
}

.map-container iframe {
    display: block; /* Elimina espacios extraños abajo */
    width: 100%;
}

/* =========================================
   FOOTER Y FIRMA DEL DESARROLLADOR
   ========================================= */

/* Estilo del logo del desarrollador */
.dev-logo {
    height: 35px; /* Tamaño discreto pero visible */
    width: auto;
    opacity: 0.6; /* Un poco transparente para integrarse */
    filter: grayscale(100%); /* En blanco y negro por defecto */
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse por tu firma */
.dev-link:hover .dev-logo {
    opacity: 1; /* Se vuelve totalmente visible */
    filter: grayscale(0%); /* Recupera sus colores originales */
    transform: scale(1.1); /* Crece un poquito */
}

.dev-link {
    text-decoration: none;
    display: inline-block;
}

/* =========================================
   FOOTER MINIMALISTA
   ========================================= */

/* Logo del desarrollador reducido */
.dev-logo-small {
    height: 18px; /* Altura muy pequeña, estilo firma */
    width: auto;
    opacity: 0.5; /* Más transparente para no distraer */
    filter: grayscale(100%);
    transition: all 0.3s ease;
    vertical-align: middle;
}

/* Efecto al pasar el mouse */
.dev-link-small:hover .dev-logo-small {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.dev-link-small {
    display: inline-block;
    line-height: 1; /* Asegura que no aumente la altura de la línea */
}

/* =========================================
   SECCIÓN CONTACTO PREMIUM
   ========================================= */

/* Caja del icono (Izquierda) */
.icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(211, 47, 47, 0.1); /* Rojo muy transparente */
    color: var(--primary-color);
    border-radius: 50%; /* Círculo perfecto */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.info-item:hover .icon-box {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg); /* Pequeña animación 3D */
}

/* Botones de Redes Sociales */
.social-circle {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-circle:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Tarjeta del Formulario (Derecha) */
.contact-card {
    border-top: 5px solid var(--primary-color); /* Detalle rojo arriba */
}

/* Ajuste de Floating Labels para que se vean modernos */
.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25);
}

.form-floating > label {
    color: #888;
}

/* Botón de Enviar */
.tracking-wide {
    letter-spacing: 1.5px; /* Separación entre letras para más elegancia */
    transition: background-color 0.3s, transform 0.2s;
}

.tracking-wide:hover {
    transform: translateY(-2px);
}

/* =========================================
   CLIENTES DINÁMICOS
   ========================================= */

.client-logo {
    max-height: 80px; /* Altura máxima para uniformidad */
    max-width: 100%;
    width: auto;
    filter: grayscale(100%); /* Blanco y negro por defecto */
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Efecto al pasar el mouse por el contenedor */
.client-box:hover .client-logo {
    filter: grayscale(0%); /* Color real */
    opacity: 1;
    transform: scale(1.1);
}

/* Tooltip nativo más bonito (opcional, solo afecta al contenedor) */
.client-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px; /* Altura fija de la caja para alineación perfecta */
}

/* =========================================
   CORRECCIÓN FINAL FORMULARIO (ESTILO GOOGLE)
   ========================================= */

/* 1. FORZAR FONDO BLANCO Y BORDE SUAVE */
.form-floating > .form-control {
    background-color: #ffffff !important; /* Blanco puro obligatorio */
    border: 1px solid #d0d0d0 !important;
    color: #212529 !important; /* Texto negro oscuro */
    height: 60px !important;    /* Altura fija más alta */
    border-radius: 5px;
    box-shadow: none !important;
    
    /* ESPACIADO CLAVE PARA QUE NO CHOQUEN */
    padding-top: 30px !important;   /* Empuja el texto "Gustavo" abajo */
    padding-bottom: 10px !important; 
    padding-left: 15px !important;
    font-size: 16px !important;
    font-weight: 500;
}

/* 2. ELIMINAR EL AZUL/GRIS DEL AUTOCOMPLETAR DE CHROME (EL MÁS IMPORTANTE) */
/* Este bloque quita ese fondo gris azulado que se ve en tu captura */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px white inset !important; /* Pinta de blanco encima del azul */
    -webkit-text-fill-color: #212529 !important; /* Texto negro */
    transition: background-color 5000s ease-in-out 0s;
}

/* 3. ESTILO DE LA ETIQUETA (LABEL) "Nombre", "Apellido"... */
.form-floating > label {
    color: #6c757d !important;
    background-color: transparent !important; /* Fondo transparente para que no se vea el parche */
    padding-top: 0px !important;
    padding-left: 15px !important;
    height: 100% !important;
    display: flex;
    align-items: center;
    
    /* Ajuste de posición inicial */
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out,transform .1s ease-in-out;
}

/* 4. CUANDO ESCRIBES O HACES CLIC (La etiqueta sube) */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 1;
    color: var(--primary-color) !important; /* Rojo institucional */
    background-color: #ffffff !important;   /* Fondo blanco para tapar la línea si es necesario */
    
    /* MOVER LA ETIQUETA ARRIBA Y ACHICARLA */
    transform: scale(0.85) translateY(-18px) translateX(0px) !important;
    height: auto !important;
    padding-top: 0 !important;
    font-weight: 700;
}

/* 5. ARREGLO ESPECÍFICO PARA EL MENSAJE (TEXTAREA) */
.form-floating > textarea.form-control {
    height: 150px !important;
    padding-top: 35px !important; /* Más espacio arriba para el texto largo */
    line-height: 1.5;
}

/* 6. BORDE ROJO AL SELECCIONAR */
.form-floating > .form-control:focus {
    border-color: var(--primary-color) !important;
    border-width: 2px !important;
}

/* =========================================
   SERVICIOS ESTILO INDUSTRIAL (CORREGIDO)
   ========================================= */

/* 1. LA TARJETA CONTENEDORA */
.service-card-pro {
    position: relative !important;  /* Vital para que lo de adentro se posicione bien */
    height: 450px !important;       /* Altura fija obligatoria */
    border-radius: 10px;
    overflow: hidden !important;    /* Corta la imagen si es muy grande */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: #000;         /* Fondo negro de seguridad */
    transition: transform 0.3s ease;
    border-bottom: 5px solid transparent;
}

/* 2. LA IMAGEN DE FONDO (Detrás del texto) */
.bg-image {
    position: absolute !important;  /* Saca la imagen del flujo normal */
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;   /* Rellena todo el cuadro sin deformarse */
    z-index: 1;                     /* Nivel 1: Al fondo */
    opacity: 0.6;                   /* Un poco oscura para que se lea el texto */
    transition: transform 0.6s ease, opacity 0.3s;
}

/* 3. EL CONTENIDO DE TEXTO (Encima de la imagen) */
.content-overlay {
    position: relative !important;
    z-index: 10;                    /* Nivel 10: Arriba de la imagen */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;      /* Empuja todo el texto hacia abajo */
    padding: 30px;
    /* Degradado negro desde abajo hacia arriba para legibilidad */
    background: linear-gradient(to top, rgba(0,0,0,0.95) 10%, rgba(0,0,0,0.5) 50%, transparent 100%);
}

/* 4. ESTILOS DE TIPOGRAFÍA (Blancos) */
.service-icon-pro {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: auto; /* Manda el icono hacia arriba */
    padding-top: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.title-pro {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.desc-pro {
    color: #eee !important;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-link-pro {
    color: var(--primary-color) !important;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* 5. EFECTOS HOVER (Al pasar el mouse) */
.service-card-pro:hover .bg-image {
    transform: scale(1.1); /* Zoom en la foto */
    opacity: 0.4;          /* Se oscurece más */
}

.service-card-pro:hover {
    transform: translateY(-5px); /* La tarjeta flota hacia arriba */
    border-bottom-color: var(--primary-color);
}