/* 禅境清宁 — 宗教氛围装饰 */

:root {
  --ts-lotus-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none'%3E%3Cpath d='M60 14c-8 12-14 22-2 32 12-10 6-20-2-32Z' stroke='%23c9a962' stroke-width='1.2' opacity='.55'/%3E%3Cpath d='M60 46v28' stroke='%23c9a962' stroke-width='1' opacity='.45'/%3E%3Cpath d='M38 38c-10-4-18 6-10 14 8-6 12-12 10-14Z' stroke='%23c9a962' stroke-width='1' opacity='.4'/%3E%3Cpath d='M82 38c10-4 18 6 10 14-8-6-12-12-10-14Z' stroke='%23c9a962' stroke-width='1' opacity='.4'/%3E%3C/svg%3E");
  --ts-divider-color: color-mix(in srgb, var(--color-accent) 72%, var(--color-border));
}

/* ── 统一分隔装饰：线 + 菱形，flex 保证垂直居中 ── */
.ts-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  line-height: 0;
}

.ts-divider-line {
  display: block;
  height: 1px;
  flex: 1 1 auto;
  min-width: 1.5rem;
  background: var(--ts-divider-color);
}

.ts-divider-dot {
  display: block;
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  transform: rotate(45deg);
  background: var(--color-accent);
  opacity: 0.72;
}

/* 区块顶部分隔（全宽） */
.ts-divider--section {
  width: 100%;
  margin: 0 0 1.75rem;
}

.ts-divider--section .ts-divider-line:first-child {
  background: linear-gradient(90deg, transparent 0%, var(--ts-divider-color) 100%);
}

.ts-divider--section .ts-divider-line:last-child {
  background: linear-gradient(90deg, var(--ts-divider-color) 0%, transparent 100%);
}

/* 标题下强调线（与区块大分割线区分：短粗金线 + 细副线） */
.ts-title-accent {
  display: block;
  position: relative;
  width: 2.5rem;
  height: 2px;
  margin: 0.6rem 0 0.75rem;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    color-mix(in srgb, var(--color-accent) 55%, transparent) 100%
  );
}

.ts-title-accent::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.45rem;
  width: 1.35rem;
  height: 1px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--color-accent) 38%, transparent);
}

.ts-title-accent--center {
  margin-left: auto;
  margin-right: auto;
}

.ts-title-accent--center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ── 顶栏檐口（position: sticky 见 main.css，勿覆盖） ── */
.ts-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--color-accent) 25%, transparent) 18%,
    var(--color-accent) 50%,
    color-mix(in srgb, var(--color-accent) 25%, transparent) 82%,
    transparent 100%
  );
  opacity: 0.55;
}

/* ── 区块背景 ── */
.ts-section--sanctum {
  position: relative;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.ts-section--sanctum::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--ts-lotus-watermark) center / min(220px, 40vw) no-repeat;
  opacity: 0.035;
}

.ts-section--sanctum > .container {
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .ts-section--sanctum::after {
  opacity: 0.055;
}

/* ── 区块标题 ── */
.ts-section-head-main {
  min-width: 0;
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ts-section-head--center .ts-section-head-main {
  align-items: center;
  flex: 1 1 100%;
}

.ts-section-title,
.ts-section-head h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0;
}

.ts-section-head {
  align-items: center;
}

.ts-section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ts-section-head--center .ts-link-more {
  margin-top: 0.35rem;
}

.ts-section-head .ts-link-more {
  align-self: center;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.ts-section-lead {
  margin: 0;
  max-width: 36rem;
}

/* ── 数据条 ── */
.ts-stats--decorated .ts-stats-motto {
  display: block;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: color-mix(in srgb, var(--color-accent) 65%, var(--color-muted-text));
  margin-bottom: 1.15rem;
  line-height: 1.6;
}

.ts-stat-item {
  position: relative;
}

.ts-stat-item::before,
.ts-stat-item::after {
  content: "";
  position: absolute;
  width: 0.6rem;
  height: 0.6rem;
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.ts-stat-item::before {
  top: 0.45rem;
  left: 0.45rem;
  border-width: 1px 0 0 1px;
}

.ts-stat-item::after {
  right: 0.45rem;
  bottom: 0.45rem;
  border-width: 0 1px 1px 0;
}

/* ── 内页标题 ── */
.ts-page-header--decorated {
  text-align: center;
  margin-bottom: 1.75rem;
}

.ts-page-header--decorated .ts-section-title,
.ts-page-header--decorated h1 {
  justify-content: center;
}

.ts-page-header--decorated .ts-page-lead {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ── CTA 带 ── */
.ts-cta-band--sanctum {
  border-block: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
}

.ts-cta-band--sanctum .ts-cta-band-inner {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.ts-cta-band--sanctum .ts-cta-band-motto {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  opacity: 0.78;
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.ts-cta-band--sanctum .ts-cta-band-inner > div:first-of-type,
.ts-cta-band--sanctum .ts-cta-band-actions {
  width: 100%;
}

.ts-cta-band--sanctum .ts-cta-band-actions {
  justify-content: center;
}

/* ── 页脚 ── */
.ts-footer {
  position: relative;
}

.ts-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--color-accent) 35%, transparent) 20%,
    color-mix(in srgb, var(--color-accent) 35%, transparent) 80%,
    transparent
  );
  opacity: 0.65;
}

.ts-footer-grid,
.ts-footer-bottom {
  position: relative;
  z-index: 1;
}

.ts-footer-brand strong {
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
}

.ts-footer-links h4,
.ts-footer-contact h4 {
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: color-mix(in srgb, var(--color-accent) 75%, var(--color-text));
}

/* ── 法务卡片顶线 ── */
.ts-service-card {
  position: relative;
  overflow: hidden;
}

.ts-service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.4;
  z-index: 1;
}

@media (max-width: 639px) {
  .ts-section--sanctum {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .ts-divider--section {
    margin-bottom: 1.35rem;
  }

  .ts-title-accent {
    width: 2.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ts-section--sanctum::after {
    opacity: 0.025;
  }

  .ts-hero-deco,
  .ts-hero-scroll-hint {
    animation: none !important;
  }
}

/* ── 首页全屏 Hero 宗教氛围 ── */
.ts-hero--immersive,
.ts-hero--center,
.ts-hero--photo-hero {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5.5rem, 14vh, 8rem) 0 clamp(3.5rem, 10vh, 5rem);
}

.ts-hero-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ts-hero-deco {
  position: absolute;
  inset: 0;
}

.ts-hero-deco--rays {
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(201, 169, 98, 0.28) 0%, transparent 58%),
    radial-gradient(ellipse 60% 40% at 15% 85%, rgba(201, 169, 98, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 88% 75%, rgba(149, 213, 178, 0.1) 0%, transparent 48%);
  animation: ts-hero-rays 14s ease-in-out infinite alternate;
}

.ts-hero-deco--lotus {
  background-image: var(--ts-lotus-watermark);
  background-repeat: no-repeat;
  background-position: center 92%;
  background-size: min(420px, 72vw);
  opacity: 0.22;
  transform: translateY(8%);
}

.ts-hero-deco--pattern {
  background-image:
    linear-gradient(90deg, transparent calc(50% - 11rem), rgba(201, 169, 98, 0.18) calc(50% - 11rem), rgba(201, 169, 98, 0.18) calc(50% - 10.5rem), transparent calc(50% - 10.5rem)),
    linear-gradient(90deg, transparent calc(50% + 10.5rem), rgba(201, 169, 98, 0.18) calc(50% + 10.5rem), rgba(201, 169, 98, 0.18) calc(50% + 11rem), transparent calc(50% + 11rem));
  opacity: 0.55;
}

.ts-hero--immersive .ts-hero-overlay {
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(201, 169, 98, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.55) 0%, rgba(26, 22, 18, 0.35) 45%, rgba(18, 15, 12, 0.72) 100%);
}

.ts-hero--center .ts-hero-overlay,
.ts-hero--photo-hero .ts-hero-overlay {
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(201, 169, 98, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.55) 0%, rgba(26, 22, 18, 0.35) 45%, rgba(18, 15, 12, 0.72) 100%);
}

.ts-hero-scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.5rem;
  animation: ts-scroll-hint 2.4s ease-in-out infinite;
}

@keyframes ts-hero-rays {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}

@keyframes ts-scroll-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.45; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 0.85; }
}

/* ── 殿堂详情页 ── */
.ts-hall-hero {
  position: relative;
  min-height: min(52vh, 420px);
  display: flex;
  align-items: flex-end;
  padding: clamp(3rem, 10vh, 5rem) 0 2.5rem;
  color: #fff;
  background: var(--gradient-hero);
  overflow: hidden;
}

.ts-hall-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ts-hall-cover);
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.ts-hall-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 15, 12, 0.35) 0%, rgba(18, 15, 12, 0.82) 100%);
}

.ts-hall-hero-inner {
  position: relative;
  z-index: 1;
}

.ts-hall-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 98, 0.45);
  background: rgba(201, 169, 98, 0.15);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
}

.ts-hall-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.ts-hall-lead {
  max-width: 36rem;
  opacity: 0.9;
  line-height: 1.7;
}

.ts-hall-body {
  padding: 2rem 0 3rem;
}

.ts-hall-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.ts-hall-prose {
  max-width: 42rem;
}

.ts-hall-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--ts-radius);
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
  text-align: center;
}

.ts-hall-cta p {
  color: var(--color-muted-text);
  margin-bottom: 1rem;
}

.ts-hall-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
