.nmso-grid {
    display: grid;
    width: 100%;
    /* Kolumny i gap są ustawiane przez PHP */
}

.nmso-item {
    position: relative;
    overflow: hidden; /* Kluczowe: wszystko co wychodzi poza kafel, znika */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    display: block; /* Dla tagu <a> */
    text-decoration: none;
}

/* Nakładka */
.nmso-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    /* Domyślnie schowana gdzieś daleko, JS ustawi ją na start */
    transform: translate(-100%, -100%); 
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    
    /* Płynność ruchu */
    transition: transform 0.3s ease-out;
    pointer-events: none; /* Myszka ma widzieć rodzica, nie overlay */
}

.nmso-content {
    max-width: 100%;
}

.nmso-title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 700;
}

.nmso-desc {
    font-size: 1em;
    line-height: 1.4;
}