﻿/* 重置和基础样式 */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 顶部横幅 */
.hero-banner {
    width: 100%;
    height: 600px;
    background-image: url(../images/map-line/map-line_1_1.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 主容器 */
.main-container {
    width: 100%;
    padding: 0 20px;
}

.container-box {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

/* 事件区域 */
.events-section {
    flex: 1;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 搜索栏 */
.search-bar {
    display: flex;
    border: 1px solid #BFBFBF;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 30px;
    height: 60px;
}

.search-label {
    background-color: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
    font-size: 19px;
    font-weight: 500;
    white-space: nowrap;
}

.search-input {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-field {
    width: 100%;
    border: none;
    outline: none;
    font-size: 18px;
    color: #333333;
    background: transparent;
}

.search-field::placeholder {
    color: #999;
}

/* 区域标题 */
.section-title {
    font-size: 26px;
    font-weight: bold;
    margin: 0 0 30px 0;
    color: #333;
}

/* 事件列表 */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 事件卡片 */
.event-card {
    background-image: url(../images/map-line/map-line_9_93.jpg);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 20px;
    color: white;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.event-card:nth-child(1) {
    background-image: url(../images/map-line/map-line_9_9.jpg);
}
.event-card:nth-child(2) {
    background-image: url(../images/map-line/map-line_9_91.jpg);
}
.event-card:nth-child(3) {
    background-image: url(../images/map-line/map-line_9_92.jpg);
}
.event-card:nth-child(4) {
    background-image: url(../images/map-line/map-line_9_93.jpg);
}



.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 事件头部 */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.event-title {
    font-size: 22px;
    font-weight: normal;
    margin: 0;
    color: #ffffff;
    flex: 1;
    min-width: 200px;
    word-wrap: break-word;
    word-break: break-word;
}

.event-expand {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-expand img {
    display: block;
}

/* 事件主体 */
.event-body {
    display: flex;
    gap: 20px;
    flex: 1;
}

/* 状态区域 */
.event-status {
    width: 194px;
    height: 127px;
    background-image: url(../images/map-line/map-line_18_18.jpg);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-shrink: 0;
}

.status-badge {
    background-color: #FF0000;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 10px 0;
    font-size: 16px;
    font-weight: 500;
    display: inline-block;
}

/* 事件详情 */
.event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-label {
    font-size: 16px;
    color: #ffffff;
    min-width: 80px;
    flex-shrink: 0;
}

.detail-value {
    font-size: 16px;
    color: #ffffff;
    flex: 1;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

/* 事件底部 */
.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 15px;
    flex-wrap: wrap;
}

.event-stats {
    flex: 1;
    min-width: 200px;
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.participants-count {
    font-size: 14px;
    color: #ffffff;
}

.deadline-info {
    font-size: 16px;
    color: #ffffff;
}

.event-action {
    flex-shrink: 0;
}

.register-btn {
    background-color: #9AFF00;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    min-width: 140px;
}

.register-btn:hover {
    background-color: #8ae600;
    transform: translateY(-1px);
}

/* 显示更多按钮 */
.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.show-more-btn {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background-color: #333;
    transform: translateY(-1px);
}

/* 地图区域 */
.map-section {
    width: 332px;
    flex-shrink: 0;
    margin-top: 80px;
}

.map-container {
    width: 100%;
    height: 559px;
    background-image: url(../images/map-line/map-line_40_40.jpg);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container-box {
        max-width: 100%;
        padding: 20px;
    }
    
    .map-section {
        width: 300px;
    }
    
    .map-container {
        height: 400px;
    }
}

@media (max-width: 992px) {
    .container-box {
        flex-direction: column;
        gap: 30px;
    }
    
    .map-section {
        width: 100%;
        order: -1; /* 在移动端将地图移到顶部 */
    }
    
    .map-container {
        height: 300px;
    }
    
    .hero-banner {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 15px;
    }
    
    .container-box {
        padding: 20px 0;
    }
    
    .search-bar {
        height: auto;
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-label {
        padding: 15px 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .search-input {
        padding: 15px 20px;
        border-radius: 0 0 15px 15px;
    }
    
    .event-card {
        padding: 15px;
        min-height: auto;
    }
    
    .event-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .event-status {
        width: 100%;
        height: auto;
        min-height: 80px;
        align-items: center;
        justify-content: center;
    }
    
    .event-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .event-stats {
        min-width: auto;
    }
    
    .register-btn {
        width: 100%;
    }
    
    .hero-banner {
        height: 250px;
    }
    
    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-title {
        font-size: 18px;
        min-width: auto;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .hero-banner {
        height: 200px;
    }
}

/* 文本换行优化 */
.detail-value,
.event-title,
.participants-count,
.deadline-info {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* 确保图片响应式 */
img {
    max-width: 100%;
    height: auto;
}

/* 打印样式 */
@media print {
    .hero-banner {
        height: 200px;
    }
    
    .show-more-btn,
    .register-btn,
    .event-expand {
        display: none;
    }
}

/* 提高可访问性 */
button:focus,
input:focus {
    outline: 2px solid #9AFF00;
    outline-offset: 2px;
}

/* 动画过渡 */
.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}