/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --primary: #2c5aa0;   /* Azul Corporativo (Confianza) */
    --secondary: #46b5be; /* Turquesa/Cian (Crecimiento) */
    --dark: #1a1a1a;      /* Texto Oscuro */
    --light: #f8f9fa;     /* Fondos Claros */
    --white: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif; /* Fuente moderna y limpia */
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Negrita para títulos */
}

/* =========================================
   2. BARRA DE NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.98); /* Blanco casi opaco */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Sombra suave */
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05); /* Efecto zoom en el logo */
}

.nav-link {
    color: var(--primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 10px 15px !important;
    transition: all 0.3s ease;
    position: relative;
}

/* Efecto de línea debajo al pasar el mouse */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: var(--secondary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--secondary) !important;
}

/* =========================================
   3. HERO SECTION (VIDEO DE FONDO)
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;      /* Altura completa de la pantalla */
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* El Video */
#myVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2; /* Detrás de todo */
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover; /* Cubre sin deformar */
}

/* Capa Oscura (Overlay) para leer el texto */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado sutil de negro a azul corporativo */
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(44, 90, 160, 0.6));
    z-index: -1;
}

/* Contenido sobre el video */
.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 20px;
}

.hero-content h1 {
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6); /* Sombra para leer mejor */
    letter-spacing: 1px;
}

/* =========================================
   4. BOTONES PERSONALIZADOS
   ========================================= */
.btn-rudy {
    background-color: var(--secondary);
    color: var(--white);
    border: 2px solid var(--secondary);
    padding: 12px 35px;
    border-radius: 50px; /* Bordes redondos */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-rudy:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px); /* Se levanta un poco */
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

.btn-outline-light {
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 600;
    border-width: 2px;
}

.btn-outline-light:hover {
    color: var(--primary);
    background-color: var(--white);
}

/* =========================================
   5. SECCIONES GENERALES
   ========================================= */
section {
    position: relative;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--primary);
    font-size: 2.2rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

/* Línea decorativa debajo de los títulos */
.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto; /* Centrado */
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    margin-top: 15px;
    color: #666;
    font-size: 1.1rem;
}

/* =========================================
   6. TARJETAS DE SERVICIOS
   ========================================= */
.service-card {
    background: var(--white);
    border-radius: 15px;
    transition: all 0.3s ease;
    border-bottom: 5px solid transparent; /* Borde invisible inicial */
}

.service-card:hover {
    transform: translateY(-10px); /* Levantar tarjeta */
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
    border-bottom: 5px solid var(--secondary); /* Aparece borde de color */
}

.service-icon {
    transition: transform 0.3s;
}

.service-card:hover .service-icon {
    transform: scale(1.1); /* Icono crece al pasar mouse */
    color: var(--secondary) !important;
}

/* =========================================
   7. FORMULARIOS Y NEWSLETTER
   ========================================= */
/* Formulario de Contacto */
#contacto .card {
    border-radius: 15px;
}

.form-control {
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #ddd;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(70, 181, 190, 0.2); /* Sombra turquesa */
    border-color: var(--secondary);
}

/* Sección Newsletter */
#novedades {
    background-color: var(--primary) !important;
    /* Un patrón sutil de fondo opcional */
    background-image: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.05) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
}

/* =========================================
   8. FOOTER Y EXTRAS
   ========================================= */
footer {
    background-color: var(--dark);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* =========================================
   BOTÓN WHATSAPP LATENTE (PULSE EFFECT)
   ========================================= */

/* 1. Definición de la animación "Latido" */
@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.1); /* Crece un 10% */
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); /* El borde se expande y desvanece */
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* 2. Estilos del Botón */
.float-wa {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%; /* Redondo perfecto */
    text-align: center;
    font-size: 35px; /* Icono un poco más grande */
    z-index: 1000; /* Siempre encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    
    /* AQUI APLICAMOS LA ANIMACIÓN */
    animation: pulse-green 2s infinite;
    transition: all 0.3s ease;
}

/* 3. Efecto al pasar el mouse (se detiene y queda grande) */
.float-wa:hover {
    background-color: #128C7E; /* Verde oscuro oficial */
    color: white;
    animation: none; /* Pausa el latido para facilitar el clic */
    transform: scale(1.15); /* Se queda un poco agrandado */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 4. Ajuste para celulares (opcional, para que no tape contenido) */
@media (max-width: 768px) {
    .float-wa {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
}

/* =========================================
   9. ANIMACIONES
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-up {
    animation-name: fadeInUp;
    animation-duration: 1.2s;
    animation-fill-mode: both;
}

/* =========================================
   10. RESPONSIVE (CELULARES)
   ========================================= */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem; /* Título más pequeño en celular */
    }
    .hero-content p {
        font-size: 1.1rem !important;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
    /* Ajuste para que la línea debajo del título se alinee a la izquierda si el texto está a la izquierda */
    .text-start .section-title h2::after {
        left: 0;
        transform: none;
        margin: 0;
    }
}

/* =========================================
   SECCIÓN NOSOTROS (Estilos Nuevos)
   ========================================= */

/* Efecto hover en las tarjetas de Misión/Visión */
.hover-card {
    transition: all 0.3s ease;
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    background-color: white !important; /* Pasa de gris claro a blanco puro */
}

/* Espaciado de letras para subtítulos */
.ls-1 {
    letter-spacing: 2px;
    font-size: 0.85rem;
}

/* Tarjetas del Equipo */
.team-card {
    margin-top: 50px; /* Espacio para que la foto sobresalga arriba */
    background-color: #fff;
    transition: all 0.3s ease;
}
.team-card:hover {
    transform: translateY(-5px);
}
.team-card img {
    object-fit: cover; /* Para que la foto no se deforme */
}

/* Iconos redes sociales equipo */
.social-links a {
    transition: color 0.3s;
}
.social-links a:hover {
    color: var(--primary) !important;
}

/* =========================================
   SECCIÓN POR QUÉ ELEGIRNOS (PREMIUM)
   ========================================= */

.parallax-section {
    position: relative;
    /* Altura mínima para asegurar presencia */
    min-height: 500px; 
}

/* El fondo fijo */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* ESTO CREA EL EFECTO PARALLAX */
    z-index: 0;
}

/* Capa oscura sofisticada (Azul muy oscuro con transparencia) */
.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.85), rgba(44, 90, 160, 0.75));
    z-index: 0;
}

/* Las tarjetas blancas flotantes */
.feature-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px); /* Se levanta */
    box-shadow: 0 15px 30px rgba(0,0,0,0.2) !important;
    border-bottom: 4px solid var(--secondary); /* Detalle de color al pasar mouse */
}

.icon-circle {
    transition: all 0.3s ease;
}

.feature-card:hover .icon-circle {
    background-color: var(--primary) !important;
    color: white !important;
}

/* Botón flotante estilo hover */
.hover-scale {
    transition: transform 0.3s;
}
.hover-scale:hover {
    transform: scale(1.05);
    background-color: white;
    color: var(--primary);
}

/* =========================================
   ESTILOS NUEVOS DE CONTACTO
   ========================================= */

/* Campos del formulario más suaves */
#contacto .form-control {
    border-radius: 8px; /* Bordes un poco redondeados */
}

#contacto .form-control:focus {
    background-color: #fff; /* Se pone blanco al escribir */
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15); /* Sombra azul suave */
    border: 1px solid var(--primary);
}

/* Iconos de contacto */
#contacto .rounded-circle {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Mapa responsive */
.map-container iframe {
    filter: grayscale(0%); /* Puedes poner 100% si quieres el mapa en blanco y negro */
    transition: filter 0.3s;
}
.map-container:hover iframe {
    filter: grayscale(0%);
}

/* =========================================
   FOOTER PROFESIONAL
   ========================================= */

.footer-rudy {
    background-color: #111827; /* Gris muy oscuro, casi negro azulado */
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

/* Títulos de columnas */
.footer-rudy h4 {
    letter-spacing: 1px;
}

.ls-1 {
    letter-spacing: 2px; /* Espaciado elegante para subtítulos */
}

/* Enlaces del footer */
.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--secondary); /* Color Turquesa al pasar el mouse */
    padding-left: 5px; /* Pequeño movimiento a la derecha */
}

/* Iconos Sociales */
.social-icons .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icons .btn-outline-light:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px); /* Se levanta un poco */
}

/* Líneas separadoras */
hr.border-secondary {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* =========================================
   ESTILOS CRÉDITOS DEVELOPER
   ========================================= */

/* Efecto en tu firma */
.developer-credit {
    opacity: 0.8;
    transition: all 0.3s ease;
}

.developer-credit:hover {
    opacity: 1; /* Se ilumina al pasar el mouse */
    transform: translateX(3px); /* Se mueve un poquito */
}

.developer-credit img {
    /* Si tu logo es negro y no se ve en el fondo oscuro, 
       descomenta la siguiente línea para invertirlo a blanco: */
    /* filter: brightness(0) invert(1); */
    
    vertical-align: middle;
}

/* Efecto enlaces legales */
.hover-link:hover {
    color: var(--secondary) !important; /* Se pone turquesa */
    text-decoration: underline !important;
}