@charset "UTF-8";

/* 社区活动页 (Figma 605:731) 专属样式。还原基准 Figma 1920 画板。 */

.events-page {
  position: relative;
  z-index: 1;
  padding-top: 1px;
}

/* 英雄区 */
.events-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 20px;
  /* 顶部留白随屏宽收缩；左右用统一页边距，文字不贴边 */
  padding: clamp(132px, 18vw, 200px) var(--page-gutter) 0;
}

.events-eyebrow {
  margin: 0;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.333;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.events-title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 3.35vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.0375em;
}

.events-sub {
  margin: 0;
  max-width: 437px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.42;
}

/* 主推活动 */
.events-feature-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.events-peek {
  position: absolute;
  top: 50%;
  width: 509px;
  height: 843px;
  transform: translateY(-50%);
  object-fit: cover;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

.events-peek--left {
  left: calc(50% - 1140px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 70%);
  mask: linear-gradient(90deg, transparent, #000 70%);
}

.events-peek--right {
  right: calc(50% - 1140px);
  -webkit-mask: linear-gradient(270deg, transparent, #000 70%);
  mask: linear-gradient(270deg, transparent, #000 70%);
}

.events-feature {
  position: relative;
  z-index: 1;
  width: min(1243px, calc(100% - 2 * var(--page-gutter)));
  margin: 0 auto;
  aspect-ratio: 1243 / 520;
  border-radius: 20px;
  overflow: hidden;
}

.events-feature__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.events-feature__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 40px 32px 40px;
}

.events-feature__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.events-feature__text {
  display: grid;
  gap: 10px;
  max-width: 607px;
}

.events-feature__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
}

.events-feature__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* 暂时隐藏 banner 卡片上的报名按钮 */
.ev3d-card .events-feature__btn {
  display: none;
}

/* 按钮：参考首页 .button.primary（半透明底 + 白字 + hover 炫彩描边环） */
.events-feature__btn {
  position: relative;
  isolation: isolate;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 32px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: #fff;
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1.2px;
  white-space: nowrap;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.events-feature__btn img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

/* 炫彩 hover 描边环（沿用首页的 --btn-ang / btn-iridescent） */
.ev3d-card .events-feature__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--btn-ang),
    #0048ff, #00e0ff, #6a8bff, #b15cff, #ff5ccd, #0048ff
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ev3d-card.is-active .events-feature__btn:hover,
.ev3d-card.is-active .events-feature__btn:focus-visible {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  outline: none;
}

.ev3d-card.is-active .events-feature__btn:hover::before,
.ev3d-card.is-active .events-feature__btn:focus-visible::before {
  opacity: 1;
  animation: btn-iridescent 3s linear infinite;
}

.ev3d-card.is-active .events-feature__btn:hover img {
  transform: rotate(90deg);
}

.ev3d-card.is-active .events-feature__btn:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .events-feature__btn,
  .events-feature__btn img { transition: none; }
  .ev3d-card.is-active .events-feature__btn:hover::before { animation: none; }
}

/* 状态徽章 */
.event-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 30px;
  background: #000;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.56px;
  text-transform: uppercase;
}

.event-badge.is-open {
  background: #3424c0;
}

/* —— 主推活动 3D 球面轮播 —— */
.ev-carousel {
  position: relative;
  margin-top: 70px;
  height: 600px;
  perspective: 1800px;
  perspective-origin: 50% 45%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.ev-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.ev-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1040px, 80vw);
  aspect-ratio: 1243 / 523;
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.6s ease;
  will-change: transform, opacity;
  cursor: pointer;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: #0d0d12;
}

.ev-slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ev-slide__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 40px 32px 40px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.ev-slide.is-active {
  cursor: default;
}

.ev-slide.is-active .ev-slide__inner {
  opacity: 1;
}

/* 非激活幻灯片屏蔽内部交互 */
.ev-slide:not(.is-active) .ev-slide__inner {
  pointer-events: none;
}

.ev-slide__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

/* 导航箭头 */
.ev-nav {
  position: absolute;
  top: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  border: none;
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.375rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ev-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ev-nav--prev { left: max(24px, calc(50% - 640px)); }
.ev-nav--next { right: max(24px, calc(50% - 640px)); }

/* 指示点 */
.ev-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 50;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.ev-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ev-dot.is-active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 768px) {
  .ev-carousel { height: 420px; }
  .ev-slide { width: 88vw; }
  .ev-nav { display: none; }
}

/* —— Three.js 凹面（环抱式）3D 轮播 —— */
/* 高度按 Figma 主推区比例 1920:843≈2.28:1（44vw 可在各宽度保持该比例）。 */
.ev3d {
  position: relative;
  margin-top: 70px;
  height: clamp(440px, 44vw, 845px);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.ev3d:active {
  cursor: grabbing;
}

.ev3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* 屏幕左右渐隐透明 */
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
}

/* 幻灯片数据列表：仅供脚本读取，不直接显示 */
.ev3d-data { display: none; }

/* HTML 文字层：逐帧用相机投影对位，卡片随每张图移动/旋转 */
.ev3d-textlayer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;            /* 拖拽穿透到 canvas；按钮单独开启 */
  z-index: 5;
  perspective: 1600px;             /* 供卡片 rotateY 产生立体感 */
  /* 屏幕左右渐隐透明（与画布一致） */
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
}

/* 单张文字卡片：像素尺寸对应一张横幅，由脚本定位/缩放/旋转 */
.ev3d-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 1243px;
  height: 523px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 40px 40px 48px;
  transform-origin: center center;
  pointer-events: none;
  will-change: transform, opacity;
}

.ev3d-card .event-badge {
  align-self: flex-start;
  font-size: 1rem;
  padding: 8px 14px;
}

.ev3d-card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.ev3d-card .events-feature__text {
  display: grid;
  gap: 14px;
  max-width: 640px;
}

.ev3d-card .events-feature__title {
  font-size: 2.75rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ev3d-card .events-feature__desc {
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ev3d-card .events-feature__btn {
  font-size: 1.125rem;
  padding: 18px 34px;
  pointer-events: none;
}

.ev3d-card.is-active .events-feature__btn {
  pointer-events: auto;            /* 仅居中卡片按钮可点击 */
}

.ev3d-nav {
  position: absolute;
  top: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  border: none;
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.375rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.ev3d-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ev3d-nav--prev { left: max(24px, calc(50% - 660px)); }
.ev3d-nav--next { right: max(24px, calc(50% - 660px)); }

.ev3d-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 50;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.ev3d-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ev3d-dot.is-active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 900px) {
  .ev3d {
    height: clamp(620px, 152vw, 820px);
    margin-top: 48px;
  }
  .ev3d-nav { display: none; }
  /* 手机端使用 3:4 竖版海报，文字按竖向海报重新排版。 */
  .ev3d-canvas,
  .ev3d-textlayer {
    -webkit-mask: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    mask: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  }

  .ev3d-card {
    padding: 42px 38px 48px;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
  }

  .ev3d-card .event-badge {
    font-size: 2.2rem;
    padding: 12px 18px;
  }

  .ev3d-card__bottom {
    display: grid;
    gap: 22px;
  }

  .ev3d-card .events-feature__text {
    max-width: 100%;
    gap: 18px;
  }

  .ev3d-card .events-feature__title {
    font-size: 4rem;
    line-height: 1.08;
  }

  .ev3d-card .events-feature__desc {
    display: block;
    font-size: 2rem;
    line-height: 1.55;
  }
}

/* 活动卡片网格 */
.events-grid {
  list-style: none;
  width: min(1247px, calc(100% - 2 * var(--page-gutter)));
  margin: clamp(56px, 8vw, 100px) auto clamp(80px, 12vw, 140px);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3.2vw, 60px) clamp(16px, 1.6vw, 20px);
}

/* 列表项透明化：让 .event-card 直接作为网格项参与布局，外观与原平铺一致 */
.events-grid > li {
  display: contents;
}

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 506px;
  border-radius: 27px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  color: #fff;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.event-card__media {
  position: relative;
  height: 226px;
  flex: none;
  padding: 20px;
}

.event-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card__media .event-badge {
  position: relative;
  z-index: 1;
}

.event-card__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 30px 30px;
}

.event-card__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.56px;
}

.event-card__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.event-card__meta {
  margin: 0;                 /* 清除 <p> 默认 margin-bottom，避免行间距过大 */
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  line-height: 1.125;
}

/* 日期与地址两行更紧凑成组 */
.event-card__meta + .event-card__meta {
  margin-top: -8px;
}

.event-card__meta img {
  width: 16px;
  height: 16px;
  flex: none;
}

.event-card__arrow {
  position: absolute;
  right: 30px;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 60px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.event-card__arrow img {
  width: 16px;
  height: 16px;
}

@media (max-width: 1000px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
  .events-feature__btn {
    padding: 12px 20px;
  }
}
