.project-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.project-header {
    margin-bottom: 0rem;
    text-align: left;
}

/* Carousel стили */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 0 2rem 0;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.carousel-slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide picture {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Кнопка полноэкранного режима */
.carousel-fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-5px);
}

.carousel-slide:hover .carousel-fullscreen-btn {
    opacity: 1;
    transform: translateY(0);
}

.carousel-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.carousel-fullscreen-btn svg {
    width: 22px;
    height: 22px;
    color: #333;
}

/* Кнопки навигации carousel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.carousel-btn-prev {
    left: 20px;
}

.carousel-btn-next {
    right: 20px;
}

/* Индикаторы */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(180, 180, 180, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 12px;
    height: 12px;
}

/* Описание под каруселью */
.carousel-description {
    max-width: 1200px;
    margin: -1rem auto 2rem;
    padding: 0 1rem;
    text-align: center;
    color: #444;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 30px;
    transition: opacity 0.3s ease;
}

.carousel-description:empty {
    display: none;
}

/* Полноэкранный режим */
.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.fullscreen-gallery.active {
    display: flex;
}

.fullscreen-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Описание в полноэкранном режиме */
.fullscreen-description {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fullscreen-description:empty {
    display: none;
}

/* Скрытие описания при наведении на изображение */
.fullscreen-content:hover .fullscreen-description {
    opacity: 0;
    pointer-events: none;
}

/* Кнопка закрытия */
.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-close svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

/* Кнопки навигации в полноэкранном режиме */
.fullscreen-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-btn svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.fullscreen-btn-prev {
    left: 30px;
}

.fullscreen-btn-next {
    right: 30px;
}

/* Счетчик изображений */
.fullscreen-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10000;
}

.project-description-full {
    max-width: 800px;
    margin: 0 auto;
}

.project-description-full .description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.project-back-link {
    text-align: center;
    margin: 3rem 0 2rem;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: #333;
    text-decoration: none;
    border: 2px solid #333;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-back:hover {
    background: #333;
    color: #fff;
}

.project-details {
    display: grid;
    grid-template-columns: 125px auto;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 100;
    padding-bottom: 2rem;
}

.project-details-title {
    color: #AAA;
    padding-right: 0.5rem;
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
    }

    .carousel-wrapper {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-btn-prev {
        left: 10px;
    }
    
    .carousel-btn-next {
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    /* Кнопка полноэкранного режима всегда видима на мобильных */
    .carousel-fullscreen-btn {
        opacity: 1;
        transform: translateY(0);
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }
    
    .carousel-fullscreen-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .fullscreen-btn {
        width: 48px;
        height: 48px;
    }
    
    .fullscreen-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .fullscreen-btn-prev {
        left: 10px;
    }
    
    .fullscreen-btn-next {
        right: 10px;
    }
    
    .fullscreen-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .fullscreen-close svg {
        width: 24px;
        height: 24px;
    }
    
    .fullscreen-counter {
        bottom: 20px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .fullscreen-description {
        bottom: 60px;
        max-width: 90%;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    
    .carousel-description {
        font-size: 0.9rem;
        margin: -0.5rem auto 1.5rem;
    }
    
    .project-description-full {
        margin: 1rem auto;
    }
    
    .project-description-full .description {
        font-size: 1rem;
    }
}

