/* ========================================
   党团建设 · 补充样式
   ======================================== */

.py-site-home .about-banner {
  display: none;
}

.py-brand-bar.about-sidenav-title {
  padding: 14px 18px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 2px;
}

/* 门户首页 */
.py-hero {
  position: relative;
  background: #2a1212;
  overflow: hidden;
}

.py-hero-inner {
  position: relative;
  min-height: 400px;
  height: min(58vh, 520px);
}

.py-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  background-size: cover;
  background-position: center;
}

.py-hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.py-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(107, 20, 20, 0.9) 0%, rgba(140, 28, 28, 0.55) 50%, rgba(40, 20, 20, 0.7) 100%);
}

.py-hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  bottom: clamp(32px, 5vw, 52px);
  z-index: 3;
  color: #fff;
  max-width: 560px;
}

.py-hero-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 8px;
}

.py-hero-dots {
  position: absolute;
  right: 36px;
  bottom: 40px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.py-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.py-hero-dot.active {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.py-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: -36px auto 28px;
  padding: 0 24px;
  max-width: var(--content-max, 1200px);
  position: relative;
  z-index: 5;
}

.py-portal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid #e8e0da;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(80, 30, 30, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s;
}

.py-portal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(140, 28, 28, 0.35);
}

.py-portal-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary) 0%, #a82828 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(140, 28, 28, 0.25);
}

.py-portal-card span {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.py-portal-card small {
  font-size: 11px;
  color: #888;
  text-align: center;
}

.py-home-body {
  max-width: var(--content-max, 1200px);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.py-theme-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  margin-top: 32px;
  background: linear-gradient(135deg, rgba(140, 28, 28, 0.92) 0%, rgba(201, 162, 39, 0.85) 100%);
  border-radius: 6px;
  color: #fff;
}

.py-theme-banner h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 6px;
}

.py-theme-banner p {
  font-size: 13px;
  opacity: 0.9;
}

.py-theme-banner .po-btn {
  background: #fff;
  color: var(--color-primary);
  border: none;
  white-space: nowrap;
}

/* 党建动态 */
.py-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.py-view-btn {
  padding: 6px 16px;
  font-size: 13px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
}

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

.py-news-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
}

.py-news-thumb {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.py-video-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: 2px;
}

.py-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}

.py-type-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(140, 28, 28, 0.1);
  color: var(--color-primary);
  border-radius: 2px;
  margin-right: 6px;
}

/* 时间轴 */
.py-timeline {
  position: relative;
  padding-left: 28px;
}

.py-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-gold));
}

.py-timeline-item {
  position: relative;
  padding: 0 0 24px 20px;
}

.py-timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}

.py-timeline-date {
  font-size: 12px;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.py-timeline-item a {
  text-decoration: none;
  color: inherit;
}

.py-timeline-item h4 {
  font-size: 15px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.py-timeline-item p {
  font-size: 13px;
  color: #888;
}

/* 学团工作 · 瀑布流 */
.py-masonry {
  column-count: 3;
  column-gap: 16px;
}

.py-masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #eee5e2;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.py-masonry-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(80, 30, 30, 0.1);
}

.py-masonry-item img {
  width: 100%;
  display: block;
}

.py-masonry-item.tall img {
  aspect-ratio: 3/4;
  object-fit: cover;
}

.py-masonry-item:not(.tall) img {
  aspect-ratio: 16/10;
  object-fit: cover;
}

.py-masonry-body {
  padding: 14px 16px;
}

.py-masonry-source {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(140, 28, 28, 0.1);
  color: var(--color-primary);
  border-radius: 2px;
  margin-bottom: 6px;
}

.py-masonry-body h4 {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.py-masonry-body p {
  font-size: 12px;
  color: #888;
  line-height: 1.65;
}

.py-masonry-body time {
  display: block;
  font-size: 11px;
  color: #bbb;
  margin-top: 8px;
}

/* 不忘初心主题教育 · 沉浸式 */
.py-theme-page .about-banner {
  display: none;
}

.py-theme-page .about-body {
  padding: 0;
}

.py-theme-page .about-layout {
  display: block;
}

.py-theme-page .about-sidenav {
  display: none;
}

.py-theme-immersive {
  background: linear-gradient(180deg, #1a0a0a 0%, #2d1212 30%, #3d1818 60%, #1a0a0a 100%);
  color: #fff;
  min-height: 100vh;
}

.py-theme-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.py-theme-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}

.py-theme-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 10, 10, 0.6) 0%, rgba(45, 18, 18, 0.9) 100%);
}

.py-theme-hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 24px;
  max-width: 720px;
}

.py-theme-hero-inner h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  color: var(--color-gold);
  letter-spacing: 6px;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(201, 162, 39, 0.3);
}

.py-theme-hero-inner .py-theme-slogan {
  font-size: clamp(14px, 2vw, 18px);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.py-theme-hero-inner p {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.75);
}

.py-theme-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 40px 24px;
  max-width: var(--content-max, 1200px);
  margin: 0 auto;
}

.py-theme-stat {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 6px;
}

.py-theme-stat strong {
  display: block;
  font-size: 32px;
  color: var(--color-gold);
  font-family: var(--font-serif);
}

.py-theme-stat span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.py-theme-stat p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.py-theme-section {
  max-width: var(--content-max, 1200px);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.py-theme-section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 4px;
}

.py-theme-section-title::before,
.py-theme-section-title::after {
  content: "◆";
  font-size: 10px;
  margin: 0 12px;
  opacity: 0.6;
}

.py-seminar-list {
  display: grid;
  gap: 14px;
}

.py-seminar-item {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 6px 6px 0;
}

.py-seminar-item time {
  font-size: 12px;
  color: var(--color-gold);
}

.py-seminar-item h4 {
  font-size: 15px;
  margin: 6px 0;
  color: #fff;
}

.py-seminar-item p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

.py-seminar-item .py-seminar-speaker {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.py-courseware-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.py-courseware-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 6px;
  transition: background 0.2s;
}

.py-courseware-card:hover {
  background: rgba(255, 255, 255, 0.08);
}

.py-courseware-type {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-gold);
  border-radius: 6px;
}

.py-courseware-info h4 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}

.py-courseware-info p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.py-courseware-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
}

.py-theme-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.py-theme-gallery figure {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.2);
}

.py-theme-gallery img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.py-theme-gallery figcaption {
  padding: 10px 12px;
  font-size: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.3);
}

.py-search-bar input {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .py-portal-grid {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }
  .py-theme-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .py-masonry {
    column-count: 2;
  }
  .py-courseware-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .py-news-item {
    flex-direction: column;
  }
  .py-news-thumb,
  .py-thumb-wrap {
    width: 100%;
  }
  .py-news-thumb {
    height: 160px;
  }
  .py-masonry {
    column-count: 1;
  }
  .py-theme-stats {
    grid-template-columns: 1fr;
  }
  .py-theme-gallery {
    grid-template-columns: 1fr;
  }
  .py-theme-banner {
    flex-direction: column;
    text-align: center;
  }
}
