        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f8f9fa;
            line-height: 1.5;
            overflow-x: hidden;
        }

        .portfolio-section {
            padding: 80px 0;
            background: #ffffff;
            position: relative;
            overflow: hidden;
        }

        .portfolio-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
            position: relative;
            z-index: 2;
        }

        .portfolio-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .portfolio-title {
            font-size: 48px;
            font-weight: 700;
            color: #1a1a1a;
            margin-bottom: 20px;
        }

        .portfolio-subtitle {
            font-size: 20px;
            color: #6b7280;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Основной контейнер для движущихся рядов */
        .portfolio-grid {
            height: 660px;
            position: relative;
            border-radius: 20px;
            overflow: hidden;
            background: #f8f9fa;
        }

        /* Ряды изображений */
        .images-row {
            display: flex;
            position: absolute;
            height: 300px;
            align-items: center;
            gap: 30px;
            width: max-content;
        }

        /* Первый ряд */
        .images-row:nth-child(1) {
            top: 60px;
            animation: slideLeft 60s linear infinite;
            /* Начинаем не с края, а заполняем экран */
            transform: translateX(0);
        }

        /* Второй ряд */
        .images-row:nth-child(2) {
            top: 360px;
            animation: slideRight 60s linear infinite;
            /* Начинаем не с края, а заполняем экран */
            transform: translateX(-50%);
        }

        /* Анимации для бесконечной прокрутки */
        @keyframes slideLeft {
            0% {
                transform: translateX(0);
            }
            100% {
                transform: translateX(-50%);
            }
        }

        @keyframes slideRight {
            0% {
                transform: translateX(-50%);
            }
            100% {
                transform: translateX(0);
            }
        }

        /* Изображения */
        .work-image-container {
            position: relative;
            width: 400px;
            height: 280px;
            flex-shrink: 0;
            cursor: pointer;
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.3s ease;
            border: 3px solid transparent;
        }

        .work-image-container:hover {
            transform: scale(1.05);
            border-color: #a8024e;
        }

        .work-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Название проекта поверх изображения */
        .project-title {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(0,0,0,0.8);
            color: white;
            padding: 16px 20px;
            font-size: 18px;
            font-weight: 600;
            transform: translateY(100%);
            transition: transform 0.3s ease;
        }

        .work-image-container:hover .project-title {
            transform: translateY(0);
        }

        /* Попап для изображений */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .popup-overlay.active {
            display: flex;
            opacity: 1;
        }

        .popup-content {
            position: relative;
            width: 800px;
            height: 500px;
            transform: scale(0.8);
            transition: transform 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .popup-overlay.active .popup-content {
            transform: scale(1);
        }

        .popup-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 12px;
        }

        .popup-close {
            position: absolute;
            top: -60px;
            right: -10px;
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            font-size: 28px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .popup-close:hover {
            background: rgba(255,255,255,0.4);
            transform: scale(1.1);
        }

        /* Название проекта в попапе */
        .popup-title {
            position: absolute;
            bottom: -70px;
            left: 50%;
            transform: translateX(-50%);
            color: white;
            font-size: 24px;
            font-weight: 600;
            text-align: center;
            background: rgba(0,0,0,0.8);
            padding: 15px 25px;
            border-radius: 8px;
            white-space: nowrap;
        }

        /* Пауза анимации при открытом попапе */
        body.popup-open .images-row {
            animation-play-state: paused;
        }

        /* Пауза анимации при наведении */
        .images-row:hover {
            animation-play-state: paused;
        }

        /* Мобильная адаптация */
        @media (max-width: 768px) {
            .portfolio-section {
                padding: 50px 0;
            }

            .portfolio-container {
                padding: 0 16px;
            }

            .portfolio-title {
                font-size: 32px;
                margin-bottom: 16px;
            }

            .portfolio-subtitle {
                font-size: 18px;
            }

            .portfolio-header {
                margin-bottom: 40px;
            }

            .portfolio-grid {
                height: 420px;
            }

            .images-row {
                height: 200px;
                gap: 20px;
            }

            .work-image-container {
                width: 280px;
                height: 180px;
            }

            .images-row:nth-child(1) { top: 40px; }
            .images-row:nth-child(2) { top: 240px; }

            .project-title {
                font-size: 16px;
                padding: 12px 16px;
            }

            .popup-content {
                width: 90vw;
                height: 50vh;
            }

            .popup-close {
                top: -50px;
                right: 0;
                width: 45px;
                height: 45px;
                font-size: 24px;
            }

            .popup-title {
                font-size: 18px;
                bottom: -60px;
                padding: 10px 15px;
            }
        }

        @media (max-width: 480px) {
            .portfolio-grid {
                height: 320px;
            }

            .images-row {
                height: 150px;
                gap: 15px;
            }

            .work-image-container {
                width: 200px;
                height: 130px;
            }

            .images-row:nth-child(1) { top: 30px; }
            .images-row:nth-child(2) { top: 180px; }

            .portfolio-title {
                font-size: 28px;
            }

            .portfolio-subtitle {
                font-size: 16px;
            }

            .project-title {
                font-size: 14px;
                padding: 10px 12px;
            }

            .popup-content {
                width: 95vw;
                height: 45vh;
            }

            .popup-close {
                top: -50px;
                right: 0;
                width: 40px;
                height: 40px;
                font-size: 20px;
            }

            .popup-title {
                font-size: 16px;
                bottom: -50px;
                padding: 8px 12px;
            }
        }
