.reference-categories {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.reference-badge {
    padding: 7px 14px 7px 14px;
    cursor: pointer;
    user-select: none;
}

.reference-badge:hover {
    transition: 0.3s ease all;
    background-color: #FD5D14;
    color: white;
}

.ref-active {
    background-color: #FD5D14;
    color: white;
}

#reference-grid {
    width: 100%;
}

.reference-grid-wrapper {
    display: flex;
    justify-content: center;
}

.muuri {
    margin: 0 auto;
    position: relative;
}

.item {
    display: block;
    width: auto;
    height: auto;
    margin: 5px;
    z-index: 1;
}

/* KLÍČOVÉ: definuj šířku sloupce */
.grid-sizer,
.item { width: 300px; }         /* -> 300px sloupce */
.item { margin: 6px; }

.item-content {
    position: relative;
    width: 100%;
    height: 100%;
    display:table;
    cursor: pointer;
}

.item-content .info-overlay{
    background-color: transparent;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: calc(100%);
    transition: .3s ease background-color;
    color: white;
}

.grid {
    margin: 0 auto; position: relative;
}

.grid img { width: 100%; height: auto; display: block; }

.info-text-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-transform: uppercase;
    font-size: 14px;
    font-family: Poppins, sans-serif;
    font-weight: 600;
    opacity: 0;
    transition: .3s ease opacity;
}

.item-content .info-overlay:hover{
    background-color: rgba(0, 0, 0, 0.5);
}

.item-content .info-overlay:hover .info-text-wrapper{
    opacity: 1;
}