/* =========================================
   VARIABLES DE MARCA (ESTILO CORPORATIVO MONOLÍTICO)
========================================= */
:root {
    --fx-red: #B2181E;        
    --fx-red-dark: #8A1217;   
    --fx-grey: #4A4D50;       
    --fx-grey-light: #DDDDDD;   
    --fx-dark: #121416;       
    --fx-light: #F4F6F8;   

}

/* =========================================
   ESTILOS GENERALES
========================================= */
html, body {
    background-color: var(--fx-dark) !important; 
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased; 
}
.letter-spacing-1 {
    letter-spacing: 1px;
}

/* =========================================
   NAVBAR INSTITUCIONAL
========================================= */
.navbar {
    padding: 15px 0; 
    background-color: var(--fx-dark) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
    height: 100px;
}
.navbar img{
    height: 60px;
    filter: drop-shadow(5px 5px 8px var(--fx-grey)); /* Sombra roja para destacar el logo */
    margin: 10px;
    margin-right: 55px;
    background-color: rgba(255, 255, 255, 0.7); /* Un fondo semitransparente para destacar el logo */
    border-radius: 20%;
    padding: 5px;
    width: auto;
}
.navbar img:hover{
    height: 70px;
    filter: drop-shadow(5px 5px 8px var(--fx-grey-light)); /* Sombra roja para destacar el logo */
    margin: 5px;
    margin-right: 50px;
    background-color: rgba(255, 255, 255, 0.9); /* Un fondo semitransparente para destacar el logo */
}
.navbar-brand span, .nav-link {
    background-color: var(--fx-dark); /* Un fondo semitransparente para destacar el logo */
    color: #ffffff !important;
    letter-spacing: 1px;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-link:hover {
    color: var(--fx-red) !important; 
}

/* =========================================
   HERO SECTION (CABECERA PRINCIPAL TIPO CORPORATIVO)
========================================= */
.hero-section {
    width: 100%;
    min-height: 75vh; 
    background-image: linear-gradient(rgba(18, 20, 22, 0.7), rgba(18, 20, 22, 0.85)), url('../images/slide1.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 0; 
    padding: 80px 20px; 
    color: #ffffff; 
}

.hero-section h1 {
    color: #ffffff;
    font-weight: 900; 
    letter-spacing: -1.5px; 
    text-shadow: 0px 4px 20px rgba(0, 0, 0, 0.9);
}

.hero-section .lead {
    font-size: 1.35rem; 
    font-weight: 300;
    line-height: 1.6;
    max-width: 800px; 
}

.logo {
    background-color: #ffffff;
    padding: 20px 30px;
    border-radius: 12px;
    max-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================
   GRID MONOLÍTICO EDGE-TO-EDGE (GAP 2px)
========================================= */
.parent {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, minmax(250px, auto)); 
    gap: 2px;
    width: 100vw; 
    max-width: 100%; 
    margin: 0px auto;
    margin-top: 3px; 
    background-color: var(--fx-red);
    padding: 2px 0; 
}

/* Posicionamiento por categorías semánticas */
.bento-principal { 
    grid-area: 1 / 1 / 3 / 5; 
    min-height: 480px; 
} 

/* OCUPA TODO EL ANCHO (100%) */
.bento-destacado { 
    grid-area: 3 / 1 / 5 / 5; 
    min-height: 400px;
    width: 100%;
} 

/* LOS DE ABAJO: MITAD Y MITAD */
.bento-desarrollo { 
    grid-area: 5 / 1 / 7 / 3; 
    min-height: 400px; 
}

.bento-soporte { 
    grid-area: 5 / 3 / 7 / 5; 
    min-height: 400px; 
}

/* Si tienes .bento-metal también */
.bento-metal { 
    grid-area: 6 / 1 / 8 / 3; 
    min-height: 400px; 
}
/* =========================================
   ESTILOS DE LAS TARJETAS (BLOQUES SÓLIDOS)
========================================= */
.bento-item {
    background-color: var(--fx-grey);
    border-radius: 0; /* Sin bordes redondeados */
    display: flex;
    flex-direction: column; 
    position: relative;
    overflow: hidden; 
    padding: 0; 
}

/* Contenedores de imágenes que cubren todo el bloque */
.bento-img-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

/* Filtro oscuro para legibilidad (Overlay) */
.bento-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(18, 20, 22, 0.65); /* Oscurecimiento base */
    transition: background 0.4s ease;
}

.bento-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.8s ease; 
}

/* Hover: Zoom a la imagen y aclara el filtro oscuro */
.bento-item:hover .bento-img-wrapper img {
    transform: scale(1.05); 
}
.bento-item:hover .bento-img-wrapper::after {
    background: rgba(18, 20, 22, 0.45); 
}

/* Contenido de texto superpuesto */
.bento-content {
    position: relative;
    width: 100%;
    z-index: 2; /* Sobre la imagen */
    padding: 60px 40px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    text-align: center;
    height: 100%; 
    color: #ffffff;
}

.bento-item h2, 
.bento-item h3 {
    font-weight: 800;
    margin-bottom: 18px;
    font-size: 2.2rem; 
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}

.bento-item p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 85%;
    color: #e0e0e0;
    font-weight: 300;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* =========================================
   BOTONES TIPO "GHOST" (TRANSPARENTES)
========================================= */
.btn-bento {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    background-color: transparent; /* Fondo transparente */
    color: #ffffff !important;
    border: 1px solid #ffffff; /* Borde blanco rígido */
    border-radius: 0; /* Rectos y corporativos */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1.5px; 
    transition: all 0.3s ease;
    text-transform: uppercase;
    backdrop-filter: blur(2px); /* Un ligero efecto de cristal */
}

.btn-bento:hover {
    background-color: #ffffff;
    color: var(--fx-dark) !important;
}

.btn-danger {
    border-radius: 0;
    background-color: var(--fx-red);
    border: 1px solid var(--fx-red);
    letter-spacing: 1px;
}
.btn-danger:hover {
    background-color: var(--fx-red-dark);
    border-color: var(--fx-red-dark);
}

/* =========================================
   CARRUSEL INFINITO DE CLIENTES (LOGOS)
========================================= */
.clients-section {
    background-color: var(--fx-grey-light);
    /* background-color: #08090A; Un tono un poco más oscuro que el fondo principal para darle profundidad */
    padding: 60px 0;
    color:var(--fx-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden; /* Evita que el carrusel desborde la pantalla */
}

.logo-slider {
    /* background-color: var(--fx-light); */
    filter: drop-shadow(0 4px 6px var(--fx-dark)); /* Sombra sutil para dar profundidad */
    width: 100%;
    height: 100px;
    margin: auto;
    overflow: hidden;
    position: relative;
}

/* Sombras en los bordes para dar efecto de que los logos aparecen y desaparecen suavemente */
.logo-slider::before,
.logo-slider::after {
    content: "";
    position: absolute;
    top: 0;
    width: 250px; /* Ancho de la sombra */
    height: 100px;
    z-index: 2;
}

.logo-slider::before {
    left: 0;
    background: linear-gradient(to right, #08090A 0%, rgba(8, 9, 10, 0) 100%);
}

.logo-slider::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, rgba(246, 247, 248, 0) 100%);
}

/* Contenedor que hace la animación */
.slide-track {
    display: flex;
    width: calc(250px * 12); 
    animation: scrollLogos 35s linear infinite; /* 35 segundos de velocidad, ajusta a tu gusto */
}

/* Pausa el carrusel si el usuario pone el mouse encima */
.slide-track:hover {
    animation-play-state: paused;
}

.slide {
    height: 100px;
    width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Estilo de los logos: Grises por defecto, toman color al hacer hover */
.slide img {
    max-width: 100%;
    max-height: 80px;
    filter: grayscale(40%) opacity(0.5); /* Estilo institucional apagado */
    transition: filter 0.4s ease, transform 0.4s ease;
    padding: 10px;

}

.slide img:hover {
    padding: 5px;
    filter: grayscale(0%) opacity(1); /* Vuelven a su color normal */
    transform: scale(1.15); /* Ligero zoom */
    border-radius: 20%;;
    background-color: var(--fx-grey-light); /* Fondo gris claro al hacer hover para destacar el logo */
}

/* Animación Clave (Keyframes) */
@keyframes scrollLogos {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        /* Debe moverse exactamente la mitad de su tamaño total para hacer el loop perfecto */
        transform: translateX(calc(-250px * 6)); 
    }
}

/* =========================================
   FOOTER INSTITUCIONAL
========================================= */
footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    background-color: var(--fx-dark);
    color: var(--fx-light);
    padding: 30px 20px;
    text-align: center;
}

/* =========================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
========================================= */
@media (max-width: 991px) {
    .parent {
        display: flex;
        flex-direction: column;
    }
    
    .hero-section {
        min-height: auto;
        padding: 60px 15px;
    }

    .bento-item {
        min-height: 380px;
    }
    
    .bento-content {
        padding: 40px 20px;
    }
    
    .bento-item p {
        max-width: 100%;
    }
    
    .bento-item h2, 
    .bento-item h3 {
        font-size: 1.8rem;
    }
    .logo-slider::before,
    .logo-slider::after {
        top: 0;
        width: 50px; /* Ancho de la sombra */
    }
}