        .gallery-container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 15px;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            aspect-ratio: 1 / 1;
            border: 5px solid #fff;
            background-color: #fff;
        }

        .gallery-item:hover {
            transform: scale(1.03);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            cursor: pointer;
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: opacity 0.3s ease;
        }

        .gallery-item:hover img {
            opacity: 0.9;
        }

        /* Modal - poprawiona wersja */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.9);
            overflow: auto;
            animation: fadeIn 0.3s;
            touch-action: pan-y;
        }

        .modal-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100%;
            padding: 20px;
            box-sizing: border-box;
        }

        .modal-img-container {
            position: relative;
            max-width: 100%;
            margin-top: 40px; /* miejsce na przycisk zamknięcia */
        }

        .modal-img {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            display: block;
        }

        .close {
            position: fixed;
            top: 20px;
            right: 30px;
            color: #fff;
            font-size: 40px;
            font-weight: bold;
            transition: 0.3s;
            z-index: 1001;
            background: rgba(0,0,0,0.5);
            width: 50px;
            height: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
        }

        .close:hover {
            color: #ccc;
            cursor: pointer;
            background: rgba(0,0,0,0.8);
        }

        .caption {
            color: #fff;
            font-size: 18px;
            padding: 15px;
            text-align: center;
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
        }

        @keyframes fadeIn {
            from {opacity: 0;}
            to {opacity: 1;}
        }

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

        @media (max-width: 768px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .close {
                right: 15px;
                top: 15px;
                font-size: 30px;
                width: 40px;
                height: 40px;
            }
            
            .modal-img {
                max-height: 60vh;
            }
        }

        @media (max-width: 480px) {
            .gallery-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            
            .gallery-item {
                border-width: 3px;
            }
            
            .caption {
                font-size: 16px;
                padding: 10px;
            }
        }
@media (max-width: 768px) {
    .post td {
        display: block; /* Stack kolumn na mobile */
        width: 100% !important;
    }
    .post tr {
        margin-bottom: 15px;
    }
}