@import url('../css/navbar.css');

.container {
    width: 100%;
    margin: auto;
    display: flex;
    padding-top: 3%;  
}
.seccion {
    width: 21%;
    aspect-ratio: 1 / 1;
    display: grid;
    margin: auto;
    background-color: #00476e;
    border-radius: 15px;
    justify-items: center;
    box-shadow: 10px 5px 5px rgb(63, 63, 63);
    position: relative;
    align-items: center;
}
.seccion h3 {
    color: white;
}

.seccion .empresas img{
    height: 100%;
    width: auto;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
}

.seccion .empresas ul{
    visibility: hidden;
    position: absolute;
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: 2;
    width: 100%;
    top: 10%;
    right: 0;
    overflow-y: auto;
    max-height: 75%;
    list-style: none;
}

.seccion:hover {
    background-color: rgb(0, 0, 0);
    transition: 0.6s;
}
.seccion:hover .empresas img{
    opacity: 0.1;
}
.seccion:hover .empresas ul img {
    display: flex;
    position: relative;
    opacity: 1;
    width: 40%;
    margin: auto;
    margin-bottom: 20px;
    top: 20px;   
}
.seccion:hover .empresas ul{
    visibility: visible;
    color: white;
    opacity: 1;
}
/* Personalización del scroll en WebKit */
.seccion .empresas ul::-webkit-scrollbar {
    width: 8px; /* Ancho del scroll */
}

.seccion .empresas ul::-webkit-scrollbar-thumb {
    background-color: #444546; /* Color de la parte "pulgar" del scroll */
    border-radius: 4px; 
}

.seccion .empresas ul::-webkit-scrollbar-track {
    background: rgb(27, 27, 27); /* Fondo de la pista del scroll */
    border-radius: 4px;
}


@media (max-width: 800px) {
    .container {
        display: flex;
        flex-direction: column;
    }
    .seccion {
        width: 70%;
        z-index: 1;
        margin-bottom: 5%;
    }
    .seccion.active {
        background-color: rgb(0, 0, 0);
        transition: 0.4s;
    }

    .seccion.active .empresas img{
        opacity: 0.2;
    }
    .seccion.active .empresas ul{
        visibility: visible;
        color: white;
        opacity: 1;
    }
    .seccion.active .empresas ul img {
        display: flex;
        position: relative;
        opacity: 1;
        width: 40%;
        margin: auto;
        margin-bottom: 20px;
        top: 20px;   
    }
}


@media (min-width: 801px) and (max-width: 1300px) {
    .container {
        display: flex;
        flex-direction: column;
    }
    .seccion {
        width: 70%;
        margin-bottom: 5%;
    }
    .seccion h3 {
        padding-bottom: 3%;
    }
    .seccion .empresas img {
        width: 160%;
    }
    .seccion.active {
        background-color: rgb(0, 0, 0);
        transition: 0.4s;
    }

    .seccion.active .empresas img{
        opacity: 0.2;
    }
    .seccion.active .empresas ul{
        visibility: visible;
        color: white;
        opacity: 1;
    }
}
