/* ==========================================================================
   首页样式（home.css）
   仅 index.html 引用；内页样式见 main.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. 设计令牌
   -------------------------------------------------------------------------- */
.page-home {
  --home-max-width: 1200px;
  --home-accent: #a2612c;
  --home-brown: #b7936f;
  --home-brown-dark: #a68364;
  --home-footer-bg: #75614d;
  --home-border: rgba(183, 147, 111, 0.5);
  --home-text-muted: rgba(0, 0, 0, 0.58);
  --home-arrow-grey: rgba(0, 0, 0, 0.25);

  background: #fff;
}

/* --------------------------------------------------------------------------
   1. 页头
   -------------------------------------------------------------------------- */
.page-home .page-bg-texture {
  display: none;
}

.page-home .home-header {
  position: relative;
  background: #fefdfb;
  overflow: hidden;
}

.page-home .home-header__texture {
  position: absolute;
  inset: 0;
  background-image: url("../imgs/v1-index-bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}

.page-home .home-header__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, var(--home-max-width));
  margin: 0 auto;
  min-height: 262px;
  padding: 16px 0 0;
}

.page-home .site-header--home {
  position: static;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  width: 100%;
}

.page-home .site-header--home .header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0;
  width: 100%;
}

.page-home .site-header--home .brand {
  flex-shrink: 0;
}

.page-home .site-header--home .brand img {
  width: 125px;
}

.page-home .site-header--home .site-nav {
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: 48px;
}

.page-home .site-header--home .nav-link {
  font-size: 14px;
  padding-bottom: 6px;
  color: rgba(0, 0, 0, 0.9);
}

.page-home .site-header--home .header-search {
  flex-shrink: 0;
  width: 208px;
  height: 30px;
  margin-left: auto;
  border: 1px solid #a2612c;
  border-radius: 999px;
  padding: 0 16px;
  gap: 8px;
}

.page-home .site-header--home .search-input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1;
  color: #a2612c;
  background: transparent;
}

.page-home .site-header--home .search-input::placeholder {
  color: #a2612c;
  opacity: 0.9;
}

.page-home .site-header--home .search-button {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.page-home .site-header--home .search-button img {
  width: 16px;
  height: 16px;
  display: block;
}

.page-home .site-header--home .search-button:hover {
  background: transparent;
}

.page-home .site-header--home .search-button:hover img {
  opacity: 0.85;
}

.page-home .home-header__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.page-home .home-header__title {
  padding-top: 23px;
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 52px;
  font-weight: 700;
  color: #4a2e0f;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.page-home .home-header__subtitle {
  margin: 0;
  max-width: 820px;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(87, 57, 23, 0.78);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   2. Banner 轮播
   -------------------------------------------------------------------------- */
.page-home .hero--banner {
  padding: 0;
  background: #f5f0ea;
  overflow: hidden;
  height: 510px;
}

.page-home .hero--banner .hero-slider {
  position: relative;
  width: 100%;
  height: 510px;
}

.page-home .hero--banner .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: none !important;
  transition: opacity 0.5s ease-in-out !important;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}

.page-home .hero--banner .hero-slide.is-active {
  opacity: 1;
  transform: none !important;
  pointer-events: auto;
  z-index: 1;
}

.page-home .hero--banner .hero-slide img {
  display: block;
  width: 100%;
  height: 510px;
  object-fit: cover;
  object-position: center;
}

.page-home .hero-controls--banner {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  width: 100%;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.page-home .hero-controls--banner button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

.page-home .hero-controls--banner button img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.page-home .hero-controls--banner button:hover {
  opacity: 0.85;
}

.page-home .hero--banner .dot-wrap,
.page-home .hero--banner .hero-dots {
  display: none;
}

/* --------------------------------------------------------------------------
   3. 新闻动态
   -------------------------------------------------------------------------- */
.page-home .contact-section-wrap {
  background: #fff;
}

.page-home .news,
.page-home .business,
.page-home .party {
  width: var(--home-max-width);
  margin: 0 auto;
}

.page-home .news-grid {
  display: grid;
  grid-template-columns: 540px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.page-home .news-slider {
  width: 100%;
  height: 446px;
  aspect-ratio: auto;
  overflow: hidden;
  position: relative;
}

.page-home .news-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: none !important;
  transition: opacity 0.5s ease-in-out !important;
  pointer-events: none;
  z-index: 0;
  will-change: opacity;
}

.page-home .news-slide.is-active {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto;
  z-index: 1;
}

.page-home .news-slider .news-feature__overlay {
  height: 110px;
  padding: 16px 96px 16px 24px;
  background: rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.page-home .news-slider .news-feature__body {
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.page-home .news-slider .news-feature__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-height: 100%;
  overflow: hidden;
}

.page-home .news-slider .news-date {
  display: block;
  flex-shrink: 0;
  margin: 0;
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .news-slider .news-feature__title,
.page-home .news-slider .news-feature__body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #fff;
  max-height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  word-break: break-word;
}

.page-home .news-dots-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 12;
  height: 110px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 24px;
  pointer-events: none;
  box-sizing: border-box;
}

.page-home .news-dots-overlay .news-dots {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: auto;
}

.page-home .news-dots-overlay .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.3s ease;
  text-indent: -9999px;
  overflow: hidden;
}

.page-home .news-dots-overlay .dot.is-active {
  background: var(--home-accent);
}

.page-home .news-list {
  width: 100%;
  gap: 20px;
}

.page-home .news-list .news-item {
  background: #fff;
  border: 0.5px solid var(--home-border);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-home .news-list .news-item__arrow {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.page-home .news-list .news-item__arrow img {
  position: absolute;
  inset: 0;
  display: block;
  width: 24px;
  height: 24px;
  transition: opacity 0.2s ease;
}

.page-home .news-list .news-item__arrow-icon--hover {
  opacity: 0;
}

.page-home .news-list .news-item:hover {
  background: var(--home-brown);
  border-color: var(--home-brown);
  transform: none;
  box-shadow: 0 8px 24px rgba(68, 38, 15, 0.12);
}

.page-home .news-list .news-item:hover .news-item__content {
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.page-home .news-list .news-item:hover .news-item__content h4,
.page-home .news-list .news-item:hover .news-item__content p,
.page-home .news-list .news-item:hover .news-item__date .day,
.page-home .news-list .news-item:hover .news-item__date .year {
  color: #fff;
}

.page-home .news-list .news-item:hover .news-item__arrow-icon--default {
  opacity: 0;
}

.page-home .news-list .news-item:hover .news-item__arrow-icon--hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   4. 主责主业
   -------------------------------------------------------------------------- */
.page-home .contact-section-wrap-01 {
  background-image: url("../imgs/v1-index-sub-bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.page-home .business-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.page-home .business-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 20px 16px 16px;
  min-height: 280px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  box-shadow: none;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.page-home .business-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
  line-height: 1.4;
  align-self: flex-start;
}

.page-home .business-card__thumb {
  margin: 0 0 12px;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 120px;
  border-top: 1px solid rgba(183, 147, 111, 0.5);
}

.page-home .business-card__thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 2px;
}

.page-home .business-card__arrow {
  align-self: flex-start;
  margin-top: auto;
  width: 24px;
  height: 24px;
}

.page-home .business-card__arrow-default {
  display: block;
}

.page-home .business-card__arrow-selected {
  display: none;
}

.page-home .business-card:hover,
.page-home .business-card:focus-visible {
  background: var(--home-brown);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(68, 38, 15, 0.12);
}

.page-home .business-card:hover h3,
.page-home .business-card:focus-visible h3 {
  color: #fff;
}

.page-home .business-card:hover .business-card__thumb,
.page-home .business-card:focus-visible .business-card__thumb {
  border-top-color: rgba(255, 255, 255, 0.35);
}

.page-home .business-card:hover .business-card__arrow-default,
.page-home .business-card:focus-visible .business-card__arrow-default {
  display: none;
}

.page-home .business-card:hover .business-card__arrow-selected,
.page-home .business-card:focus-visible .business-card__arrow-selected {
  display: block;
}

/* --------------------------------------------------------------------------
   5. 党建活动
   -------------------------------------------------------------------------- */
.page-home .party-box {
  border: 0.5px solid var(--home-border);
  padding: 32px;
}

.page-home .party-box .party-feature {
  padding: 0;
  background: transparent;
  box-shadow: none;
  align-items: stretch;
  gap: 40px;
}

.page-home .party-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  align-items: stretch;
  gap: 24px;
}

.page-home .party-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
  margin-top: auto;
}

.page-home .party-date {
  flex: 0 0 auto;
  margin: 0;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
  line-height: 22px;
  color: rgba(0, 0, 0, 0.58);
}

.page-home .party-detail-btn {
  flex-shrink: 0;
  margin-left: auto;
}

.page-home .party-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-home .party-banners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.page-home .party-banner-item {
  display: block;
  overflow: hidden;
}

.page-home .party-banner-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   6. 页脚（友情链接 + 公司信息）
   -------------------------------------------------------------------------- */
.page-home .site-footer--home {
  padding: 0;
  background: var(--home-footer-bg);
  color: #fff;
}

.page-home .site-footer--home .home-footer-links {
  background: var(--home-footer-bg);
}

.page-home .home-footer-links__inner {
  width: min(100% - 3rem, var(--home-max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px 0 0 0;
}

.page-home .home-link-dropdown {
  position: relative;
}

.page-home .home-link-dropdown__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.65);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.page-home .home-link-dropdown__toggle:hover,
.page-home .home-link-dropdown.is-open .home-link-dropdown__toggle {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.page-home .home-link-dropdown__caret {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease;
}

.page-home .home-link-dropdown.is-open .home-link-dropdown__caret {
  transform: rotate(180deg);
}

.page-home .home-link-dropdown__panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
  z-index: 10;
}

.page-home .home-link-dropdown.is-open .home-link-dropdown__panel {
  display: block;
}

.page-home .home-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .home-link-list li + li {
  border-top: 1px solid #f0f0f0;
}

.page-home .home-link-list a {
  display: block;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  color: #a67c52;
  transition: background 0.2s ease;
}

.page-home .home-link-list a:hover {
  background: rgba(168, 117, 44, 0.06);
}

.page-home .site-footer--home .site-footer__main {
  width: min(100% - 3rem, var(--home-max-width));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 40px;
  row-gap: 20px;
  align-items: end;
  background: var(--home-footer-bg);
}

.page-home .footer-brand {
  display: contents;
}

.page-home .footer-brand img {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  width: 123px;
  height: auto;
}

.page-home .footer-qr-wrap {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: 10px;
}

.page-home .footer-qr {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.page-home .site-footer--home .footer-info-line {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 32px;
  font-size: 16px;
  line-height: 26px;
  color: #fff;
}

.page-home .footer-qr-text {
  margin: 0;
  font-size: 13px;
  line-height: 26px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  white-space: nowrap;
}

.page-home .footer-qr-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   7. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .page-home .news,
  .page-home .business,
  .page-home .party {
    width: min(100% - 3rem, 100%);
  }

  .page-home .news-grid {
    grid-template-columns: 1fr;
  }

  .page-home .news-slider {
    height: auto;
    aspect-ratio: 540 / 446;
  }

  .page-home .news-slider,
  .page-home .news-list {
    width: 100%;
  }

  .page-home .news-item {
    width: 100%;
  }

  .page-home .business-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .site-header--home .header-inner {
    gap: 24px;
  }

  .page-home .site-header--home .site-nav {
    gap: 24px;
  }

  .page-home .site-header--home .header-search {
    width: 200px;
  }

  .page-home .home-header__title {
    font-size: 30px;
  }
}

@media (max-width: 767px) {
  .page-home .hero--banner,
  .page-home .hero--banner .hero-slider {
    height: 510px;
  }

  .page-home .home-header__inner {
    width: min(100% - 2rem, 100%);
    min-height: auto;
    padding: 16px 0 24px;
  }

  .page-home .site-header--home .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-home .site-header--home .site-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-home .site-header--home .header-search {
    width: 100%;
    margin-left: 0;
  }

  .page-home .home-header__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .page-home .home-header__subtitle {
    font-size: 13px;
  }

  .page-home .business-grid {
    grid-template-columns: 1fr;
  }

  .page-home .party-banners {
    grid-template-columns: 1fr;
  }

  .page-home .party-box {
    padding: 20px;
  }

  .page-home .home-footer-links__inner {
    grid-template-columns: 1fr;
    width: min(100% - 2rem, 100%);
    padding: 20px 0;
    gap: 16px;
  }

  .page-home .site-footer--home .site-footer__main {
    width: min(100% - 2rem, 100%);
    padding: 28px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .page-home .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .page-home .footer-brand img,
  .page-home .site-footer--home .footer-info-line {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
  }

  .page-home .footer-qr-wrap {
    grid-column: auto;
    grid-row: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
  }

  .page-home .site-footer--home .footer-info-line {
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.6;
  }
}
