/* ========================================
   Community Impact 页面专用样式
   全局导航 / 页脚样式见 css/styles.css
   ======================================== */

.community-page {
  padding-top: var(--header-height);
  background: var(--color-white);
}

.community-banner {
  width: 100%;
  height: 550px;
  background-image: url('../assets/images/community-impact/Banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-banner-title {
  margin: 0;
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 768px) {
  .community-banner {
    height: 360px;
  }

  .community-banner-title {
    font-size: 32px;
  }
}

/* ========== For a Better World 板块 ========== */
.community-better-world {
  background: var(--color-white);
}

.community-section-header {
  text-align: center;
  margin-bottom: 56px;
}

.community-section-title {
  margin: 0 0 16px;
  font-size: 40px;
  font-weight: 400;
  color: #222;
  line-height: 1.25;
}

.community-section-accent {
  width: 80px;
  height: 2px;
  margin: 0 auto;
  background: #0982e5;
}

.community-better-layout {
  display: grid;
  grid-template-columns: auto 550px;
  justify-content: center;
  gap: 230px;
  align-items: center;
}

.community-quote {
  position: relative;
  width: min(580px, 100%);
  max-width: 580px;
  justify-self: end;
  min-height: 380px;
  margin: 0;
  padding: 52px 48px 48px 44px;
  background:
    linear-gradient(145deg, rgba(9, 130, 229, 0.06) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f8fafc 0%, #f2f6fa 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0982e5;
  border-radius: 6px;
  box-shadow:
    0 16px 48px rgba(1, 95, 203, 0.07),
    0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

.community-quote::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle at top right, rgba(9, 130, 229, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.community-quote-mark {
  position: absolute;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.community-quote-mark--open {
  top: 18px;
  left: 28px;
  font-size: 132px;
  color: rgba(1, 95, 203, 0.14);
}

.community-quote-mark--close {
  right: 32px;
  bottom: -8px;
  font-size: 112px;
  color: rgba(9, 130, 229, 0.12);
}

.community-quote-content {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 8px 8px 0 12px;
}

.community-quote-text {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #292929;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.community-quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(9, 130, 229, 0.16);
  font-size: 22px;
  font-weight: 400;
  color: #2a2a2a;
  line-height: 1.4;
}

.community-quote-author::before {
  content: '';
  flex-shrink: 0;
  width: 32px;
  height: 2px;
  background: #0982e5;
}

.community-quote-author cite {
  font-style: italic;
  font-size: 24px;
  color: #015fcb;
}

.community-orbit {
  position: relative;
  width: 550px;
  height: 550px;
  max-width: 100%;
  margin: 0;
  flex-shrink: 0;
  justify-self: start;
  --orbit-radius: 215px;
  --orbit-icon-size: 112px;
  --orbit-center-size: 112px;
}

.community-orbit-spinner {
  position: absolute;
  inset: 0;
  animation: community-orbit-spin 28s linear infinite;
}

.community-orbit-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.community-orbit-track circle {
  fill: none;
  stroke: #015fcb;
  stroke-width: 4;
}

.community-orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: var(--orbit-center-size);
  height: var(--orbit-center-size);
  transform: translate(-50%, -50%);
}

.community-orbit-center img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-orbit-icons {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 1;
}

.community-orbit-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--orbit-icon-size);
  height: var(--orbit-icon-size);
  margin: calc(var(--orbit-icon-size) / -2) 0 0 calc(var(--orbit-icon-size) / -2);
  transform: rotate(var(--orbit-angle)) translateY(calc(-1 * var(--orbit-radius)));
}

.community-orbit-icon-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 4px solid #015fcb;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  padding: 14px;
}

.community-orbit-icon-ring img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes community-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 992px) {
  .community-better-layout {
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 28px;
  }

  .community-quote {
    justify-self: center;
    width: 100%;
  }

  .community-orbit {
    justify-self: center;
    margin: 0 auto;
  }

  .community-quote {
    min-height: 0;
    padding: 40px 32px 36px 28px;
  }

  .community-quote-mark--open {
    font-size: 96px;
    top: 12px;
    left: 16px;
  }

  .community-quote-mark--close {
    font-size: 80px;
    right: 16px;
    bottom: -4px;
  }

  .community-quote-content {
    padding: 4px 0 0 8px;
  }

  .community-quote-text {
    font-size: 24px;
  }

  .community-quote-author {
    margin-top: 24px;
    padding-top: 20px;
    font-size: 18px;
  }

  .community-quote-author cite {
    font-size: 20px;
  }

  .community-orbit {
    width: min(100%, 550px);
    height: auto;
    aspect-ratio: 1 / 1;
    --orbit-radius: min(215px, 39vw);
    --orbit-icon-size: min(112px, 20vw);
    --orbit-center-size: min(112px, 20vw);
  }
}

@media (max-width: 768px) {
  .community-section-title {
    font-size: 32px;
  }

  .community-section-header {
    margin-bottom: 40px;
  }

  .community-quote {
    padding: 32px 24px 28px 22px;
  }

  .community-quote-mark--open {
    font-size: 72px;
  }

  .community-quote-mark--close {
    font-size: 64px;
  }

  .community-quote-text,
  .community-quote-author cite {
    font-size: 22px;
  }

  .community-quote-author {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-orbit-spinner {
    animation: none !important;
  }
}

/* ========== Tab 切片板块 ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.community-better-world.section-spaced > .container:first-of-type {
  padding-bottom: 100px;
}

.community-tabs-section {
  background: var(--color-white);
}

.community-tabs-section.section-spaced {
  padding-top: 100px;
}

.community-tabs-section.section-spaced > .container:first-of-type {
  padding-bottom: 150px;
}

.community-tabs-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  max-width: 720px;
  margin: 0 auto 72px;
  border-bottom: 1px solid #d8dce3;
}

.community-tabs-btn {
  flex: 1 1 0;
  margin: 0;
  padding: 18px 28px;
  border: 1px solid #d8dce3;
  border-bottom: none;
  background: #fff;
  color: #666;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.community-tabs-btn + .community-tabs-btn {
  border-left: none;
}

.community-tabs-btn.is-active {
  background: #0982e5;
  border-color: #0982e5;
  color: #fff;
}

.community-tabs-btn:focus-visible {
  outline: 2px solid #0982e5;
  outline-offset: 2px;
  z-index: 1;
}

.community-tabs-panel {
  display: none;
}

.community-tabs-panel.is-active {
  display: block;
}

.community-feature-row {
  --feature-media-width: 644px;
  --feature-column-gap: 56px;
  display: grid;
  grid-template-columns: var(--feature-media-width) var(--feature-media-width);
  gap: var(--feature-column-gap);
  align-items: start;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 88px;
}

.community-feature-row:last-child {
  margin-bottom: 0;
}

.community-feature-row--reverse {
  grid-template-columns: var(--feature-media-width) var(--feature-media-width);
}

.community-feature-row--reverse .community-feature-media {
  grid-column: 2;
  grid-row: 1;
}

.community-feature-row--reverse .community-feature-body {
  grid-column: 1;
  grid-row: 1;
}

.community-feature-body {
  align-self: start;
  width: 100%;
  max-width: var(--feature-media-width);
}

.community-feature-media {
  width: 100%;
  max-width: var(--feature-media-width);
}

.community-feature-media img {
  display: block;
  width: 100%;
  height: 462px;
  max-width: var(--feature-media-width);
  object-fit: cover;
}

.community-feature-title {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 400;
  color: #3b3e44;
  line-height: 1.45;
}

.community-feature-accent {
  width: 60px;
  height: 2px;
  margin-bottom: 40px;
  background: #0982e5;
}

.community-feature-text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #444;
  line-height: 1.75;
}

@media (max-width: 1200px) {
  .community-feature-row,
  .community-feature-row--reverse {
    grid-template-columns: min(var(--feature-media-width), 100%);
    gap: var(--feature-column-gap);
    width: 100%;
  }

  .community-feature-row--reverse .community-feature-media,
  .community-feature-row--reverse .community-feature-body {
    grid-column: auto;
    grid-row: auto;
  }

  .community-feature-media,
  .community-feature-body {
    max-width: min(var(--feature-media-width), 100%);
    justify-self: center;
  }

  .community-feature-media img {
    height: auto;
    aspect-ratio: 644 / 462;
  }
}

@media (max-width: 768px) {
  .community-tabs-nav {
    margin-bottom: 48px;
  }

  .community-tabs-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .community-feature-row {
    margin-bottom: 56px;
  }

  .community-feature-title {
    font-size: 22px;
  }
}
