        .gallery {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            max-width: 1060px;
            width: 100%;
            padding: 10px;
            justify-content: center;
        }

        .gallery .thumbnail {
            position: relative;
            width: 100%;
            aspect-ratio: 1/1;
            overflow: hidden;
        }

        .gallery img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            cursor: pointer;
            opacity: 0;
            animation: fadeIn 0.5s ease-in forwards;
        }

        /* Styl dla opisu */
        .thumbnail .caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.7);
            color: #000;
            padding: 5px 10px;
           /* font-size: 14px; opisy miniaturek */
            text-align: center;
            opacity: 0;
            transform: translateY(100%);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        /* Pokazywanie opisu po najechaniu na urządzeniach z myszką */
        @media (pointer: fine) {
            .thumbnail:hover .caption {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Stałe pokazywanie opisu na urządzeniach bez myszki (mobilnych) */
        @media (pointer: coarse) {
            .thumbnail .caption {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Animacja pojawiania się miniaturek */
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* Responsywność */
        @media (max-width: 768px) {
            .gallery {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 480px) {
            .gallery {
                grid-template-columns: 1fr;
            }
        }

        /* Styl dla powiększonego obrazu */
        .fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999999;
            opacity: 0;
            animation: fadeInOverlay 0.3s ease-in forwards;
        }

        .fullscreen img {
            max-width: 95%;
            max-height: 95%;
            object-fit: contain;
            transform: scale(0.8);
            animation: zoomIn 0.3s ease-out forwards;
            cursor: pointer;
        }

        /* Animacje dla powiększonego obrazu */
        @keyframes fadeInOverlay {
            to { opacity: 1; }
        }

        @keyframes zoomIn {
            to { transform: scale(1); }
        }

