/* --- Variables de Color de la Marca BAH --- */
:root {
    --azul-primario: #312783;
    --naranja-secundario: #E73B22;
    --gris-terciario: #6E8280;
    --blanco: #FFFFFF;
    --negro-texto: #333333;
    --gris-oscuro-footer: #222222; 
}

/* --- Reseteo Básico y Estilos Generales --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* <-- La regla importante */
}

body { 
    font-family: 'Gotham', Arial, sans-serif; 
    color: var(--negro-texto); 
    line-height: 1.6; 
    font-size: 18px; 
}
/* --- Estilos del Header --- */
.header { background-color: var(--azul-primario); padding: 3px 0; position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; }
.header-container {
    display: flex;
    justify-content: space-between; /* Empuja el logo y el bloque derecho a los extremos */
    align-items: center;
    padding: 0 30px;
}
.logo img { height: 60px; }

.header-right {
    display: flex;
    align-items: center;
    gap: 40px; /* Espacio entre la navegación y el botón de contacto */
}
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 30px; }
.main-nav a { text-decoration: none; color: var(--blanco); font-size: 16px; transition: color 0.3s ease; white-space: nowrap; }
.main-nav a:hover { color: var(--naranja-secundario); }
.btn-contact {
    display: inline-block;
    border: 1px solid var(--blanco);
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--blanco);
    white-space: nowrap;
}
.btn-contact:hover {
    background-color: var(--blanco);
    color: var(--azul-primario);
}
/* --- Estilos de la Sección Hero y Video --- */
main { padding-top: 70px; } 
.hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blanco);
}

.video-container {
    position: relative; /* Contenedor para el video y el overlay */
    width: 60%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Oculta lo que se salga de los bordes redondeados */
}

.hero-video {
    width: 100%;
    height: auto;
    display: block; /* Elimina un espacio sobrante debajo del video */ /* Pone el video en escala de grises por defecto */
    transition: filter 0.5s ease;
}

.hero-video.color {
    filter: grayscale(0%); /* Clase que se añade con JS para devolver el color */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.btn-video {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--blanco);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    color: var(--blanco);
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.video-overlay:hover .btn-video {
    background-color: rgba(255, 255, 255, 0.3);
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- Estilos de Títulos de Sección --- */
.section-title-bar { background-color: var(--azul-primario); color: var(--blanco); text-align: center; padding: 20px 0; }
.section-title-bar h2 { font-size: 36px; font-weight: 700; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 36px; color: var(--azul-primario); font-weight: 700; }


/* --- Estilos de la Sección Quiénes Somos --- */
.about-us { padding-bottom: 80px; background-color: #f9f9f9; }
.about-us-container {
    padding-top: 80px; 
}
.about-us-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}
.about-us-image {
    display: flex;
    justify-content: center;
    align-items: center;
}
.about-us-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.about-us-content { 
    padding-right: 60px; /* <-- CAMBIO AQUÍ: Añadimos espaciado derecho */
}
.about-us-content p { margin-bottom: 20px; color: #555; text-align: justify; }
.about-us-content h3 { font-size: 24px; color: var(--azul-primario); margin-top: 30px; margin-bottom: 10px; }

/* --- Estilos de la Sección de Servicios --- */
.services { padding-bottom: 80px; }
.services-container { text-align: center; padding-top: 50px; }
.services-intro { max-width: 800px; margin: 0 auto 40px auto; color: #555; text-align: justify; }
.services-wrapper { max-width: 80%; margin: 0 auto;}
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.service-card { background-color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; text-align: center; transition: transform 0.3s ease; }
.service-card:hover { transform: translateY(-10px); }
.service-card img { width: 100%; height: 250px; object-fit: cover; }
.service-card h4 { padding: 20px; color: var(--azul-primario); font-size: 18px; min-height: 80px; display: flex; justify-content: center; align-items: center; }
.services-button-container {
    margin-top: 50px;
    /* --- ESTAS LÍNEAS SON NUEVAS --- */
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacio entre los botones */
    flex-wrap: wrap; /* Para que se apilen en pantallas pequeñas */
}
.btn-outline { padding: 12px 28px; border: 1px solid var(--naranja-secundario); color: var(--naranja-secundario); text-decoration: none; border-radius: 5px; font-weight: bold; transition: all 0.3s ease; }
.btn-outline:hover { background-color: var(--naranja-secundario); color: var(--blanco); }
.services-full-page {
    padding: 0px 0 80px 0; /* <-- CAMBIO AQUÍ: Reducimos el padding superior */
}

/* --- Estilos de la Sección Equipo y Maquinaria --- */
.equipment { padding-bottom: 80px; background-color: #f9f9f9; }
.equipment-container { max-width: 900px; text-align: center; padding-top: 50px; margin: 0 auto;}
.equipment-intro, .equipment-outro { margin: 40px 0; color: #555; text-align: justify;}
.carousel { position: relative; height: 500px; margin: 0 auto; }
.carousel-track-container { height: 100%; position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); background-color: #e9ecef; }
.carousel-track { list-style: none; position: relative; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel-slide { position: absolute; top: 0; bottom: 0; width: 100%; display: flex; justify-content: center; align-items: center; }
.carousel-image { width: 100%; height: 100%; object-fit: contain; }
.carousel-button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.8); border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.carousel-button:hover { background: white; }
.carousel-button--left { left: 10px; }
.carousel-button--right { right: 10px; }
.carousel-button img { width: 20px; }
.carousel-slide.is-hidden { display: none; }

/* --- Estilos de la Sección Proyectos Destacados --- */
.projects { padding-bottom: 80px; }
.projects-container { padding-top: 50px;max-width: 80%; margin: 0 auto; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.project-card { background-color: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; }
.project-card:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); }
.project-card img { width: 100%; height: 300px; object-fit: cover; }
.project-card-content { padding: 25px; }
.project-card-content h3 { font-size: 22px; color: var(--azul-primario); margin-bottom: 20px; }
.project-card-content ul { list-style: none; }
.project-card-content li { font-size: 15px; color: #555; margin-bottom: 10px; line-height: 1.5; }
.project-card-content li strong { color: var(--negro-texto); font-weight: 600; display: block; }

.rental {
    padding-bottom: 80px;
}
.rental-container {
    padding-top: 80px;
    text-align: center; /* Centra el bloque de introducción */
}
.rental-intro h3 {
    font-size: 28px;
    color: var(--azul-primario);
    margin-bottom: 20px;
}
.rental-intro p {
    color: #555;
    max-width: 800px; 
    margin: 0 auto 40px auto;
    text-align: justify; /* Centra el párrafo y le da margen inferior */
}
.rental-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Crea las dos columnas para las imágenes */
    gap: 20px;
    justify-items: center;
}
.rental-image-grid img {
    width: 80%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Estilos de la Sección Clientes --- */
.clients { padding: 80px 0; background-color: #f9f9f9; }
.clients-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: nowrap; 
    gap: 40px;
}
.client-logo {
    max-width: 180px;
    flex-shrink: 1; /* Permite que los logos se encojan si no hay espacio */
    min-width: 100px; /* Evita que se encojan demasiado */
}
.client-logo img { width: 100%; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.client-logo img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }

/* --- Estilos del Footer (Sección de Contacto) --- */
.site-footer { background-color: var(--azul-primario); color: var(--blanco); padding: 60px 0 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1fr;
    gap: 50px;
    padding-bottom: 50px;
    align-items: center; /* <-- CAMBIO AQUÍ: Centra verticalmente */
}
.footer-col h3 { font-size: 20px; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col-logo { display: flex; justify-content: center; }
.footer-col-logo img {
    width: 100%;
    max-width: 280px; /* <-- CAMBIO AQUÍ: Aumenta el tamaño */
}
.footer-col-contact li { margin-bottom: 15px; line-height: 1.5; }
.footer-col-contact strong { display: block; color: #a9a9d7; font-size: 14px; }
.footer-col-links a { color: var(--blanco); text-decoration: none; display: block; margin-bottom: 10px; transition: color 0.3s ease; }
.footer-col-links a:hover { color: var(--naranja-secundario); }
.footer-copyright { text-align: center; padding: 20px 0; border-top: 1px solid #4a4a9c; font-size: 14px; color: #a9a9d7; }

/* --- Estilos del Modal de Contacto --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 400px; text-align: center; position: relative; }
.close-button { color: #aaa; position: absolute; top: 10px; right: 20px; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-link { display: block; padding: 12px; margin: 10px 0; background-color: var(--azul-primario); color: var(--blanco); text-decoration: none; border-radius: 5px; }

/* --- Adaptaciones para Móviles --- */
.hamburger { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; z-index: 2000; }
.hamburger-line { width: 100%; height: 3px; background-color: var(--blanco); border-radius: 5px; }

.mobile-nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background-color: var(--azul-primario); z-index: 1500; transition: right 0.3s ease-in-out; display: flex; flex-direction: column; }
.mobile-nav.open { right: 0; }
.mobile-nav ul { list-style: none; padding: 120px 30px 30px 30px; overflow-y: auto; }
.mobile-nav li { margin-bottom: 25px; }
.mobile-nav a { color: var(--blanco); text-decoration: none; font-size: 20px; white-space: nowrap; }
.mobile-nav .btn-contact { text-align: center; padding: 20px; border-top: 1px solid #4a4a9c; margin-top: auto; }

@media (max-width: 1024px) {
    .header-right { display: none; }
    .hamburger { display: flex; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .about-us-grid, .services-grid, .projects-grid, .footer-grid, .rental-image-grid { grid-template-columns: 1fr; text-align: center; }
    .section-title-bar h2, .section-title h2 { font-size: 28px; }
    .about-us-content h3 { font-size: 20px; }
    .footer-col-logo { margin: 0 auto 30px auto; }
    .footer-col-contact strong { display: inline; margin-right: 8px; }
    .clients-grid {
        flex-wrap: wrap; /* Permite que los logos pasen a la siguiente línea */
        justify-content: center; /* Centra los logos */
        gap: 30px;
    }
}

