/* ========================================================================= */
/* 1. SECCIÓN HERO (CARRUSEL & OVERLAY) */
/* ========================================================================= */
.hero-container {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    background-color: #000;
}

.carousel-item {
    position: relative;
    height: 90vh;
}

.hero-img {
    width: 100%;
    height: 90vh;
    object-fit: cover;
    filter: brightness(45%) contrast(105%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0,70,135,0.2), rgba(0,0,0,0.7));
    z-index: 2;
}

.hero-text {
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 0 20px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-text .subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: #d90429; 
    letter-spacing: 2px;
    margin-bottom: 20px; 
    text-transform: uppercase;
}

.hero-text .description p {
    font-size: 1.15rem;
    line-height: 1.4; 
    margin-bottom: 0; 
    color: rgba(255, 255, 255, 0.9);
}

.carousel-indicators {
    z-index: 15; 
    margin-bottom: 2rem; 
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 15;
}

.btn-hero {
    display: inline-block;
    margin-top: 30px;
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-hero:hover {
    background: #d90429; 
    border-color: #d90429;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(217, 4, 41, 0.3);
}

/* ========================================================================= */
/* 2. SECCIÓN ¿QUIÉNES SOMOS? */
/* ========================================================================= */
.about-section {
    background-color: #ffffff;
}

.about-section h2 {
    color: #04294b; 
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.about-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #d90429;
}

.btn-services {
    display: inline-block;
    background-color: #04294b;
    color: #ffffff;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #04294b;
}

.btn-services:hover {
    background-color: transparent;
    color: #d90429; 
    border-color: #d90429; 
    transform: translateX(3px);
}

.about-section p {
    line-height: 1.9;
    margin-bottom: 1.40rem;         
    color: #000000;        
}

.img-match-height {
    height: 100%;
    width: 100%;
    object-fit: cover; 
}

/* ========================================================================= */
/* 3. SECCIÓN ¿POR QUÉ ELEGIRNOS? (TARJETAS) */
/* ========================================================================= */
.why-section { 
    background-color: #f8fafc; 
}

.why-section h2 { 
    color: #04294b; 
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.why-card h5 {
    color: #04294b !important;
}

.why-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #d90429;
}

.why-card {
    background: #ffffff;
    border-radius: 8px;
    border-top: 4px solid #c3c2c273;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
}

.why-card:hover {
    transform: translateY(-5px);
    border-top-color: #d90429;
    box-shadow: 0 12px 20px rgba(159, 130, 130, 0.1);
}

.icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 90px; 
    margin-bottom: 10px;
}

.why-icon {
    font-size: 4rem !important; 
    color: #d90429;
    transition: all 0.3s ease;
    display: inline-block; 
}

.why-card:hover .why-icon {
    color: #d90429;
    transform: scale(1.1);
}

/* ========================================================================= */
/* 4. SECCIÓN NUESTRAS SOLUCIONES (SERVICIOS) */
/* ========================================================================= */
.services-section {
    background-color: #ffffff;
}

.services-section h2 {
    color: #04294b;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(217, 4, 41, 0.3); 
    box-shadow: 0 15px 30px rgba(0, 70, 135, 0.08);
}

.service-icon {
    font-size: 2.2rem;
    color: #d90429; 
    background-color: rgba(217, 4, 41, 0.06);
    padding: 10px 18px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: #d90429;
    color: #ffffff; 
}

.service-card h5 {
    color: #04294b;
    margin-top: 15px;
}

section {
    scroll-margin-top: 90px;
}

/* ========================================================================= */
/* 5. SECCIÓN DE MARCAS (CARRUSEL INFINITO) */
/* ========================================================================= */
.brands-section {
    background-color: #ffffff;
    overflow: hidden;
}

.brands-title {
    color: #04294b;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    font-size: 2rem;
}

.brands-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #d90429;
}

.brands-marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 30px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.brands-marquee-track {
    display: inline-block;
    animation: scroll-marquee 40s linear infinite;
}

.brands-marquee-container:hover .brands-marquee-track {
    animation-play-state: paused;
}

.brand-logo {
    height: 55px; 
    width: auto;
    margin: 0 45px;
    object-fit: contain;
    vertical-align: middle;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.brand-logo:hover {
    transform: scale(1.15);
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.service-card, .why-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}

.service-card:hover, .why-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer;
}

/* ========================================================================= */
/* MEJORAS RESPONSIVE EXCLUSIVAS PARA CELULARES (< 768px) - HERO & MARCAS */
/* ========================================================================= */
@media (max-width: 768px) {
    /* Forzar altura limpia del carrusel en móviles */
    .hero-container,
    .carousel-item,
    .hero-img {
        height: 60vh !important;
        min-height: 420px !important;
    }

    /* Contenedor del texto adaptado al 100% del ancho del celular sin desbordes */
    .hero-text {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    /* Reducción radical y forzosa del título principal para que quepa en una o dos líneas sin salirse */
    .hero-text h1 {
        font-size: 7.5vw !important; /* Se ajusta de forma fluida al ancho de la pantalla del celular */
        line-height: 1.1 !important;
        margin-bottom: 8px !important;
        word-break: keep-all;
    }

    .hero-text .subtitle {
        font-size: 1rem !important;
        letter-spacing: 1px !important;
        margin-bottom: 10px !important;
    }

    .hero-text .description p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        padding: 0 5px;
    }

    /* Botón del hero adaptado */
    .btn-hero {
        margin-top: 15px !important;
        padding: 8px 20px !important;
        font-size: 13px !important;
    }

    /* Ajustes del carrusel de marcas en móvil */
    .brand-logo {
        height: 35px;
        margin: 0 20px;
    }
    
    .brands-title {
        font-size: 1.3rem;
    }
    
    .brands-marquee-track {
        animation-duration: 20s;
    }
}