/* --- ESTILOS PARA EMPRESA DEL VALLE --- */

/* --- VARIABLES DE COLOR Y TIPOGRAFÍA --- */
:root {
    --azul-rey: #0A2E6F; /* Azul Rey para el footer y acentos */
    --azul-claro: #e6f0ff;
    --gris-oscuro: #333;
    --gris-medio: #555;
    --blanco: #ffffff;
    --fuente-principal: 'Poppins', sans-serif;
}

/* --- RESETEO Y ESTILOS GENERALES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-principal);
    line-height: 1.6;
    color: var(--gris-oscuro);
    background-color: var(--blanco);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- NAVEGACIÓN --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.9); /* Fondo semitransparente */
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--azul-rey);
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar .logo img {
    height: 40px;
    width: auto;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navbar .nav-links a {
    color: var(--gris-oscuro);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--azul-rey);
}

/* --- SECCIÓN HERO CON VIDEO DE FONDO --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--blanco);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 46, 111, 0.6);
    z-index: 1;
}

.hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--blanco);
    color: var(--azul-rey);
    font-weight: 600;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- SECCIÓN: SOBRE NOSOTROS --- */
.about {
    padding: 80px 0;
    background-color: var(--blanco);
}
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}
.about-image {
    flex: 1;
}
.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.about-content {
    flex: 1;
}
.about-content h2 {
    font-size: 2.5rem;
    color: var(--azul-rey);
    margin-bottom: 20px;
}
.about-content p {
    font-size: 1rem;
    color: var(--gris-medio);
    margin-bottom: 15px;
}

/* --- SECCIÓN DE EMPRESAS FILIALES (CARRUSEL) --- */
.affiliates {
    padding: 80px 0;
    background-color: #f9f9f9;
    text-align: center;
    overflow: hidden; /* Esconde los elementos que salen del contenedor */
}

.affiliates h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--gris-oscuro);
}

.carousel-container {
    width: 100%;
    overflow: hidden; /* Asegura que solo se vea la pista en movimiento */
}

.carousel-track {
    display: flex;
    animation: scroll 40s linear infinite; /* Animación infinita */
    width: fit-content; /* Ajusta el ancho al contenido */
}

.affiliate-item {
    flex: 0 0 auto; /* No crece ni se encoge, base auto */
    width: 250px; /* Ancho fijo para cada item */
    padding: 20px;
    margin: 0 15px;
    background: var(--blanco);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.affiliate-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.affiliate-item img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.affiliate-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.affiliate-item p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gris-medio);
    margin-top: 10px;
}

/* Estilo para el enlace dentro del item */
.affiliate-item a {
    color: inherit; /* Hereda el color del párrafo */
    transition: color 0.3s ease;
}

.affiliate-item a:hover {
    color: var(--azul-rey); /* Cambia a azul al pasar el ratón */
}

/* Animación para el carrusel */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Mueve la pista la mitad de su ancho total */
    }
}

/* --- PIE DE PÁGINA (FOOTER) --- */
.footer {
    background-color: var(--azul-rey);
    color: var(--blanco);
    padding: 60px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-content h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--blanco);
}

.footer-content p, .footer-content a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--blanco);
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none; /* En móviles se podría implementar un menú hamburguesa */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .affiliates h2 {
        font-size: 2rem;
    }
    .about-container {
        flex-direction: column;
    }
    .about-image {
        order: 2;
    }
    .about-content {
        order: 1;
        text-align: center;
    }
    .affiliate-item {
        width: 220px; /* Ajusta el ancho en móviles si es necesario */
    }
}

/* 
======================================================================
NOTA: CÓMO CAMBIAR A UNA VISTA DE CUADRÍCULA ESTÁTICA
======================================================================
Si prefieres mostrar las empresas en una cuadrícula estática en lugar del carrusel,
sigue estos dos pasos:

1. En tu archivo HTML, reemplaza la estructura del carrusel:
   <div class="carousel-container">...</div>
   por esta:
   <div class="affiliate-grid">...</div>

2. En este archivo CSS, COMENTA o BORRA los estilos de ".carousel-container", ".carousel-track" y "@keyframes scroll".
   Luego, DESCOMENTA el siguiente bloque de estilos para ".affiliate-grid".

.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
}

.affiliate-item {
    background: var(--blanco);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 280px;
}
======================================================================
*/