
/* 全站统一字体：思源黑体（Noto Sans SC，SIL OFL 免费商用），字体文件自托管，不依赖外部 CDN */
@font-face {
  font-family: 'Source Han Sans SC';
  src: url('../fonts/SourceHanSansSC.woff2?v=1') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary-color: #1a5c3c;
  --primary-dark: #0f4028;
  --secondary-color: #c9a962;
  --secondary-dark: #b0904a;
  --bg-light: #f8f9fa;
  --text-dark: #333333;
  --text-light: #666666;
  --sidebar-width: 260px;
}

body {
  font-family: 'Source Han Sans SC', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  color: var(--text-dark);
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Han Sans SC', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

/* 富文本正文：强制统一思源黑体，覆盖编辑器/粘贴带入的内联 font-family（图标字体除外） */
.prose,
.prose *:not(i):not(.fa):not([class^='fa-']) {
  font-family: 'Source Han Sans SC', 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif !important;
}

/* 墓园介绍正文：固定高度与右栏图片（Tailwind h-96 = 24rem）严格等高，
   文字超出时在左栏内部滚动，不撑高左栏、不顶下页面 */
.about-intro-scroll {
  height: 24rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #e5e7eb;
  -webkit-overflow-scrolling: touch;
}

.about-intro-scroll::-webkit-scrollbar {
  width: 6px;
}

.about-intro-scroll::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 3px;
}

.about-intro-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.about-intro-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* 顶部右上角电话 */
.top-tel {
  position: fixed;
  top: 15px;
  right: 25px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #1a5c3c 0%, #2f7a55 100%);
  padding: 12px 26px;
  border-radius: 28px;
  border: 1px solid rgba(201, 169, 98, 0.75);
  box-shadow: 0 6px 22px rgba(26, 92, 60, 0.4), 0 0 0 4px rgba(201, 169, 98, 0.16);
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.top-tel:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 92, 60, 0.5), 0 0 0 5px rgba(201, 169, 98, 0.22);
}

.top-tel i {
  font-size: 20px;
  color: #e3c77f;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .top-tel {
    position: static;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    font-size: 13px;
    color: var(--primary-color);
  }
  .top-tel i {
    color: var(--secondary-color);
  }
}

/* 修复 Safari 点击链接/按钮出现白色焦点框和点击高亮的问题 */
a, button {
  -webkit-tap-highlight-color: transparent;
}

a:focus,
button:focus {
  outline: none;
}

/* 键盘 Tab 导航时仍保留焦点提示（不影响鼠标点击） */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* 修复 Safari 页面加载时 transition 从默认值动画导致的全站白框闪烁 */
body.preload *,
body.preload *::before,
body.preload *::after {
  transition: none !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* 团队管理模块 */
.team-list li {
  background: #ffffff;
  color: #374151;
  transition: all 0.3s ease;
}

.team-list li:hover {
  background: rgba(26, 92, 60, 0.1);
}

.team-list li.active {
  background: var(--primary-color);
  color: #ffffff;
}

.team-image {
  position: relative;
}

.team-image .team-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
  border-radius: 0 0 8px 8px;
}

.team-image .team-info h3 {
  background: transparent;
  color: #ffffff;
  padding: 0 0 0 12px;
  border-left: 3px solid #c9a962;
  border-radius: 0;
}

.team-image .team-info p {
  color: rgba(255, 255, 255, 0.88);
}

/* 资质荣誉模块背景：简约圆点图案 */
.honors-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(26, 92, 60, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.honors-section > * {
  position: relative;
  z-index: 1;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.contact-info-item {
  background: transparent;
  padding: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0a2f1c);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: #ffffff;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background:
    linear-gradient(180deg, rgba(26, 92, 60, 0.85), rgba(15, 64, 40, 0.95)),
    url("../../images/banner1.jpg") bottom center / cover no-repeat;
  background-color: rgba(26, 92, 60, 0.8);
  color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo .logo-icon {
  font-size: 48px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.sidebar-logo .logo-icon img {
  display: block;
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sidebar-logo h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav ul li {
  margin-bottom: 5px;
}

.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  padding: 14px 25px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav ul li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-nav ul li a.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--secondary-color);
  border-left-color: var(--secondary-color);
  font-weight: 500;
}

.sidebar-nav ul li a i {
  margin-right: 12px;
  font-size: 16px;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* 允许 grid/flex 子项收缩到内容固有宽度以下，防止大图把容器撑出横向滚动 */
.main-content .grid {
  min-width: 0;
}

.main-content .grid > * {
  min-width: 0;
}

.main-content img {
  max-width: 100%;
}

.top-bar {
  display: block;
  background: transparent;
  padding: 0;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 999;
}

.top-bar .mobile-logo,
.top-bar .menu-toggle {
  display: none;
}

.top-bar .mobile-logo {
  align-items: center;
}

.top-bar .mobile-logo i {
  font-size: 28px;
  color: var(--primary-color);
  margin-right: 10px;
}

.top-bar .mobile-logo img {
  height: 36px;
  max-width: 140px;
  object-fit: contain;
  margin-right: 10px;
}

.top-bar .mobile-logo span {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
}

.top-bar .menu-toggle {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--primary-color);
  cursor: pointer;
}

.banner-carousel {
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.banner-carousel .slides {
  display: flex;
  transition: transform 0.5s ease;
}

.banner-carousel .slide {
  min-width: 100%;
  position: relative;
}

.banner-carousel .slide img {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
  }

.banner-carousel .slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 92, 60, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-carousel .slide-content {
  text-align: center;
  color: #ffffff;
  padding: 0 20px;
  transform: translateY(-165px);
}

.banner-carousel .slide-content h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.banner-carousel .slide-content p {
  font-size: 20px;
  margin-bottom: 24px;
  max-width: 600px;
}

.banner-carousel .prev,
.banner-carousel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.banner-carousel .prev {
  left: 20px;
}

.banner-carousel .next {
  right: 92px;
}

.banner-carousel .prev:hover,
.banner-carousel .next:hover {
  background: rgba(255, 255, 255, 0.4);
}

.banner-carousel .dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10000;
}

.banner-carousel .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s ease;
}

.banner-carousel .dot.active {
  background: #ffffff;
}

.banner-carousel .scroll-down {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 24px;
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 10000;
  border: none;
  background: transparent;
  padding: 0;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(10px);
  }
  60% {
    transform: translateX(-50%) translateY(5px);
  }
}

.process-carousel {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.process-carousel:active {
  cursor: grabbing;
}

.process-track {
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s ease;
  padding: 20px 0;
}

.process-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
  transition: transform 0.3s ease;
}

.process-item:hover {
  transform: translateY(-5px);
}

.process-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.process-item h4 {
  margin-top: 18px;
}

.process-item:hover .process-image {
  box-shadow: 0 8px 25px rgba(26, 92, 60, 0.25);
}

.process-arrow {
  flex-shrink: 0;
  padding: 0 10px;
}

.process-carousel::-webkit-scrollbar {
  height: 6px;
}

.process-carousel::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 3px;
}

.process-carousel::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.process-carousel::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== 购墓流程新样式（2行4列彩色步骤块） ===== */
.process-flow {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.process-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.process-step {
  flex: 1;
  max-width: 180px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
  border-radius: 28px;
  padding: 18px 12px;
  position: relative;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.process-step::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 32px;
  z-index: -1;
}

.ps-purple { background: #1a5c3c; }
.ps-purple::before { background: rgba(26, 92, 60, 0.25); }

.ps-red { background: #8a6d3b; }
.ps-red::before { background: rgba(201, 169, 98, 0.3); }

.ps-green { background: #3d7060; }
.ps-green::before { background: rgba(61, 112, 96, 0.25); }

.ps-blue { background: #5c7a4a; }
.ps-blue::before { background: rgba(92, 122, 74, 0.25); }

.process-flow .process-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  color: #8a7e6b;
  font-size: 14px;
  letter-spacing: 1px;
}

.process-flow .process-arrow i {
  font-size: 18px;
}

/* 移动端：购墓流程 4列紧凑展示，自动换行成2行 */
@media (max-width: 768px) {
  .process-flow {
    gap: 20px;
  }
  .process-row {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .process-step {
    flex: 0 0 calc(25% - 6px);
    max-width: calc(25% - 6px);
    min-height: 68px;
    font-size: 13px;
    border-radius: 16px;
    padding: 14px 10px;
    line-height: 1.5;
  }
  .process-step::before {
    inset: -4px;
    border-radius: 19px;
  }
  .process-flow .process-arrow {
    display: none;
  }
}

.park-tabs button {
  padding: 12px 16px;
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.park-tabs button:hover {
  background: rgba(26, 92, 60, 0.1);
}

.park-tabs button.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.park-carousel {
  position: relative;
  width: 100%;
  height: 500px;
  perspective: 1200px;
  overflow: hidden;
  touch-action: pan-y;
}

.park-image {
  position: absolute;
  top: 0;
  left: 50%;
  width: 70%;
  height: 100%;
  transform-origin: center center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}

.park-image.center {
  transform: translateX(-50%) scale(1);
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
}

.park-image.left-1 {
  transform: translateX(-50%) translateX(-15%) scale(0.85);
  z-index: 8;
  opacity: 0.9;
}

.park-image.left-2 {
  transform: translateX(-50%) translateX(-25%) scale(0.75);
  z-index: 6;
  opacity: 0.7;
}

.park-image.left-3 {
  transform: translateX(-50%) translateX(-32%) scale(0.68);
  z-index: 4;
  opacity: 0.5;
}

.park-image.left-4 {
  transform: translateX(-50%) translateX(-38%) scale(0.62);
  z-index: 2;
  opacity: 0.35;
}

.park-image.left-5 {
  transform: translateX(-50%) translateX(-43%) scale(0.58);
  z-index: 1;
  opacity: 0.2;
}

.park-image.right-1 {
  transform: translateX(-50%) translateX(15%) scale(0.85);
  z-index: 8;
  opacity: 0.9;
}

.park-image.right-2 {
  transform: translateX(-50%) translateX(25%) scale(0.75);
  z-index: 6;
  opacity: 0.7;
}

.park-image.right-3 {
  transform: translateX(-50%) translateX(32%) scale(0.68);
  z-index: 4;
  opacity: 0.5;
}

.park-image.right-4 {
  transform: translateX(-50%) translateX(38%) scale(0.62);
  z-index: 2;
  opacity: 0.35;
}

.park-image.right-5 {
  transform: translateX(-50%) translateX(43%) scale(0.58);
  z-index: 1;
  opacity: 0.2;
}

.park-image.hidden {
  display: none;
}

.tab-nav {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

.tab-nav button {
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-light);
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab-nav button.active {
  color: var(--primary-color);
}

.tab-nav button.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
}

.footer {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
  padding: 40px 0;
  border-top: 2px solid var(--secondary-color);
}

.footer a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  background: var(--primary-dark);
  padding: 20px 0;
  text-align: center;
  color: #b8d5c5;
  font-size: 14px;
  border-top: 1px solid rgba(201, 169, 98, 0.3);
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===== iPad 竖屏及以下：左侧导航变为抽屉式 ===== */
@media (max-width: 992px) {
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .main-content {
    margin-left: 0;
  }

  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .top-bar .mobile-logo {
    display: flex;
  }

  .top-bar .menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 区块纵向间距收紧 */
  .main-content section[class*="py-16"] {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .banner-carousel {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .banner-carousel .slide img {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .banner-carousel .slide-content {
    padding-left: 40px;
    padding-right: 40px;
  }

  .banner-carousel .slide-content h2 {
    font-size: 32px;
  }

  /* footer 在 iPad 竖屏及以下统一单栏堆叠，二维码列居中 */
  .footer .container > .grid {
    grid-template-columns: 1fr;
  }

  .footer .container > .grid > [class*="col-span"] {
    grid-column: auto;
  }

  .footer .md\:col-span-2 {
    text-align: center;
  }
}

/* ===== 手机端（≤768px） ===== */
@media (max-width: 768px) {
  .banner-carousel {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .banner-carousel .slide img {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .banner-carousel .slide-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .banner-carousel .slide-content h2 {
    font-size: 26px;
    letter-spacing: 1px;
  }

  .banner-carousel .slide-content p {
    font-size: 18px;
  }

  .banner-carousel .next {
    right: 65px;
  }

  /* 资讯 Tab 改为横向滑动，避免换行后高低不平 */
  .tab-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .tab-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-nav button {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* 购墓流程响应式 */
  .process-track {
    gap: 12px;
    padding: 12px 0;
  }

  .process-item {
    min-width: 80px;
  }

  .process-item .process-image img {
    width: 72px !important;
    height: 72px !important;
  }

  .process-item h4 {
    font-size: 14px;
  }

  .process-arrow {
    padding: 0 4px;
  }

  .process-arrow i {
    font-size: 18px;
  }
}

.side-bar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 1;
}

/* 当 side-bar 位于 banner 图区域时，图标和文字显示白色以提高对比度 */
.side-bar.on-banner .side-bar-item i {
  color: #ffffff;
}

.side-bar.on-banner .side-bar-text {
  color: #ffffff;
}

.side-bar-item {
  width: 72px;
  height: 72px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.side-bar-item:hover {
  background: linear-gradient(145deg, rgba(26, 92, 60, 0.75), rgba(15, 64, 40, 0.75));
}

.side-bar-item:hover i {
  color: #ffffff;
  transform: scale(1.1);
}

.side-bar-item:hover .side-bar-text {
  color: #ffffff;
}

.side-bar-item i {
  font-size: 24px;
  color: var(--primary-color);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
}

.side-bar-text {
  font-size: 11px;
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  line-height: 1.2;
}

.side-bar-tooltip {
  position: absolute;
  left: -170px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 8px 25px rgba(26, 92, 60, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.side-bar-tooltip::after {
  content: '';
  position: absolute;
  left: auto;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border: 10px solid transparent;
  border-left-color: var(--primary-color);
}

.side-bar-item.active .side-bar-tooltip {
  opacity: 1;
  visibility: visible;
  left: -160px;
  transform: translateY(-50%) translateX(5px);
}

.side-bar-qr {
  position: absolute;
  left: -140px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.side-bar-qr img {
  width: 120px;
  height: 120px;
  display: block;
}

.side-bar-qr p {
  display: none;
}

.side-bar-item.active .side-bar-qr {
  opacity: 1;
  visibility: visible;
  left: -130px;
  transform: translateY(-50%) translateX(5px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin: 0;
}

.modal-close {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #ffffff;
  color: var(--text-dark);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination button.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .side-bar {
    right: 10px;
    top: 32%;
    gap: 6px;
  }

  .side-bar-item {
    width: 45px;
    height: 45px;
  }

  .side-bar-item i {
    font-size: 18px;
  }

  .side-bar-text {
    font-size: 10px;
    line-height: 1.1;
  }

  .modal-content {
    padding: 20px;
  }
}

/* ===== 小屏手机（≤640px）：间距、字号、banner 进一步收紧 ===== */
@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .main-content section[class*="py-16"] {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  /* 首页 hero 高度降到约 47vh（原70vh减少1/3），露出下方内容入口 */
  .banner-carousel,
  .banner-carousel .slide img {
    height: 47vh;
    height: 47dvh;
    min-height: 260px;
  }

  .banner-carousel .slide-content {
    padding: 0 16px;
  }

  .banner-carousel .slide-content h2 {
    font-size: 24px;
    line-height: 1.4;
  }

  .banner-carousel .slide-content p {
    font-size: 17px;
    margin-bottom: 16px;
  }

  .banner-carousel .prev,
  .banner-carousel .next {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .banner-carousel .prev {
    left: 10px;
  }

  .banner-carousel .next {
    right: 60px;
  }

  /* 内页 banner 降高 */
  .main-content img.h-64 {
    height: 12rem;
  }

  /* 首页服务 6 宫格 / 卡片栅格收紧间距 */
  .main-content .grid.gap-6 {
    gap: 12px;
  }

  .main-content .grid.gap-8 {
    gap: 20px;
  }

  .main-content .grid.gap-12 {
    gap: 24px;
  }

  /* 购墓流程横向条目 */
  .process-track {
    gap: 12px;
    padding: 12px 0;
  }

  .process-item {
    min-width: 84px;
  }

  .process-arrow {
    padding: 0 2px;
  }

  .process-arrow i {
    font-size: 16px;
  }

  /* 新闻列表卡片：图缩小 */
  .card.p-4 .w-32.h-24 {
    width: 96px;
    height: 72px;
  }

  /* footer */
  .footer {
    padding: 0;
  }

  .footer .container > .grid {
    display: none;
  }

  .footer h4 {
    margin-bottom: 14px;
  }

  .footer-bottom {
    padding: 16px 0;
    font-size: 12px;
  }

  .footer-bottom p {
    margin: 4px 0;
  }

  /* 团队模块 */
  .team-list li {
    padding: 12px;
  }

  .team-image {
    margin-top: 0;
  }

  .top-bar {
    padding: 10px 16px;
  }

  .top-bar .mobile-logo span {
    font-size: 16px;
  }

  /* 分页器按钮可横向滚动 */
  .pagination {
    flex-wrap: wrap;
  }
}

/* ===== 窄屏手机（≤480px）：右侧悬浮条只留图标，减少遮挡 ===== */
@media (max-width: 480px) {
  .side-bar {
    right: 8px;
    gap: 6px;
  }

  .side-bar-item {
    width: 42px;
    height: 42px;
  }

  .side-bar-text {
    display: none;
  }

  .banner-carousel .next {
    right: 56px;
  }

  .banner-carousel .slide-content h2 {
    font-size: 22px;
  }
}

/* ===== iPad 横屏（993px–1024px）细调：侧栏略窄、内容留白收敛 ===== */
@media (min-width: 993px) and (max-width: 1100px) {
  :root {
    --sidebar-width: 230px;
  }

  .sidebar-logo {
    padding: 24px 16px;
  }

  .sidebar-logo .logo-icon {
    font-size: 40px;
  }

  .sidebar-logo h1 {
    font-size: 18px;
  }

  .sidebar-nav ul li a {
    padding: 12px 18px;
    font-size: 14px;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* 墓园环境自动滚动 */
.env-scroll-wrapper {
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
  padding-bottom: 16px;
}

.env-scroll-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: env-scroll 30s linear infinite;
}

.env-scroll-wrapper:hover .env-scroll-track {
  animation-play-state: paused;
}

@keyframes env-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ===== 移动端墓园环境：单卡片 + 手触滑动 ===== */
@media (max-width: 768px) {
  .env-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .env-scroll-wrapper::-webkit-scrollbar {
    display: none;
  }
  .env-scroll-track {
    animation: none !important;
    width: max-content;
  }
  .env-scroll-track > div {
    min-width: 100vw;
    max-width: 100vw;
    scroll-snap-align: center;
  }
}

/* ===== 核心服务图标：悬停旋转一圈 ===== */
.service-icon {
  transition: transform 1.2s ease;
}

#services .card:hover .service-icon {
  transform: rotate(360deg);
}

/* ===== 移动端：核心服务卡片隐藏描述文字 ===== */
@media (max-width: 768px) {
  #services .card p {
    display: none;
  }
  #services .card h3 {
    margin-bottom: 0;
  }
}

/* ===== 移动端：资质荣誉 3 列缩小 ===== */
@media (max-width: 768px) {
  .honors-grid img {
    height: 7rem !important; /* h-28 = 112px */
  }
  .honors-grid .absolute.top-4.right-4 {
    width: 1.75rem;
    height: 1.75rem;
    top: 0.5rem;
    right: 0.5rem;
  }
  .honors-grid .absolute.top-4.right-4 i {
    font-size: 0.75rem;
  }
}

/* ===== 移动端：联系我们地图确保显示 ===== */
@media (max-width: 768px) {
  #contact .relative.grid {
    position: relative;
    z-index: 1;
  }
  #contact .absolute.inset-0.bg-white\/90 {
    z-index: 0;
  }
  #contact .w-full.h-96 {
    min-height: 260px;
    height: 260px;
  }
}

/* ===== 园区展示灯箱弹窗 ===== */
.park-lightbox-panel {
  animation: lightbox-in 0.3s ease;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
