/* 增强版书画作品展示样式 */
/* Enhanced Gallery Styles for Chinese Painting Website */

.enhanced-gallery-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.enhanced-gallery-wrapper {
    position: relative;
    width: 100%;
}

/* 控制按钮区域 */
.gallery-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.gallery-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.gallery-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.gallery-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 主画廊区域 */
.gallery-main {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

/* 导航按钮 */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #d1ab43;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    z-index: 10;
    font-size: 14px;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

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

.gallery-nav-btn i {
    font-size: 14px;
    color: #d1ab43;
}

.gallery-images-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    opacity: 1;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 主圖點擊區域 */
.image-click-area {
    position: absolute;
    top: 10%;
    left: 15%;
    right: 15%;
    bottom: 10%;
    cursor: pointer;
    z-index: 5;
    background: transparent;
}

.image-click-area:hover {
    background: rgba(255, 255, 255, 0.05);
}

.image-container.dragging {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

.image-container:active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.image-container:hover .gallery-image {
    transform: scale(1.05);
}

/* 浮水印 */
.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 600;
    pointer-events: none;
    z-index: 5;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Lightbox浮水印样式 */
.lightbox-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

/* Lightbox放大鏡样式 */
.lightbox-magnifier {
    position: fixed;
    width: 200px;
    height: 200px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-repeat: no-repeat;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    pointer-events: none;
    display: none;
}

/* 放大镜效果 */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.magnifier-lens {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-size: 300% 300%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 6;
    pointer-events: none;
    cursor: none !important;
}

/* 作品信息面板 */
.gallery-info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 40px 30px 30px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.enhanced-gallery-container:hover .gallery-info-panel {
    transform: translateY(0);
}

.artwork-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #fff;
}

.artwork-size {
    font-size: 16px;
    color: #ccc;
    margin: 0 0 12px 0;
}

.artwork-description {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    margin: 0;
}

/* 缩略图区域 */
.gallery-thumbnails {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #f8f9fa;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.thumbnail {
    flex: 0 0 80px;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.thumbnail.active {
    border-color: #007bff;
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 圆点导航 */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: #999;
    transform: scale(1.2);
}

.dot.active {
    background: #007bff;
    transform: scale(1.3);
}

/* 灯箱样式 */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    backdrop-filter: blur(10px);
}

/* 書畫作品區域間距調整 */
#section-687d0ba8ead84 .page_header_style {
    padding-top: 30px !important;
    padding-bottom: 20px !important;
}

#section-687d0ba8ead84 .container.aos-init {
    padding-top: 10px !important;
    padding-bottom: 20px !important;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.lightbox-info {
    padding: 24px;
    background: white;
}

.lightbox-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.lightbox-size {
    font-size: 18px;
    color: #666;
    margin: 0 0 16px 0;
}

.lightbox-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* 防止页面滚动 */
body.lightbox-open {
    overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .enhanced-gallery-container {
        margin: 0;
        border-radius: 0;
    }
    
    .gallery-main {
        height: 400px;
    }
    
    .gallery-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .gallery-btn {
        width: 36px;
        height: 36px;
    }
    
    .gallery-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .gallery-info-panel {
        padding: 20px 20px 20px;
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.8);
    }
    
    .artwork-title {
        font-size: 20px;
    }
    
    .artwork-size {
        font-size: 14px;
    }
    
    .artwork-description {
        font-size: 13px;
    }
    
    .gallery-thumbnails {
        padding: 15px;
        gap: 8px;
    }
    
    .thumbnail {
        flex: 0 0 60px;
        width: 60px;
        height: 45px;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
    
    .lightbox-info {
        padding: 20px;
    }
    
    .lightbox-title {
        font-size: 22px;
    }
    
    .lightbox-size {
        font-size: 16px;
    }
    
    .lightbox-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-main {
        height: 300px;
    }
    
    .gallery-thumbnails {
        padding: 10px;
    }
    
    .thumbnail {
        flex: 0 0 50px;
        width: 50px;
        height: 38px;
    }
    
    .watermark {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.enhanced-gallery-container {
    animation: fadeInUp 0.6s ease-out;
}

.gallery-controls .gallery-btn {
    animation: slideInRight 0.6s ease-out;
}

.gallery-controls .gallery-btn:nth-child(2) {
    animation-delay: 0.1s;
}

.gallery-controls .gallery-btn:nth-child(3) {
    animation-delay: 0.2s;
}

/* 加载状态 */
.gallery-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.gallery-image[src] {
    background: none;
    animation: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 中国风装饰元素 */
.enhanced-gallery-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #b8860b, #d4af37);
    z-index: 1;
}

.enhanced-gallery-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37, #b8860b, #d4af37);
    z-index: 1;
}

/* 优化滚动条样式 */
.gallery-thumbnails {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #b8860b;
}