/* 往届活动页面样式 */

.previous-events-page {
    background: url('../images/activity_detail/bg-other.png') center top no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
}

/* 导航栏 */
.previous-events-page .header {
    background: #5D81FC;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.previous-events-page .header.scrolled {
    background: rgba(60, 60, 60, 0.85);
    backdrop-filter: blur(10px);
}

/* 时间轴区域 */
.timeline-section {
    padding: 50px 0 80px;
}

.timeline-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    margin-bottom: 40px;
}

/* 年份筛选按钮 */
.year-filters {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 0 40px;
}

.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #5B7FFF;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #4A6FEE;
}

.year-filters {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 0 40px;
}

.year-filter-btn {
    padding: 12px 35px;
    background: #FFFFFF;
    color: #666666;
    border: 2px solid #DDDDDD;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-filter-btn:hover {
    border-color: #5B7FFF;
    color: #5B7FFF;
}

.year-filter-btn.active {
    background: #5B7FFF;
    color: #FFFFFF;
    border-color: #5B7FFF;
    box-shadow: 0 4px 12px rgba(91, 127, 255, 0.3);
}

/* ========== PC端时间线样式 ========== */
.timeline-desktop {
    display: block;
}

.timeline-mobile {
    display: none;
}

/* 时间线主体 */
.timeline-main {
    position: relative;
    height: 600px;
    margin-bottom: 80px;
    min-width: 2800px;
    width: 2800px;
}

/* 水平时间线 */
.timeline-line {
    position: absolute;
    top: 300px;
    left: 0;
    width: 125%;
    height: 3px;
    background: #5B7FFF;
    z-index: 1;
}

/* 年份标记 */
.year-marker {
    position: absolute;
    top: 285px;
    transform: translateX(-50%);
    z-index: 3;
}

.year-badge {
    padding: 10px 35px;
    background: #5B7FFF;
    color: #FFFFFF;
    font-size: 22px;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(91, 127, 255, 0.3);
}
.event-item {
    position: absolute;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.img-dialog{
    width: 1400px;
    max-width: 90%;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}
.img-dialog .con{
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 50%;
    padding: 40px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #fff;
    background: linear-gradient(0deg, 
  #000000 0%, 
  #00000090 10%, 
  #00000060 30%, 
  #00000030 60%, 
  #00000000 100%
);
}
.img-dialog .modal-title{
    
  font-family: 'YouSheFont';
  font-size: 48px;
  margin-bottom: 20px;
}
.img-dialog .modal-desc{
    font-size: 20px;
}
#modalImage{
    aspect-ratio: 1400/700;
    width: 100%;
}
/* 上方活动 */
.event-item.event-top {
    top: 0;
    height: 300px;
}
.content{
    display: none;
}
.event-item.event-top .event-content {
    order: 1;
    margin-bottom: 0;
}

.event-item.event-top .event-line {
    order: 2;
    flex: 1;
}

/* 下方活动 */
.event-item.event-bottom {
    top: 300px;
    height: 300px;
}

.event-item.event-bottom .event-line {
    order: 1;
    flex: 1;
}

.event-item.event-bottom .event-content {
    order: 2;
    margin-top: 0;
}

/* 连接线 */
.event-line {
    width: 3px;
    background: #5B7FFF;
}

/* 活动内容 */
.event-content {
    text-align: center;
    width: 231px;
}

/* 上方活动内容顺序：月份 -> 图片 -> 标题 */
.event-item.event-top .event-month {
    order: 1;
    margin-bottom: 8px;
}

.event-item.event-top .event-content img {
    order: 2;
}

.event-item.event-top .event-title {
    order: 3;
    margin-top: 8px;
}

/* 下方活动内容顺序：标题 -> 图片 -> 月份 */
.event-item.event-bottom .event-title {
    order: 1;
    margin-bottom: 8px;
}

.event-item.event-bottom .event-content img {
    order: 2;
}

.event-item.event-bottom .event-month {
    order: 3;
    margin-top: 8px;
}

.event-content {
    display: flex;
    flex-direction: column;
}

.event-content img {
    width: 231px;
    height: 162px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-content img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.event-month {
    font-size: 15px;
    color: #666666;
}

.event-title {
    font-size: 14px;
    color: #333333;
    font-weight: 500;
    line-height: 1.4;
}

/* 活动项目 */
.timeline-mobile {
    display: none;
}

.mobile-year-group {
    margin-bottom: 30px;
}

.mobile-year-title {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    background: #5B7FFF;
    padding: 8px 30px;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(91, 127, 255, 0.3);
}

.mobile-event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-event-item img {
    width: 120px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-event-month {
    font-size: 14px;
    font-weight: 600;
    color: #5B7FFF;
    min-width: 40px;
    flex-shrink: 0;
}

.mobile-event-title {
    font-size: 15px;
    color: #333333;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

/* ========== 响应式布局 ========== */
@media (max-width: 1400px) {
    .event-content {
        width: 180px;
    }
}

@media (max-width: 1200px) {
    .event-content {
        width: 160px;
    }
}

/* 移动端：隐藏PC端时间轴，显示移动端列表 */
@media (max-width: 1024px) {
    .timeline-section {
        padding: 40px 0 40px;
    }

    .timeline-container {
        padding: 0 20px;
    }

    /* 隐藏PC端时间轴 */
    .timeline-desktop {
        display: none;
    }

    /* 显示移动端列表 */
    .timeline-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .img-dialog{
        overflow: visible;
        
    }
    .img-dialog .con{
        background: initial;
        min-height: unset;
        position: relative;
        padding: 10px 0;
    }
    .img-dialog .modal-title{
        font-size: 16px;
        margin-bottom: 10px;
    }
    .img-dialog .modal-desc{
        font-size: 14px;
    }
    .modal-controls{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        
        bottom: 20px;
        gap: 10px;
        justify-content: center;
    }
    .mobile-event-item img {
        width: 100px;
        height: 70px;
    }
    
    .mobile-event-item {
        padding: 12px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .mobile-event-month {
        font-size: 13px;
        min-width: 35px;
    }
    
    .mobile-event-title {
        font-size: 14px;
    }
    
    .mobile-year-title {
        font-size: 20px;
        padding: 6px 25px;
    }

    .year-filters {
        flex-wrap: wrap;
        gap: 15px;
    }

    .year-filter-btn {
        font-size: 16px;
        padding: 10px 25px;
    }
}

@media (max-width: 480px) {
    .mobile-event-item img {
        width: 80px;
        height: 56px;
    }
    
    .mobile-event-item {
        padding: 10px;
        gap: 10px;
    }
    
    .mobile-event-month {
        font-size: 12px;
        min-width: 30px;
    }
    
    .mobile-event-title {
        font-size: 13px;
    }
    
    .mobile-year-title {
        font-size: 18px;
        padding: 6px 20px;
    }
}

/* 图片放大模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.image-modal.active {
    display: block;
}

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

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 100px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 48px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 48px;
    height: 48px;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-content img {
    object-fit: cover;
    border-radius: 8px;
}

.modal-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
}

.modal-btn {
    padding: 12px 35px;
    background: #5B7FFF;
    color: #FFFFFF;
    border: none;
    border-radius: 40px;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.modal-btn:hover {
    background: #4A6FEE;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 127, 255, 0.4);
}

.modal-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 40px 10px 80px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 36px;
        width: 36px;
        height: 36px;
    }


    .modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
