/* 详情弹窗样式 */

/* ===== 弹窗遮罩 ===== */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    overflow: hidden;
}

.modal-content > * {
    pointer-events: auto;
}

.modal-images-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
    padding-top: 50px;
}

.modal-images-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.modal-images-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ===== 关闭按钮 ===== */
.modal-close {
    position: absolute;
    top: 50px;
    right: calc(50% - 400px);
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: transform 0.3s ease;
    z-index: 100;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-image-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.modal-image-item img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.modal-image-item:hover img {
    transform: scale(1.02);
}

/* ===== 底部提示 ===== */
.modal-footer {
    padding: 20px 0;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    text-align: left;
}

.footer-line {
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
}

.footer-title {
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    margin: 0 0 0 15px;
    font-family: 'SweiSpring', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    padding-left: 0;
}

.relevant-label {
    font-size: 0.55rem;
    color: white;
    margin: 0 0 0 15px;
    letter-spacing: 2px;
    font-family: 'SweiSpring', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    padding-left: 0;
}

/* ===== 相关案例轮播 ===== */
.related-cases-carousel {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 40px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carousel-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    padding: 0;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.carousel-arrow span {
    line-height: 1;
    display: block;
}

.related-cases-wrapper {
    flex: 1;
    overflow: hidden;
}

.related-cases-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.related-cases-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.related-case-item {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.related-case-item:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-5px);
}

.related-case-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-case-item:hover img {
    transform: scale(1.1);
}

/* ===== 响应式设计 ===== */

/* 平板设备 */
@media (max-width: 1024px) {
    .modal-images-list {
        padding: 0 30px 20px;
    }
    
    .footer-content {
        padding: 0 30px;
    }
    
    .modal-close {
        right: calc(50% - 400px);
    }
    
    .footer-line {
        left: 30px;
    }
    
    .related-cases-carousel {
        padding: 0 30px;
    }
    
    .related-case-item {
        width: 180px;
        height: 135px;
    }
}

/* 移动设备 */
@media (max-width: 768px) {
    .modal-images-list {
        padding: 0 20px 20px;
    }
    
    .footer-content {
        padding: 0 20px;
    }
    
    .modal-close {
        right: calc(50% - 400px);
        font-size: 2rem;
        width: 30px;
        height: 30px;
    }
    
    .footer-line {
        left: 20px;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .relevant-label {
        font-size: 0.7rem;
    }
    
    .related-cases-carousel {
        padding: 0 20px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .related-case-item {
        width: 160px;
        height: 120px;
    }
}

/* 小屏幕移动设备 */
@media (max-width: 480px) {
    .modal-images-list {
        padding: 0 15px 20px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .modal-close {
        right: calc(50% - 400px);
    }
    
    .footer-line {
        left: 15px;
    }
    
    .footer-title {
        font-size: 0.9rem;
    }
    
    .relevant-label {
        font-size: 0.65rem;
    }
    
    .related-cases-carousel {
        padding: 0 15px;
        gap: 10px;
    }
    
    .carousel-arrow {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    .related-case-item {
        width: 140px;
        height: 105px;
    }
}
