.wrap-categories-home {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container-categories-home {
    display: flex;
    justify-content: center;
    height: 400px;
    margin-bottom: 30px;
    gap: 2px;
}

.container-categories-home a {
    text-decoration: none;
}

/* Sombra difuminada para el texto */
.card-categories-home::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px; /* Altura del difuminado */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Permite hacer clic a través de la sombra */
    z-index: 1; /* Se asegura de estar encima de la imagen de fondo */
    border-bottom-left-radius: 2rem; /* Mantener bordes redondeados */
    border-bottom-right-radius: 2rem;
}

.card-categories-home.is-active::after {
    opacity: 1;
    /* Un pequeño retraso (delay) para que aparezca justo cuando la tarjeta se está abriendo */
    transition-delay: 0.2s; 
}

/* CARD */
.card-categories-home {
    height: 100%;
    position: relative;
    width: 88px;
    margin: 0 10px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    transition: width .6s cubic-bezier(.28, -0.03, 0, .99);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8);
}

.card-categories-home.is-active {
    width: 1100px;
}

/* ROW */
/* ROW */
.row-categories-home {
    display: flex;
    color: #fff;
    position: relative; /* Necesario para el z-index */
    z-index: 2; /* Para que el texto quede ENCIMA de la sombra negra */
}

/* ICON */
.icon-categories-home {
    background: #98ad8a;
    color: #fff;
    font-size: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

/* DESCRIPTION */
.description-categories-home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 520px;
    height: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all .3s ease;
}

.card-categories-home.is-active .description-categories-home {
    opacity: 1;
    transform: translateY(0);
}

/* TITLE */
.title-card-categories-home {
    font-size: 20px;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

/* MOBILE */
@media (max-width: 768px) {
    .wrap-categories-home {
        height: auto;
        padding-inline: 4px;
        padding-bottom: 30px;
    }

    .container-categories-home {
        height: auto;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        margin-block: 0px !important;
    }

    .card-categories-home {
        width: 100%;
        height: 50px;
        margin: 0;
        transition: height .4s ease;
        background-position: center;
    }

    .card-categories-home > .row-categories-home {
        height: 66px;
    }

    .card-categories-home.is-active {
        width: 100% !important;
        height: 200px !important;
    }

    .row-categories-home {
        align-items: center;
        padding-top: 20px !important;
    }

    .description-categories-home {
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        opacity: 1;
        transform: none;
    }

    .title-card-categories-home {
        font-size: 18px;
    }

    .icon-categories-home {
        width: 36px;
        height: 36px;
        margin: 12px;
        font-size: 14px;
    }
}
