/* ======== ESTILOS GENERALES ======== */
body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth !important;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    color: #0d2c4b;
}

/* ======== BARRA DE NAVEGACIÓN ======== */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: padding 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.navbar .navbar-brand img {
    transition: width 0.3s ease-in-out;
}

.nav-link {
    font-weight: 600;
    color: #0d2c4b !important;
}

.nav-link:hover {
    color: #007bff !important;
}

.navbar.navbar-scrolled {
    padding-top: 5px;
    padding-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.navbar.navbar-scrolled .navbar-brand img {
    width: 220px; /* Reducido al hacer scroll */
}

/* ======== Estilos del Hero Slider ======== */
.hero-slider {
    width: 100%;
    height: 90vh;
}

.swiper-slide {
    display: flex;
    align-items: center; /* Alinear contenido a la izquierda */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Define las imágenes de fondo para cada slide */
.slide-1 { background-image: url('../images/hero-background.jpg'); } /* ✅ Tu imagen principal */
.slide-2 { background-image: url('../images/hero-background-2.jpg'); }
.slide-3 { background-image: url('../images/hero-background-3.jpg'); }

.swiper-slide .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 44, 75, 0.6);
}

.swiper-slide .container {
    position: relative;
    z-index: 2;
}

.swiper-button-next, .swiper-button-prev {
    color: #ffffff !important;
    z-index: 10;
}

.swiper-pagination-bullet-active {
    background: #ffffff !important;
}

.hero-slider .btn-primary {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 5px;
    border: 2px solid #fff;
    background-color: transparent;
    color: #fff;
    transition: all 0.3s ease;
}

.hero-slider .btn-primary:hover {
    background-color: #fff;
    color: #0d2c4b;
}

/* ======== SERVICIOS (DISEÑO DE TARJETA INTERACTIVA) ======== */
#servicios {
    background-color: #f8f9fa;
}

/* Estilo para el enlace que envuelve la tarjeta */
.service-card-link {
    text-decoration: none;
    color: inherit; /* Hereda el color de texto normal */
}

.service-card-minimal {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-icon-minimal {
    font-size: 2rem;
    color: #0d2c4b; /* Cambiamos el color base del ícono a azul oscuro */
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.service-title-minimal {
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.service-text-minimal {
    color: #0D2C4B;
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
}

/* --- EL NUEVO EFECTO HOVER --- */
.service-card-link:hover .service-card-minimal {
    transform: translateY(-8px);
    box-shadow: 1 15px G_Nlh-g rgba(0, 123, 255, 0.1);
    border-color: #0D2C4B;
}

/* Al hacer hover en el enlace, cambian el ícono y el título dentro de la tarjeta */
.service-card-link:hover .service-icon-minimal,
.service-card-link:hover .service-title-minimal {
    color: #0D2C4B;
}

/* Estilo para la tarjeta destacada */
.featured-card {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.07);
    border-color: #e9ecef;
}

/* ======== SECCIÓN QUIÉNES SOMOS ======== */
#quienes-somos ul span {
    flex-grow: 1;
}

/* ======== SECCIÓN PARALLAX ======== */
.parallax-section {
    position: relative;
    padding: 160px 0;
    background-image: url('../images/parallax-bg.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 44, 75, 0.6);
}

/* ======== MAPA Y ETIQUETAS DE COBERTURA ======== */
.coverage-pills-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.coverage-pill {
    padding: 8px 20px;
    border-radius: 50px;
    background-color: transparent;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coverage-pill:hover,
.coverage-pill.active {
    background-color: #0d2c4b;
    color: #ffffff;
    border-color: #0d2c4b;
    transform: translateY(-2px);
}

#map {
    height: 550px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.marker {
    background-image: url('../images/favicon.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(13, 44, 75, 0.5);
}

.mapboxgl-popup-content {
    font-family: 'Poppins', sans-serif;
    padding: 10px 15px;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
}

/* ======== CARRUSEL DE CLIENTES ======== */
.logo-carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-carousel-container:before,
.logo-carousel-container:after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-carousel-container:before {
    left: 0;
    background: linear-gradient(to left, rgba(248, 249, 250, 0), #f8f9fa);
}

.logo-carousel-container:after {
    right: 0;
    background: linear-gradient(to right, rgba(248, 249, 250, 0), #f8f9fa);
}

.logo-track {
    display: flex;
    /* ✅ CAMBIO: Ajustamos el ancho promedio a 350px para logos más grandes */
    width: calc(350px * 20); /* (Ancho promedio 350px) x (10 logos x 2) */
    animation: scroll 60s linear infinite;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-track img {
    /* ✅ CAMBIO: Altura duplicada */
    height: 120px; 
    width: auto;
    padding: 0 40px; /* Mantenemos un buen espaciado */
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.logo-track img:hover {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* ✅ CAMBIO: Ajustamos la distancia de desplazamiento */
        transform: translateX(calc(-350px * 10)); 
    }
}

/* ======== FOOTER ======== */
.main-footer {
    background-color: #0a2138;
    color: #a9a9a9;
    padding-top: 60px;
}

.footer-logo {
    max-width: 180px;
}

.footer-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li, .footer-contact li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #a9a9a9;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 5px;
}

/* Ajuste para enlaces de contacto en el footer */
.footer-contact a {
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #007bff !important; /* Azul primario al pasar el mouse */
}

.footer-social a {
    color: #a9a9a9;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding: 20px 0;
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}

/* ======== AJUSTES PARA DISPOSITIVOS MÓVILES ======== */
@media (max-width: 767.98px) {

    /* 1. Fija el tamaño del logo y elimina el efecto de encogimiento al scrollear */
    .navbar .navbar-brand img,
    .navbar.navbar-scrolled .navbar-brand img {
        width: 220px;
    }

    /* 2. Oculta las flechas de navegación del slider principal */
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    /* --- AJUSTES DE TEXTO PARA MÓVIL EN EL HERO --- */
    .hero-slider h1.display-4 {
        font-size: 2.2rem; /* Reducimos el tamaño del título principal */
        line-height: 1.3;  /* Ajustamos el interlineado */
    }

    .hero-slider p.lead {
        font-size: 1rem; /* Reducimos el tamaño del texto descriptivo */
    }
}

/* ======== BOTÓN PARA SUBIR ======== */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background-color: #0056b3;
}

/* ======== ESTILOS DE LA NUEVA SECCIÓN DE GALERÍA ======== */
#galeria {
    padding: 80px 0;
}

.gallery-container {
    -webkit-column-count: 3; /* Para Chrome, Safari, Opera */
    -moz-column-count: 3;    /* Para Firefox */
    column-count: 3;         /* Estándar */
    -webkit-column-gap: 15px;
    -moz-column-gap: 15px;
    column-gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    -webkit-column-break-inside: avoid; /* Evita que las imágenes se corten entre columnas */
    page-break-inside: avoid;
    break-inside: avoid;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(13, 44, 75, 0.8), transparent);
    color: white;
    padding: 30px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* --- Ajustes responsivos para la galería --- */
@media (max-width: 991.98px) {
    .gallery-container {
        -webkit-column-count: 2;
        -moz-column-count: 2;
        column-count: 2;
    }
}

@media (max-width: 575.98px) {
    .gallery-container {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }
}

/* No debe haber nada después de esta línea */