/**
 * 博物馆网上展厅首页增强样式
 * 基于UI设计规则 - 主色调 #783c7e (紫色系)
 * 体现中国传统文化元素与现代设计美学
 */

/* ==================== 全局增强 ==================== */
.index-content {
    background: linear-gradient(135deg, #f9f5f0 0%, #faf6f1 100%);
    position: relative;
    min-height: 100vh;
}

/* 传统纹样背景装饰 */
.index-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(120, 60, 126, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 轮播图增强 ==================== */
.index-slider {
    position: relative;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(120, 60, 126, 0.15);
}

.index-slider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
    z-index: 1;
}

.index-slider-item {
    position: relative;
    display: block;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.index-slider-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(120, 60, 126, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.index-slider-item:hover::before {
    opacity: 1;
}

.index-slider-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.index-slider-item:hover img {
    transform: scale(1.05);
}

/* 轮播分页器美化 */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #783c7e;
    border-color: #783c7e;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(120, 60, 126, 0.5);
}

/* ==================== 大标题增强 ==================== */
.big-title {
    font-size: 36px;
    font-weight: 600;
    color: #2c1810;
    text-align: center;
    margin: 50px 0 35px;
    position: relative;
    font-family: "STKaiti", "KaiTi", "Ma Shan Zheng", "Microsoft YaHei", serif;
    letter-spacing: 6px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(120, 60, 126, 0.2);
    /* 删除可能导致模糊的渐变文字效果 */
    animation: titleGlow 3s ease-in-out infinite alternate;
    /* 确保标题始终可见 */
    opacity: 1 !important;
    visibility: visible !important;
}

/* 为了兼容性，保持传统颜色切换 */
.big-title:hover {
    color: #783c7e;
    transition: color 0.3s ease;
}

/* 标题发光动画 */
@keyframes titleGlow {
    0% {
        text-shadow: 2px 2px 4px rgba(120, 60, 126, 0.2),
                     0 0 15px rgba(120, 60, 126, 0.1);
        color: #2c1810;
    }
    100% {
        text-shadow: 3px 3px 6px rgba(120, 60, 126, 0.3),
                     0 0 25px rgba(212, 175, 55, 0.2);
        color: #783c7e;
    }
}

/* 传统印章风格装饰 */
.big-title::before {
    content: '◆ ◇';
    position: absolute;
    left: -60px;
    top: 50%;
    font-size: 20px;
    color: #d4af37;
    transform: translateY(-50%);
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(212, 175, 55, 0.3);
    animation: decorationPulse 2s ease-in-out infinite alternate;
}

.big-title::after {
    content: '◇ ◆';
    position: absolute;
    right: -60px;
    top: 50%;
    font-size: 20px;
    color: #d4af37;
    transform: translateY(-50%);
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(212, 175, 55, 0.3);
    animation: decorationPulse 2s ease-in-out infinite alternate;
}

/* 装饰动画 */
@keyframes decorationPulse {
    0% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.1); }
}

/* 底部传统边框装饰 - 使用独立的元素 */
.big-title .title-border {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37 20%, #783c7e 50%, #d4af37 80%, transparent);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* 特殊标题样式 - 常设展览 */
.big-title.permanent-exhibition .title-icon {
    position: absolute;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    filter: sepia(100%) hue-rotate(25deg) saturate(1.5);
}

.big-title.permanent-exhibition .title-icon::before {
    content: '📚';
}

/* 特殊标题样式 - 专题展览 */
.big-title.special-exhibition .title-icon {
    position: absolute;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    filter: sepia(100%) hue-rotate(25deg) saturate(1.5);
}

.big-title.special-exhibition .title-icon::before {
    content: '🎨';
}

/* 标题动画增强 */
.big-title .title-text {
    display: inline-block;
    position: relative;
    color: inherit;
}

/* 确保标题始终可见，即使动画失败 */
.big-title:not(.title-initialized) {
    opacity: 1;
    visibility: visible;
}

.big-title.title-complete {
    animation: titleComplete 0.8s ease forwards;
}

@keyframes titleComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        text-shadow: 3px 3px 6px rgba(120, 60, 126, 0.3),
                     0 0 40px rgba(212, 175, 55, 0.2);
    }
}

/* 响应式标题 */
@media (max-width: 768px) {
    .big-title {
        font-size: 28px;
        letter-spacing: 3px;
        margin: 35px 0 25px;
    }
    
    .big-title::before {
        left: -45px;
        font-size: 16px;
        content: '◆';
    }
    
    .big-title::after {
        right: -45px;
        font-size: 16px;
        content: '◆';
    }
    
    .big-title .title-border {
        bottom: -12px;
        width: 80px;
    }
    
    .big-title .title-icon {
        left: -80px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .big-title {
        font-size: 24px;
        letter-spacing: 2px;
        margin: 30px 0 20px;
    }
    
    .big-title::before,
    .big-title::after {
        display: none;
    }
    
    .big-title .title-icon {
        display: none;
    }
    
    .traditional-pattern {
        font-size: 16px;
    }
}

/* ==================== 作品卡片增强 - 精致博物馆风格 ==================== */
.pano-list {
    position: relative;
    z-index: 1;
}

.pano-list .pano-item {
    background: #ffffff;
    border-radius: 20px;  /* 更圆润的边角 */
    box-shadow: 
        0 4px 20px rgba(120, 60, 126, 0.08),
        0 2px 10px rgba(212, 175, 55, 0.05);  /* 双层阴影效果 */
    border: 1px solid rgba(120, 60, 126, 0.05);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

/* 卡片悬停效果增强 */
.pano-list .pano-item:hover {
    transform: translateY(-12px) scale(1.02);  /* 轻微放大 */
    box-shadow: 
        0 20px 60px rgba(120, 60, 126, 0.15),
        0 8px 30px rgba(212, 175, 55, 0.1);
    border-color: rgba(120, 60, 126, 0.15);
}

/* 传统装饰边框 - 中国风 */
.pano-list .pano-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #783c7e 0%, #d4af37 25%, #783c7e 50%, #d4af37 75%, #783c7e 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.pano-list .pano-item:hover::before {
    opacity: 1;
}

/* 金色装饰线条 */
.pano-list .pano-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37 20%, #d4af37 80%, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.pano-list .pano-item:hover::after {
    opacity: 0.6;
}

/* 图片容器增强 - 博物馆风格 */
.pano-list .pano-item-img {
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    height: 200px;  /* 固定高度保持一致性 */
}

.pano-list .pano-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(1.05) contrast(1.1);  /* 提升图片质感 */
}

.pano-list .pano-item:hover .pano-item-img img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.15);
}

/* 图片上的渐变遮罩 */
.pano-list .pano-item-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        transparent 0%, 
        rgba(120, 60, 126, 0.1) 50%,
        rgba(212, 175, 55, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.pano-list .pano-item:hover .pano-item-img::after {
    opacity: 1;
}

/* 图片装饰边框 */
.pano-list .pano-item-img::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.pano-list .pano-item:hover .pano-item-img::before {
    opacity: 1;
}

/* 作品信息区域 */
.pano-list .pano-item-info {
    background: #ffffff;
    border-radius: 0 0 20px 20px;
    position: relative;
}

/* 标题样式调整 */
.pano-list .pano-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    transition: color 0.3s ease;
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;  /* 占据剩余空间 */
    min-height: auto;
    width: auto;  /* 移除固定宽度限制 */
    height: auto;  /* 移除固定高度限制 */
    overflow: hidden;  /* 隐藏超出部分 */
    white-space: nowrap;  /* 不换行 */
    text-overflow: ellipsis;  /* 超出部分显示省略号 */
    min-width: 0;  /* 允许flex项目收缩 */
}

.pano-list .pano-item:hover .pano-item-title {
    color: #783c7e;
}

/* 确保标题容器有足够空间 */
.pano-list .pano-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;  /* 垂直居中对齐 */
    padding: 16px 20px;
    gap: 12px;
}

/* 浏览量样式 - 与标题同行显示 */
.pano-list .pano-item-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(120, 60, 126, 0.04);
    border-radius: 12px;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;  /* 不缩放 */
    border: 1px solid rgba(120, 60, 126, 0.06);
    white-space: nowrap;  /* 不换行 */
}

.pano-list .pano-item:hover .pano-item-views {
    color: #783c7e;
    background: rgba(120, 60, 126, 0.08);
    border-color: rgba(120, 60, 126, 0.12);
    /* 不使用transform，避免任何位移动效 */
}

.pano-list .pano-item-views i {
    font-size: 10px;
    color: #ccc;
    transition: color 0.3s ease;
}

.pano-list .pano-item:hover .pano-item-views i {
    color: #d4af37;
}

.pano-list .pano-item-views span {
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    font-variant-numeric: tabular-nums;  /* 数字对齐 */
}

.pano-list .pano-item:hover .pano-item-views span {
    opacity: 1;
}

/* 移除旧的meta样式 */
.pano-list .pano-item-meta {
    display: none;
}

/* 移除旧的收藏按钮和点赞样式 */
.pano-list .pano-item-collect {
    display: none;
}

.pano-list .pano-item-label {
    display: none;
}

.pano-list .pano-item-thumbs-up {
    display: none;
}

/* ==================== 容器优化 ==================== */
.container {
    position: relative;
    z-index: 1;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 卡片进入动画 */
.pano-list .pano-item {
    animation: fadeInUp 0.6s ease forwards;
}

.pano-list .pano-item:nth-child(1) { animation-delay: 0.1s; }
.pano-list .pano-item:nth-child(2) { animation-delay: 0.2s; }
.pano-list .pano-item:nth-child(3) { animation-delay: 0.3s; }
.pano-list .pano-item:nth-child(4) { animation-delay: 0.4s; }
.pano-list .pano-item:nth-child(5) { animation-delay: 0.5s; }
.pano-list .pano-item:nth-child(6) { animation-delay: 0.6s; }

/* 标题进入动画 */
.big-title {
    animation: fadeInScale 0.8s ease forwards;
}

/* ==================== 特殊效果 ==================== */
/* 传统云纹装饰 - 极小化空间占用 */
.big-title .section-decoration {
    position: absolute;
    text-align: center;
    margin: 0;
    height: 10px;
    line-height: 10px;
    padding: 0;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
}

/* 新的装饰边框样式，与.title-border相似且对称 */
.big-title .section-decoration .section-border {
    display: inline-block;
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37 20%, #783c7e 50%, #d4af37 80%, transparent);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.8s ease;
}

.big-title .section-decoration .border-animate {
    opacity: 0.8;
    transform: scaleX(1);
}

@media (max-width: 1200px) {
    .big-title {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .index-slider-item img {
        height: 400px;
    }
    
    .big-title {
        font-size: 24px;
        margin: 30px 0 20px;  /* 平板端间距调整 */
    }
    
    .big-title .section-decoration {
        width: 80px;
        bottom: -12px;
    }
    
    .big-title .section-decoration .section-border {
        width: 80px;
        height: 3px;
    }
    
    /* 卡片样式调整 */
    .pano-list .pano-item {
        margin-bottom: 25px;
        border-radius: 16px;
    }
    
    .pano-list .pano-item-img {
        height: 180px;
        border-radius: 16px 16px 0 0;
    }
    
    .pano-list .pano-item-header {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .pano-list .pano-item-title {
        font-size: 15px;
    }
    
    .pano-list .pano-item-views {
        font-size: 10px;
        padding: 1px 5px;
    }
}

@media (max-width: 768px) {
    .index-slider-item img {
        height: 300px;
    }
    
    .pano-list .pano-item {
        margin: 15px 0;
        border-radius: 14px;
    }
    
    .pano-list .pano-item-img {
        height: 160px;
        border-radius: 14px 14px 0 0;
    }
    
    .pano-list .pano-item-header {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .pano-list .pano-item-title {
        font-size: 14px;
    }
    
    .pano-list .pano-item-views {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .big-title::before,
    .big-title::after {
        display: none;
    }
    
    .big-title .section-decoration {
        width: 80px;
        bottom: -12px;
    }
    
    .big-title .section-decoration .section-border {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .index-slider-item img {
        height: 250px;
    }
    
    .big-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .pano-list .pano-item {
        margin: 12px 0;
        border-radius: 12px;
    }
    
    .pano-list .pano-item-img {
        height: 140px;
        border-radius: 12px 12px 0 0;
    }
    
    .pano-list .pano-item-header {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .pano-list .pano-item-title {
        font-size: 13px;
    }
    
    .pano-list .pano-item-views {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .big-title .section-decoration {
        width: 80px;
        bottom: -12px;
    }
    
    .big-title .section-decoration .section-border {
        width: 80px;
    }
}

/* 针对超小屏幕设备的额外优化 */
@media (max-width: 360px) {
    .pano-list .pano-item-title {
        font-size: 12px;
    }
    
    .pano-list .pano-item-views {
        font-size: 7px;
        padding: 0px 2px;
    }
    
    .pano-list .pano-item-header {
        padding: 8px 10px;
        gap: 4px;
    }
}

/* ==================== 可访问性增强 ==================== */
.pano-list .pano-item:focus {
    outline: 2px solid #783c7e;
    outline-offset: 2px;
}

.index-slider-item:focus {
    outline: 2px solid #783c7e;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .pano-list .pano-item {
        border-width: 2px;
        border-color: #783c7e;
    }
    
    .big-title {
        color: #000;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .pano-list .pano-item,
    .big-title,
    .index-slider-item,
    .index-slider-item img {
        animation: none;
        transition: none;
    }
}