.page-title {
            text-align: center;
            font-size: 2rem;
            font-weight: 600;
            margin-bottom: 2rem;
            letter-spacing: -0.01em;
            background: linear-gradient(135deg, #1e293b, #3b82f6);
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
        }

        /* Сетка галереи (карточки итемов) */
        .items-grid {
            display: grid;
            gap: 1.8rem;
            grid-template-columns: 1fr;
        }

        /* Адаптивные колонки */
        @media (min-width: 525px) {
            .items-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 768px) {
            .items-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1024px) {
            .items-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (min-width: 1366px) {
            .items-grid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        /* Карточка элемента */
        .item-card {
            background: white;
            border-radius: 1rem;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.03);
            transition: transform 0.25s ease, box-shadow 0.3s ease;
            cursor: pointer;
            display: flex;
            flex-direction: column;
        }

        .item-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.2);
        }

        /* Область превью фото - фиксированный контейнер для любых пропорций */
        .item-photo {
            width: 100%;
            aspect-ratio: 4 / 3;
            background: #eef2ff;
            overflow: hidden;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .item-photo img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Изображение полностью заполняет контейнер, обрезаясь при необходимости */
            transition: transform 0.4s ease;
            display: block;
        }

        /* Альтернативный вариант: если нужно показать всё изображение без обрезки */
        /* .item-photo img {
            width: 100%;
            height: auto;
            object-fit: contain;
        } */

        .item-card:hover .item-photo img {
            transform: scale(1.03);
        }

        /* Подпись / надпись */
        .item-caption {
            padding: 1.2rem 1rem 1.3rem;
            text-align: center;
            font-weight: 600;
            font-size: 1.2rem;
            background: white;
            border-top: 1px solid #eef2ff;
            color: #0f172a;
            letter-spacing: -0.2px;
        }

        /* ========= МОДАЛЬНОЕ ОКНО ========= */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.88);
            backdrop-filter: blur(8px);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .modal.active {
            display: flex;
            opacity: 1;
        }

        .modal-content {
            background: #ffffff;
            border-radius: 2rem;
            max-width: 95vw;
            max-height: 90vh;
            width: 1000px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
            animation: modalZoom 0.2s ease-out;
        }

        @keyframes modalZoom {
            from {
                transform: scale(0.96);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        /* Шапка модалки */
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            background: #ffffff;
            border-bottom: 1px solid #e9eef3;
        }

        .modal-header h3 {
            font-size: 1.3rem;
            font-weight: 600;
            color: #0f172a;
            margin: 0;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 2rem;
            line-height: 1;
            cursor: pointer;
            color: #5b6e8c;
            transition: color 0.2s;
            padding: 0 0.3rem;
        }

        .close-modal:hover {
            color: #ef4444;
        }

        /* ГАЛЕРЕЯ внутри модального окна */
        .modal-gallery {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #f8fafc;
            padding: 1.2rem;
        }

        /* Контейнер основного изображения - адаптивный для любых пропорций */
        .main-slide {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #0f172a;
            border-radius: 1.2rem;
            overflow: hidden;
            min-height: 300px;
            width: 100%;
            /* Высота будет динамической, но с ограничением */
            max-height: 55vh;
        }

        .main-slide img {
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: cover; /* Показываем всё изображение целиком, сохраняя пропорции */
            display: block;
            background: #0f172a;
        }

        /* Кнопки навигации */
        .nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            border: none;
            width: 42px;
            height: 42px;
            border-radius: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: white;
            font-size: 1.5rem;
            font-weight: bold;
            transition: background 0.2s;
            z-index: 12;
        }

        .nav-btn:hover {
            background: rgba(0, 0, 0, 0.85);
        }

        .prev-btn {
            left: 12px;
        }

        .next-btn {
            right: 12px;
        }

        /* Миниатюры */
        .thumbnails {
            display: flex;
            gap: 0.7rem;
            margin-top: 1rem;
            overflow-x: auto;
            padding: 0.5rem 0.2rem 0.8rem;
            scrollbar-width: thin;
            flex-wrap: nowrap;
            justify-content: center;
        }

        .thumb {
            width: 70px;
            height: 70px;
            object-fit: cover; /* Миниатюры единого размера, обрезаем для аккуратности */
            border-radius: 0.8rem;
            cursor: pointer;
            opacity: 0.65;
            transition: all 0.2s;
            border: 2px solid transparent;
            flex-shrink: 0;
            background: #e2e8f0;
        }

        .thumb.active-thumb {
            opacity: 1;
            border-color: #3b82f6;
            transform: scale(1.02);
            box-shadow: 0 4px 10px rgba(59,130,246,0.3);
        }

        .thumb:hover {
            opacity: 1;
            transform: scale(1.02);
        }

        /* Счетчик фото */
        .photo-counter {
            text-align: center;
            font-size: 0.85rem;
            color: #475569;
            margin-top: 0.8rem;
            font-weight: 500;
        }

        /* Адаптация модалки на маленьких экранах */
        @media (max-width: 600px) {
            .modal-content {
                max-width: 98vw;
                max-height: 92vh;
                border-radius: 1.2rem;
            }
            .thumb {
                width: 55px;
                height: 55px;
            }
            .nav-btn {
                width: 36px;
                height: 36px;
                font-size: 1.4rem;
            }
            .modal-header h3 {
                font-size: 1rem;
            }
            .items-grid {
                gap: 1.2rem;
            }
            .main-slide {
                max-height: 45vh;
            }
            .main-slide img {
                max-height: 45vh;
            }
        }

        @media (max-width: 524px) {
            .items-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Стили для скролла миниатюр */
        .thumbnails::-webkit-scrollbar {
            height: 4px;
        }
        .thumbnails::-webkit-scrollbar-track {
            background: #e2e8f0;
            border-radius: 4px;
        }
        .thumbnails::-webkit-scrollbar-thumb {
            background: #94a3b8;
            border-radius: 4px;
        }

        /* Индикатор загрузки изображения */
        .image-loading {
            position: relative;
        }
        
        .image-loading::before {
            content: "📷";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 2rem;
            color: #94a3b8;
        }