* ============================= */
/* 1. Variables y Configuración General */
/* ============================= */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    color: #333;
    background-color: var(--color-fondo);
}

:root {
    --color-principal: #ffc107; /* Amarillo/Naranja (Warning de Bootstrap) */
    --color-secundario: #0d1b2a; /* Azul Oscuro (Casi Negro) */
    --color-fondo: #f8f9fa; /* Gris Claro */
    --color-texto-oscuro: #333;
    --borde-redondo: 16px;
    --sombra-suave: 0 5px 15px rgba(0,0,0,0.08);
    --sombra-dura: 0 10px 25px rgba(0,0,0,0.2);
    --transicion: all 0.3s ease-in-out;
    --espaciado-seccion: 5rem;
}

h1, h2, h3, h4, .fw-bolder {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; /* Extra-bold */
}

/* ============================= */
/* 2. Barra de Navegación (Navbar) */
/* ============================= */
.navbar {
    padding: 0.5rem 0;
    background-color: black!important;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar-logo {
    height: 60px; /* Reducido un poco para el scroll */
    transition: height 0.4s ease;
}

.navbar-scrolled {
    background-color: black!important; /* Semitransparente oscuro */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    padding: 0.25rem 0;
}

.navbar-scrolled .navbar-logo {
    height: 50px;
}

.nav-link {
    position: relative;
    color: #fff !important;
    font-weight: 700;
    padding: 10px 15px !important;
    transition: color 0.3s;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 5px; /* Ajustado */
    left: 50%; /* Centrado */
    transform: translateX(-50%);
    width: 0%;
    height: 3px; /* Más grueso */
    background-color: var(--color-principal);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* ============================= */
/* 3. Hero Section (CORRECCIÓN CRÍTICA DE Z-INDEX) */
/* ============================= */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90vh;
    overflow: hidden;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Capa oscura sobre el video para mejorar legibilidad */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: -1;
}

/* Contenido de texto y botón: ASEGURA QUE ESTÉ EN CIMA */
.hero-content {
    position: relative; 
    z-index: 10; 
    color: white;
    padding: 2rem;
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 400;
}

.hero-content .btn {
    border-radius: 50px;
    padding: 0.8rem 3rem;
    letter-spacing: 1px;
    background-color: var(--color-principal);
    color: #000;
    border: none;
}
.hero-content .btn:hover {
    background-color: #e6b800;
}


/* ============================= */
/* 4. Secciones Generales */
/* ============================= */
section {
    padding: var(--espaciado-seccion) 0;
    position: relative; 
    z-index: 1;
}

section h2.fw-bold {
    font-size: 2.8rem;
    color: var(--color-secundario);
    position: relative;
    display: inline-block;
}

section h2.fw-bold::after {
    content: "";
    display: block;
    width: 80px; 
    height: 5px; 
    background-color: var(--color-principal);
    margin: 15px auto 0;
    border-radius: 10px;
}

p.lead.text-muted {
    font-size: 1.25rem;
    color: #555 !important;
}

/* ============================= */
/* 5. Sección Nosotros */
/* ============================= */
.row.align-items-center.g-5 .col-lg-6 img {
    max-width: 100%;
    height: auto;
    border-radius: var(--borde-redondo);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card.h-100.p-3 {
    background-color: #fff;
    border-left: 5px solid var(--color-principal);
    box-shadow: var(--sombra-suave);
    transition: var(--transicion);
}
.card.h-100.p-3:hover {
    transform: none;
    background-color: #fffaf0;
}

.card.h-100 i {
    color: var(--color-secundario) !important;
    background-color: var(--color-principal);
    padding: 10px;
    border-radius: 50%;
    font-size: 1.5rem !important;
}

/* ============================= */
/* 6. Sección Servicios */
/* ============================= */
#servicios .card {
    background: #fff;
    border: 1px solid #eee;
    box-shadow: var(--sombra-suave);
    padding: 2rem;
    text-align: center;
}

#servicios .card:hover {
    border-color: var(--color-principal);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.card-icon {
    font-size: 3.5rem !important;
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================= */
/* 7. Sección Equipos */
/* ============================= */
#equipos .list-group-item {
    padding: 1rem 1.5rem;
    margin-bottom: 8px;
    border-radius: var(--borde-redondo);
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    transition: var(--transicion);
}

#equipos .list-group-item:hover {
    background-color: var(--color-principal);
    color: var(--color-secundario);
    transform: translateX(10px);
}

#equipos .list-group-item i {
    font-size: 1rem;
    color: var(--color-secundario) !important;
}
#equipos .list-group-item:hover i {
    color: white !important;
}

/* ============================= */
/* 8. Galería */
/* ============================= */
.gallery-img {
    height: 280px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--borde-redondo);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    filter: brightness(1.05);
}

/* ============================= */
/* 9. Footer */
/* ============================= */
#contacto {
    background-color: var(--color-secundario) !important;
    color: white;
}

#contacto h5 {
    font-weight: 800;
    color: var(--color-principal) !important;
}

#contacto p a.text-white {
    transition: color 0.3s ease-in-out;
}

#contacto p a.text-white:hover {
    color: var(--color-principal) !important;
    text-decoration: none;
}

#contacto .btn-floating {
    background-color: #333;
    border: 1px solid #333;
    border-radius: 50%; 
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

#contacto .btn-floating:hover {
    background-color: var(--color-principal);
    border-color: var(--color-principal);
    color: #000 !important;
}

#contacto .btn-floating i {
    color: white;
}
#contacto .btn-floating:hover i {
    color: #000;
}

#contacto hr {
    border-top: 1px solid rgba(255, 255, 255, 0.9);
}

/* Media Queries para Responsividad */
@media (max-width: 991.98px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
}
@media (max-width: 767.98px) {
    .hero-section {
        height: 70vh;
    }
    .gallery-img {
        height: 200px;
    }
    #equipos .list-group-item:hover {
        transform: none;
    }
}