/**
 * 历届活动展示页 - 专用样式
 * 使用 BEM 命名规范
 */

/* ==================== 1. 页面头部区域 ==================== */
.events-header {
  margin-bottom: 40px;
  text-align: center;
}

.events-header__title {
  font-size: 36px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 12px;
}

.events-header__title span {
  font-size: 20px;
  font-weight: normal;
  color: #888;
  margin-left: 12px;
}

.events-header__subtitle {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

/* ==================== 2. 工具条（筛选）==================== */
.events-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 50px;
}

.events-toolbar__filter-btn {
  padding: 10px 24px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background-color: #fff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.events-toolbar__filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.events-toolbar__filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ==================== 3. 时间轴 ==================== */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

/* 中间的时间线 */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-color), #ffb6c1);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline__empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

/* 时间轴项目 */
.timeline__item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
}

/* 左侧项目 */
.timeline__item--left {
  left: 0;
  padding-right: 60px;
  text-align: right;
}

/* 右侧项目 */
.timeline__item--right {
  left: 50%;
  padding-left: 60px;
  text-align: left;
}

/* 时间轴圆点 */
.timeline__dot {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border: 4px solid #fff;
  border-radius: 50%;
  top: 30px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(204, 51, 68, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline__item--left .timeline__dot {
  right: -10px;
}

.timeline__item--right .timeline__dot {
  left: -10px;
}

.timeline__item:hover .timeline__dot {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(204, 51, 68, 0.5);
}

/* 连接线 */
.timeline__connector {
  position: absolute;
  top: 38px;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.timeline__item--left .timeline__connector {
  right: 10px;
}

.timeline__item--right .timeline__connector {
  left: 10px;
}

/* 即将举办样式 */
.timeline__item--upcoming .timeline__dot {
  background-color: #1890ff;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.timeline__item--upcoming .timeline__connector {
  background-color: #1890ff;
  border-style: dashed;
}

/* ==================== 4. 活动卡片 ==================== */
.event-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 即将举办的卡片样式 */
.event-card--upcoming {
  border: 2px dashed #1890ff;
  background-color: #f6fbff;
}

/* 卡片头部 */
.event-card__header {
  margin-bottom: 16px;
}

.event-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.event-card__badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  color: #fff;
}

.event-card__badge--completed {
  background-color: #52c41a;
}

.event-card__badge--upcoming {
  background-color: #1890ff;
}

.event-card__badge--preparing {
  background-color: #faad14;
  color: #333;
}

.event-card__badge--tag {
  background-color: #722ed1;
}

.event-card__title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}

.event-card__subtitle {
  font-size: 14px;
  color: var(--primary-color);
  margin: 0;
}

/* 卡片元信息 */
.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.event-card__date,
.event-card__location {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.event-card__date::before {
  content: "📅 ";
}

.event-card__location::before {
  content: "📍 ";
}

/* 卡片内容 */
.event-card__content {
  margin-bottom: 16px;
}

.event-card__desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 12px;
}

.event-card__highlights {
  margin: 0;
  padding-left: 20px;
}

.event-card__highlights li {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* 卡片按钮 */
.event-card__actions {
  display: flex;
  gap: 10px;
}

.event-card__btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-card__btn--photos {
  background-color: var(--primary-color);
  color: #fff;
}

.event-card__btn--photos:hover {
  background-color: var(--primary-hover);
}

.event-card__btn--detail {
  background-color: #f5f5f5;
  color: var(--text-main);
}

.event-card__btn--detail:hover {
  background-color: #e8e8e8;
}

/* ==================== 5. 照片画廊弹窗 ==================== */
.photo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.photo-modal.active {
  display: flex;
}

.photo-modal__header {
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.photo-modal__title {
  font-size: 20px;
  margin-bottom: 8px;
}

.photo-modal__counter {
  font-size: 14px;
  color: #aaa;
}

.photo-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.photo-modal__close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 画廊 */
.gallery {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 90%;
}

.gallery__nav {
  width: 50px;
  height: 50px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.gallery__nav:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.gallery__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery__image {
  width: 700px;
  height: 500px;
  background-color: #333;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__placeholder {
  color: #888;
  font-size: 18px;
}

/* ==================== 6. 详情弹窗 ==================== */
.detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.detail-modal.active {
  display: flex;
}

.detail-modal__content {
  position: relative;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  background-color: #fff;
  border-radius: 12px;
  padding: 40px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.detail-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-modal__close:hover {
  background-color: rgba(0, 0, 0, 0.2);
  color: #333;
}

.detail-modal__header {
  margin-bottom: 24px;
}

.detail-modal__badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  color: #fff;
  margin-bottom: 12px;
}

.detail-modal__badge--completed {
  background-color: #52c41a;
}

.detail-modal__badge--upcoming {
  background-color: #1890ff;
}

.detail-modal__badge--preparing {
  background-color: #faad14;
  color: #333;
}

.detail-modal__title {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.3;
}

.detail-modal__subtitle {
  font-size: 16px;
  color: var(--primary-color);
  margin: 0;
}

.detail-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.detail-modal__meta p {
  margin: 0;
  font-size: 14px;
  color: #555;
}

.detail-modal__body {
  margin-bottom: 24px;
}

.detail-modal__body p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}

.detail-modal__section {
  margin-bottom: 24px;
}

.detail-modal__section h4 {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
}

.detail-modal__highlights {
  margin: 0;
  padding-left: 24px;
}

.detail-modal__highlights li {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.6;
}

.detail-modal__notice {
  padding: 16px;
  background-color: #e6f7ff;
  border: 1px solid #91d5ff;
  border-radius: 6px;
  font-size: 14px;
  color: #0050b3;
  text-align: center;
}

/* ==================== 7. 响应式设计 ==================== */
@media screen and (max-width: 900px) {
  /* 时间轴变为单列 */
  .timeline::before {
    left: 20px;
  }

  .timeline__item {
    width: 100%;
    padding-left: 60px;
    padding-right: 20px;
    text-align: left;
  }

  .timeline__item--left,
  .timeline__item--right {
    left: 0;
    padding-left: 60px;
  }

  .timeline__item--left .timeline__dot,
  .timeline__item--right .timeline__dot {
    left: 10px;
    right: auto;
  }

  .timeline__item--left .timeline__connector,
  .timeline__item--right .timeline__connector {
    left: 30px;
    right: auto;
    width: 20px;
  }
}

@media screen and (max-width: 768px) {
  .events-header__title {
    font-size: 28px;
  }

  .events-header__title span {
    display: block;
    margin-left: 0;
    margin-top: 8px;
  }

  .events-toolbar {
    flex-wrap: wrap;
  }

  .event-card {
    padding: 20px;
  }

  .event-card__title {
    font-size: 18px;
  }

  .event-card__actions {
    flex-direction: column;
  }

  /* 画廊响应式 */
  .gallery {
    flex-direction: column;
    max-width: 95%;
  }

  .gallery__image {
    width: 100%;
    height: 300px;
  }

  .gallery__nav {
    width: 44px;
    height: 44px;
  }

  /* 详情弹窗响应式 */
  .detail-modal__content {
    padding: 24px;
  }

  .detail-modal__title {
    font-size: 22px;
  }

  .detail-modal__meta {
    flex-direction: column;
    gap: 12px;
  }
}
