.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; width: 100%; }

.gallery-item { display: block; width: 100%; min-height: 300px; padding: 40px 30px; position: relative; overflow: hidden; border: 1px solid var(--border-color); background-color: #0a0a0a; transition: all 0.4s ease; display: flex; align-items: center; justify-content: center; }
.gallery-item:hover { transform: translateY(-10px); border-color: var(--accent-color); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8); }

/* --- OPRAVENÝ TEXT UVNITŘ ČTVERCŮ --- */
.gallery-item .image-placeholder, .gallery-item img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: #111; 
    
    /* Vystředění, barva a zalomení textu */
    color: #ffffff; 
    text-align: center; 
    text-decoration: none; 
    padding: 20px; 
    line-height: 1.4;
    font-size: 1.1rem;
    
    font-weight: 600; 
    object-fit: cover; 
    transition: all 0.5s ease; 
    filter: brightness(0.7) grayscale(0.5); 
}

.gallery-item:hover .image-placeholder, .gallery-item:hover img { filter: brightness(1) grayscale(0); transform: scale(1.05); }

/* --- RESPONSIVITA --- */
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { 
    .gallery-grid { grid-template-columns: 1fr; gap: 20px; } 
    .gallery-item { min-height: 250px; } /* Na mobilu trochu nižší */
}