/* ============================================
   重庆龙居山陵园 - 全局样式表
   治愈系色彩 · SEO优化 · 响应式设计
   ============================================ */

/* ---- CSS变量定义 ---- */
:root {
  --primary: #2D5A3D;
  --primary-dark: #1E3D2A;
  --primary-light: #4A7C5C;
  --accent: #C4A35A;
  --accent-light: #D4B978;
  --bg-warm: #FAFAF7;
  --bg-cream: #F5F0E8;
  --bg-white: #FFFFFF;
  --text-main: #3D3D3D;
  --text-light: #6B6B6B;
  --text-muted: #9A9A9A;
  --border: #E8E4DC;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* ---- 基础重置 ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: var(--bg-warm);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

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

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

/* ---- 顶部联系栏 ---- */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-bar-item .icon {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.top-bar-phone {
  font-weight: 600;
  color: var(--accent-light);
  font-size: 14px;
}

.top-bar-phone:hover {
  color: #fff;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-right a {
  opacity: 0.75;
}

.top-bar-right a:hover {
  opacity: 1;
  color: var(--accent-light);
}

/* ---- 主导航 ---- */
.main-header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: 2px;
}

.logo-slogan {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 16px;
  font-size: 15px;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.header-phone:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.header-phone .phone-icon {
  width: 18px;
  height: 18px;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* ---- 移动端菜单 ---- */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-white);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.mobile-nav-close button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
}

.mobile-nav-link {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

.mobile-nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-phone {
  margin-top: 24px;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ---- 页面标题区（面包屑） ---- */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.02);
  border-radius: 50%;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb-sep {
  opacity: 0.5;
}

/* ---- 区块通用 ---- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-cream);
}

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

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.section-title-bar {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #B08D45;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--bg-cream);
}

/* ---- 卡片 ---- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---- 页脚 ---- */
.main-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand .logo-name {
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}

.footer-brand .logo-slogan {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
}

.footer-desc {
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}

.footer-contact-item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

.footer-contact-item a {
  color: rgba(255,255,255,0.8);
}

.footer-contact-item a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: var(--accent-light);
}

/* ---- 浮动联系按钮 ---- */
.float-contact {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-btn-phone {
  background: var(--primary);
}

.float-btn-top {
  background: var(--accent);
}

.float-btn svg {
  width: 22px;
  height: 22px;
}

/* ---- 返回顶部 ---- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 30px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: #B08D45;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---- 动画 ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- 网格布局 ---- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---- 响应式断点 ---- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav,
  .header-phone {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .top-bar .container {
    justify-content: center;
    text-align: center;
  }
  
  .top-bar-right {
    display: none;
  }
  
  .section {
    padding: 56px 0;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .page-title {
    font-size: 26px;
  }
  
  .page-header {
    padding: 40px 0 36px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .logo-name {
    font-size: 16px;
    letter-spacing: 1px;
  }
  
  .logo-slogan {
    display: none;
  }
  
  .section {
    padding: 48px 0;
  }
}
