    
 /* --- НОВЫЕ СТИЛИ ДЛЯ СЕТКИ 2х2 (ПРЯМОУГОЛЬНИКИ) --- */
        .galleryblock {
            flex: 1;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px; /* Расстояние между картинками */
            /* Убрали grid-template-rows и min-height, чтобы сетка подстраивалась под высоту блоков */
            align-content: center; /* Центрируем сетку по вертикали, если левая панель выше */
            width: 80%;
            justify-content: center;
            margin: 0 auto;
          }

        .galleryblock {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 25px; /* Немного увеличил отступ, чтобы подписи не сливались */
        }

        .grid-item {
            display: flex;
            flex-direction: column;
            /* Убрал фиксированную высоту у всего блока, чтобы подпись не обрезалась */
        }

        /* Контейнер для картинки и оверлея */
        .image-wrapper {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            background-color: #e0e0e0;
            height: 200px; /* Высота прямоугольников */
            cursor: pointer;
        }

        .image-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.3s ease;
        }

         /* Оверлей с оранжевым фоном и текстом */
        .grid-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(243, 156, 18, 0.95);
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 10px;
            text-align: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .grid-overlay p {
            color: #fff;
            font-size: 14px;
            font-weight: bold;
            text-transform: uppercase;
            line-height: 1.3;
        }

        .image-wrapper:hover img {
            transform: scale(1.1);
        }

        .image-wrapper:hover .grid-overlay {
            opacity: 1;
        }

        /* --- БЛОК С ПОДПИСЬЮ ПОД КАРТИНКОЙ --- */
        .caption {
            margin-top: 10px;
            text-align: center;
            padding: 0 5px;
        }

        .caption h3 {
            font-size: 18px !impotant;
            color: #333;
            font-weight: 700;
            text-transform: uppercase;
            line-height: 1.3;
        }  
/* Адаптивность */
        @media (max-width: 768px) {
            .galleryblock {
                flex-direction: column;
            }
         .galleryblock {
                grid-template-columns: 1fr; /* Одна колонка на маленьких экранах */
            }

            .grid-item {
                height: 200px; /* Можно уменьшить высоту для мобильных */
            }
        .grid-overlay p {
            color: #fff;
            font-size: 10px;
            line-height: 1.2;
        }       
        }        