.category-widget-container {
    display: flex;
    flex-wrap: wrap;
}

.category-widget {
    position: relative;
    text-align: center;
    width: 100%; /* Por defecto, ocupa el 100% del ancho */
    border-radius: 9px;
    text-decoration: none;
}

.category-widget img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 9px !important;
}

.category-widget h2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 9px !important;
    padding: 10px;
    font-size: 1.5em;
    font-weight: bold;
}

/* Consultas de medios para pantallas pequeñas */
@media (max-width: 767px) {
    .category-widget-container {
        gap:15px;
    }
    .category-widget {
        width: 100%; /* Una columna en dispositivos móviles */
    }
}

/* Consultas de medios para pantallas medianas */
@media (min-width: 768px) and (max-width: 1023px) {
    .category-widget-container {
        gap:25px;
    }
    .category-widget {
        width: 48%; /* Dos columnas en tabletas */
    }
}

/* Consultas de medios para pantallas grandes */
@media (min-width: 1024px) {
    .category-widget-container {
        gap:28px;
    }
    .category-widget {
        width: 30%; /* Tres columnas en escritorio */
    }
    .category-widget img {
        width: 450px;
        height: 450px;
    }
}
