/* Хлебные крошки */
.breadcrumb-nav {
    margin: 20px 0;
}

.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    margin: 0 12px;
    font-size: 18px;
}

.breadcrumb-item a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #004499;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
}

/* Заголовок работы */
.work-header {
    margin: 30px 0;
    padding: 30px 0;
    border-bottom: 2px solid #e9ecef;
}

.work-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 20px;
    line-height: 1.2;
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.work-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-weight: 500;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 25px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.work-meta span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.work-meta i {
    color: #0066cc;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    color: white;
}

/* Главное изображение */
.work-main-image {
    margin: 40px auto;
    width: 50%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.work-main-image img {
    width: 100%;
    /* height: 400px; */
    object-fit: fill;
    transition: transform 0.3s ease;
}

.work-main-image:hover img {
    transform: scale(1.02);
}

.work-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.placeholder-icon i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 16px;
}

.work-placeholder p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* Контент работы */
.work-content {
    margin: 50px 0;
}

.work-description h2 {
    color: #212529;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
}

.work-description h2::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border-radius: 2px;
}

.description-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
    text-align: justify;
}

/* Детали проекта */
.work-details {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.work-details h3 {
    color: #212529;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.details-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list strong {
    color: #495057;
    font-weight: 600;
}

.status-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: "Chadwick Cyrillic", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Галерея */
.work-gallery {
    margin: 60px 0;
}

.work-gallery h2 {
    color: #212529;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.work-gallery h2::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border-radius: 2px;
}

.gallery-section {
    margin-bottom: 50px;
}

.gallery-section h3 {
    color: #495057;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

/* Слайдер изображений */
.image-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit:contain;
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    font-size: 1rem;
    font-weight: 500;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.slider-btn i {
    color: #0066cc;
    font-size: 1.2rem;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Заглушка галереи */
.no-gallery {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.no-gallery-icon i {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 20px;
}

.no-gallery h3 {
    color: #6c757d;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.no-gallery p {
    color: #868e96;
    font-size: 1.1rem;
}

/* Похожие проекты */
.related-works {
    margin: 60px 0;
    padding-top: 40px;
    border-top: 2px solid #e9ecef;
}

.related-works h2 {
    color: #212529;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.related-work-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.related-work-image {
    height: 200px;
    overflow: hidden;
}

.related-work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-work-card:hover .related-work-image img {
    transform: scale(1.1);
}

.related-work-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.related-work-placeholder i {
    font-size: 2.5rem;
    color: #adb5bd;
}

.related-work-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-work-content h4 {
    color: #212529;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.related-work-content p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: "Chadwick Cyrillic", sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
    .work-title {
        font-size: 2rem;
    }

    .work-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .btn-back {
        margin-top: 20px;
    }

    /* .work-main-image img, */
    .slide img {
        height: 250px;
    }

    .work-details {
        margin-top: 30px;
        position: static;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .breadcrumb {
        padding: 10px 15px;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 8px;
    }

    

}

@media (max-width: 576px) {
    .work-title {
        font-size: 1.6rem;
    }

    .work-gallery h2 {
        font-size: 1.8rem;
    }

    .gallery-section h3 {
        font-size: 1.3rem;
    }

    /* .work-main-image img, */
    .slide img {
        height: 200px;
    }

    .work-details {
        padding: 20px;
    }

    .description-content {
        font-size: 1rem;
    }

    .no-gallery {
        padding: 40px 15px;
    }

    .no-gallery-icon i {
        font-size: 3rem;
    }

    .work-main-image {
    /* margin: 40px auto; */
    width: 100%;

}
}

/* Современная галерея макетов с адаптивной сеткой и правильными пропорциями */
.unified-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
    grid-auto-flow: dense;
}

/* Специальные классы для разных пропорций изображений */
.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    position: relative;
    transform-origin: center;
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

/* Дополнительные hover-эффекты для превью */
.gallery-item {
    cursor: pointer;
    position: relative;
}

/* Эффект свечения при наведении */
.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 68, 153, 0.05) 100%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Улучшенная анимация для кнопки просмотра */
.gallery-item-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    color: #0066cc;
    font-size: 1.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.7) translateY(20px);
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

/* Эффект волны при клике на кнопку */
.gallery-item-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.gallery-item-btn:active::after {
    width: 100px;
    height: 100px;
}

/* Улучшенный эффект для текстовой подсказки */
.gallery-item-hint {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.gallery-item:hover .gallery-item-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Эффект параллакса для фона при наведении */
.gallery-item-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Дополнительный слой для эффекта глубины */
.gallery-item-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.gallery-item:hover .gallery-item-image::after {
    opacity: 1;
}

/* Улучшенная анимация для изображения */
.gallery-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 1;
    filter: brightness(1.0);
    z-index: 2;
    position: relative;
}

.gallery-item:hover .gallery-item-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* Эффект размытия фона при фокусе на элементе */
.gallery-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

/* Анимация появления элементов галереи */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержка анимации для разных элементов галереи */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }


/* Базовые пропорции для мобильных макетов (вертикальные) - оптимизировано для высоких макетов */
.gallery-item-image {
    aspect-ratio: 9/19.5; /* Стандартное соотношение мобильных устройств */
    min-height: 450px; /* Увеличенная минимальная высота для высоких макетов */
}

/* Альтернативные пропорции для десктопных макетов */
.gallery-item-image.desktop {
    aspect-ratio: 16/10;
    min-height: 280px;
}

/* Альтернативные пропорции для планшетных макетов */
.gallery-item-image.tablet {
    aspect-ratio: 4/3;
    min-height: 320px;
}

/* Специальный класс для очень высоких макетов */
.gallery-item-image.tall {
    aspect-ratio: 9/21; /* Увеличенное соотношение для очень высоких макетов */
    min-height: 550px;
}

/* Улучшенный плейсхолдер для ленивой загрузки - убран чтобы не перекрывать изображения */
.gallery-item-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* Улучшенное оверлейное меню с дополнительной информацией */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 30%,
        rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    backdrop-filter: blur(3px);
    z-index: 2;
    padding: 20px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}


.gallery-item-content {
    padding: 20px;
    background: white;
}

.image-description {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Индикатор загрузки изображения */
.image-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 102, 204, 0.2);
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Стили для больших экранов - улучшенная сетка для высоких макетов */
@media (min-width: 1200px) {
    .unified-gallery {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 35px;
    }
    
    /* Элементы с особым размером для разнообразия сетки */
    .gallery-item:nth-child(3n) .gallery-item-image {
        aspect-ratio: 16/9;
        min-height: 320px;
    }
    
    .gallery-item:nth-child(5n) .gallery-item-image {
        aspect-ratio: 1/1;
        min-height: 360px;
    }
    
    /* Особые элементы для очень высоких макетов */
    .gallery-item:nth-child(7n) .gallery-item-image {
        aspect-ratio: 9/21;
        min-height: 650px;
        grid-row: span 2;
    }
}

/* Стили для средних экранов */
@media (min-width: 992px) and (max-width: 1199px) {
    .unified-gallery {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .gallery-item-image {
        min-height: 400px;
    }
    
    .gallery-item-image.tall {
        min-height: 500px;
    }
}

/* Модальное окно для просмотра изображений */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-info {
    background: white;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-size: 1.5rem;
    z-index: 1001;
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0066cc;
    font-size: 1.2rem;
    z-index: 1001;
}

.modal-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Адаптивность для галереи - оптимизация для мобильных устройств */
@media (max-width: 768px) {
    .unified-gallery {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 18px;
    }
    
    .gallery-item-image {
        min-height: 320px; /* Увеличенная высота для мобильных макетов */
    }
    
    .gallery-item-image.tall {
        min-height: 420px;
    }
    
    .gallery-item-image.desktop {
        min-height: 200px;
    }
    
    .gallery-item-image.tablet {
        min-height: 240px;
    }
    
    .modal-close {
        top: 10px;
        right: 20px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
    
    /* Уменьшаем размер кнопок оверлея для мобильных */
    .gallery-item-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .gallery-item-hint {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .unified-gallery {
        grid-template-columns: 1fr; /* Одна колонка для очень маленьких экранов */
        gap: 15px;
    }
    
    .gallery-item-image {
        min-height: 280px; /* Оптимальная высота для мобильных */
        aspect-ratio: 9/19.5; /* Стандартное соотношение мобильных устройств */
    }
    
    .gallery-item-image.tall {
        min-height: 380px;
        aspect-ratio: 9/21; /* Очень высокие макеты */
    }
    
    .gallery-item-image.desktop {
        min-height: 180px;
        aspect-ratio: 16/10;
    }
    
    .gallery-item-image.tablet {
        min-height: 220px;
        aspect-ratio: 4/3;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
    }
    
    /* Дополнительная оптимизация для мобильных */
    .gallery-item:hover {
        transform: translateY(-8px) scale(1.01); /* Уменьшенный эффект для мобильных */
    }
    
    .gallery-item-content {
        padding: 15px;
    }
    
    .image-description {
        font-size: 0.9rem;
    }
}

/* Дополнительные медиа-запросы для очень больших экранов */
@media (min-width: 1400px) {
    .unified-gallery {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 40px;
    }
    
    .gallery-item-image {
        min-height: 500px;
    }
    
    .gallery-item-image.tall {
        min-height: 650px;
    }
    
    .gallery-item:nth-child(7n) .gallery-item-image {
        min-height: 700px;
    }
}

/* Дополнительные улучшения для галереи */
/* Фильтры категорий галереи */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.filter-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    outline: none;
}

.filter-btn:hover {
    border-color: #0066cc;
    color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border-color: #0066cc;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* Счетчик изображений в галерее */
.gallery-counter {
    text-align: center;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

.gallery-counter span {
    color: #0066cc;
    font-weight: 700;
}

/* Сортировка галереи */
.gallery-sort {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    gap: 10px;
    align-items: center;
}

.gallery-sort label {
    color: #495057;
    font-weight: 500;
}

.gallery-sort select {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.gallery-sort select:hover {
    border-color: #0066cc;
}

.gallery-sort select:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Индикатор загрузки галереи */
.gallery-loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.gallery-loading.active {
    display: block;
}

.gallery-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 102, 204, 0.2);
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.gallery-loading-text {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
}

/* Пагинация галереи */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.pagination-btn:hover {
    border-color: #0066cc;
    color: #0066cc;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border-color: #0066cc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    transform: none;
    border-color: #e9ecef;
    color: #495057;
}

/* Адаптивность для дополнительных элементов галереи */
@media (max-width: 768px) {
    .gallery-filters {
        padding: 15px;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .gallery-sort {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .gallery-pagination {
        gap: 8px;
    }
    
    .pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .gallery-filters {
        padding: 12px;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .gallery-sort {
        flex-direction: column;
        gap: 8px;
    }
    
    .gallery-sort select {
        width: 100%;
    }
    
    .pagination-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* Дополнительные эффекты для галереи */
/* Эффект появления элементов при прокрутке */
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Эффект для пустой галереи */
.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
    margin: 40px 0;
}

.empty-gallery-icon {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 20px;
}

.empty-gallery h3 {
    color: #6c757d;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.empty-gallery p {
    color: #868e96;
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Кнопка "Загрузить еще" */
.load-more-btn {
    display: block;
    margin: 40px auto 0;
    padding: 12px 30px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    outline: none;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Индикатор прогресса загрузки */
.progress-indicator {
    height: 3px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
    display: none;
}

.progress-indicator.active {
    display: block;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #004499);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Миниатюры в модальном окне */
.modal-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.modal-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.modal-thumbnail:hover {
    border-color: #0066cc;
    transform: scale(1.05);
}

.modal-thumbnail.active {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Горячие клавиши для навигации */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.keyboard-hint.visible {
    opacity: 1;
}

/* Адаптивность для дополнительных элементов */
@media (max-width: 768px) {
    .empty-gallery {
        padding: 60px 15px;
    }
    
    .empty-gallery-icon {
        font-size: 3rem;
    }
    
    .empty-gallery h3 {
        font-size: 1.3rem;
    }
    
    .empty-gallery p {
        font-size: 1rem;
    }
    
    .modal-thumbnails {
        gap: 8px;
    }
    
    .modal-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .keyboard-hint {
        bottom: 10px;
        left: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .load-more-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .modal-thumbnails {
        gap: 6px;
    }
    
    .modal-thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .keyboard-hint {
        display: none;
    }
}

/* Стили для модального окна просмотра макетов по ширине экрана */
.mockup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.mockup-modal.active {
    opacity: 1;
    visibility: visible;
}

.mockup-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mockup-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-size: 1.5rem;
    z-index: 2001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mockup-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.mockup-modal-navigation {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 2001;
}

.mockup-modal-nav {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0066cc;
    font-size: 1.5rem;
    pointer-events: all;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mockup-modal-nav:hover {
    background: white;
    transform: scale(1.1);
}

.mockup-modal-prev {
    margin-right: auto;
}

.mockup-modal-next {
    margin-left: auto;
}

.mockup-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mockup-modal-image-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.mockup-modal-image-container::-webkit-scrollbar {
    width: 8px;
}

.mockup-modal-image-container::-webkit-scrollbar-track {
    background: transparent;
}

.mockup-modal-image-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.mockup-modal-image-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mockup-modal-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.mockup-modal-info {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-modal-description {
    color: white;
    font-size: 1rem;
    line-height: 1.5;
    flex: 1;
    margin-right: 20px;
}

.mockup-modal-counter {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    min-width: 80px;
    text-align: center;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .mockup-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .mockup-modal-navigation {
        padding: 0 15px;
    }
    
    .mockup-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .mockup-modal-image-container {
        padding: 50px 15px 15px;
    }
    
    .mockup-modal-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mockup-modal-description {
        margin-right: 0;
        font-size: 0.9rem;
    }
    
    .mockup-modal-counter {
        align-self: flex-end;
        font-size: 1rem;
        padding: 6px 12px;
        min-width: 70px;
    }
}

@media (max-width: 576px) {
    .mockup-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .mockup-modal-navigation {
        padding: 0 10px;
    }
    
    .mockup-modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .mockup-modal-image-container {
        padding: 40px 10px 10px;
    }
    
    .mockup-modal-description {
        font-size: 0.85rem;
    }
    
    .mockup-modal-counter {
        font-size: 0.9rem;
        padding: 5px 10px;
        min-width: 60px;
    }
}

/* Индикатор прокрутки для модального окна */
.mockup-modal-scroll-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2002;
}

.mockup-modal-scroll-indicator.visible {
    opacity: 1;
}

/* Анимация появления модального окна */
@keyframes mockupModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mockup-modal.active .mockup-modal-container {
    animation: mockupModalFadeIn 0.3s ease forwards;
}

/* Поддержка жестов на мобильных устройствах */
.mockup-modal.touch-active {
    touch-action: pan-y;
}

.mockup-modal.swiping {
    touch-action: none;
}

/* Улучшение доступности */
.mockup-modal:focus {
    outline: none;
}

.mockup-modal-close:focus,
.mockup-modal-nav:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Оптимизация для высоких экранов */
@media (min-height: 1200px) {
    .mockup-modal-image-container {
        padding: 80px 20px 20px;
    }
}

/* Дополнительные стили для улучшенной галереи */
.mockup-modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mockup-modal-loading.visible {
    opacity: 1;
}

.mockup-modal-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.mockup-modal-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.mockup-modal-error.visible {
    opacity: 1;
}

/* Улучшенные стили для подсказок по горячим клавишам */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2002;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.keyboard-hint.visible {
    opacity: 1;
}

.keyboard-hint div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keyboard-hint div:last-child {
    margin-bottom: 0;
}

.keyboard-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 0 2px;
}

/* Улучшенные анимации для модального окна */
.mockup-modal {
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.mockup-modal.loaded .mockup-modal-container {
    animation: mockupModalFadeIn 0.5s ease forwards;
}

@keyframes mockupModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Улучшения для мобильных устройств */
@media (max-width: 768px) {
    .keyboard-hint {
        bottom: 10px;
        left: 10px;
        right: 10px;
        font-size: 0.75rem;
        padding: 10px;
    }
    
    .keyboard-hint div {
        margin-bottom: 3px;
    }
    
    .mockup-modal-loading .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}

@media (max-width: 576px) {
    .keyboard-hint {
        display: none;
    }
}

/* Стили для ленивой загрузки изображений в галерее */
.gallery-item-image img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item-image img.loaded {
    opacity: 1;
}

/* Индикатор загрузки для изображений в галерее */
.gallery-item-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

/* Улучшенные эффекты для навигационных кнопок */
.mockup-modal-nav {
    transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0.8;
}

.mockup-modal-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.mockup-modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* Эффекты для состояния свайпа */
.mockup-modal.swiping .mockup-modal-image {
    transition: transform 0.1s ease;
}

.mockup-modal.pinching .mockup-modal-image {
    transition: transform 0.1s ease;
}

/* Индикатор прогресса для галереи */
.gallery-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-progress.visible {
    opacity: 1;
}

.gallery-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #004499);
    width: 0%;
    transition: width 0.3s ease;
}

/* Стили для полноэкранного режима */
.mockup-modal:fullscreen {
    background: rgba(0, 0, 0, 0.98);
}

.mockup-modal:fullscreen .mockup-modal-image-container {
    padding: 20px;
}

.mockup-modal:fullscreen .mockup-modal-close {
    top: 20px;
    right: 20px;
}

/* Улучшения для доступности */
.mockup-modal-nav:focus,
.mockup-modal-close:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Анимация для появления изображений */
@keyframes imageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mockup-modal-image {
    animation: imageFadeIn 0.4s ease;
}

/* Оптимизация для высоких изображений */
.mockup-modal-image.tall {
    max-width: none;
    width: auto;
    max-height: none;
}

/* Индикатор масштабирования */
.zoom-indicator {
    position: fixed;
    top: 20px;
    right: 80px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2002;
}

.zoom-indicator.visible {
    opacity: 1;
}
