/* ========================================
   伶俐养生馆官网 - 简约风格样式表
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #5a8f7b;
  --primary-dark: #467a62;
  --primary-light: #e8f0ed;
  --secondary-color: #c4a35a;
  --text-dark: #2c3e2d;
  --text-body: #5a5a5a;
  --text-light: #8a8a8a;
  --bg-light: #fafaf8;
  --bg-white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-body);
  line-height: 1.7;
  background-color: var(--bg-light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', serif;
  color: var(--text-dark);
  line-height: 1.3;
}

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

ul {
  list-style: none;
}

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

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 2px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  font-size: 15px;
  color: var(--text-body);
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 143, 123, 0.3);
}

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

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

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

.btn-white:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ========================================
   首页 Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0ed 0%, #d4e4db 50%, #c9d9ce 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(90, 143, 123, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(196, 163, 90, 0.1) 0%, transparent 70%);
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%235a8f7b' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-subtitle {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--primary-color);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  letter-spacing: 8px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-body);
  margin-bottom: 40px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.6s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  font-size: 12px;
  letter-spacing: 2px;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary-color), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ========================================
   通用 Section 样式
   ======================================== */
.section-header {
  margin-bottom: 48px;
}

.section-header.center {
  text-align: center;
}

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

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-light);
}

/* ========================================
   理念 Section
   ======================================== */
.philosophy {
  padding: 100px 0;
  background: var(--bg-white);
}

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

.philosophy-item {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-light);
  transition: var(--transition);
}

.philosophy-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.philosophy-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.philosophy-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.philosophy-item p {
  font-size: 15px;
  color: var(--text-light);
}

/* ========================================
   关于我们
   ======================================== */
.about {
  padding: 100px 0;
  background: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-img-wrapper {
  position: relative;
  padding-bottom: 120%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img-placeholder span {
  font-size: 120px;
  font-family: 'Noto Serif SC', serif;
  color: rgba(255, 255, 255, 0.3);
}

.about-img-wrapper::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 3px solid var(--primary-color);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.about-content .section-title {
  margin-bottom: 24px;
}

.about-text {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Noto Serif SC', serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
}

/* ========================================
   服务项目
   ======================================== */
.services {
  padding: 100px 0;
  background: var(--bg-white);
}

.services-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  -webkit-overflow-scrolling: touch;
}

.services-grid::-webkit-scrollbar {
  height: 6px;
}

.services-grid::-webkit-scrollbar-track {
  background: transparent;
}

.services-grid::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

.services-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

.service-card {
  flex: 0 0 calc((100% - 72px) / 4);
  min-width: 260px;
  max-width: 300px;
  padding: 32px;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.service-card:hover {
  background: var(--bg-white);
  border-color: var(--primary-light);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card .service-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card .service-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}

.service-duration {
  display: inline-block;
  font-size: 13px;
  color: var(--primary-color);
  padding: 6px 16px;
  background: var(--primary-light);
  border-radius: 20px;
  margin-bottom: 20px;
}

/* 横向滚动容器 - 用于自动滚动 */
.services-scroll-wrapper {
  position: relative;
  overflow: visible;
  padding: 0 24px;
}

.services-scroll-wrapper .services-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 0 30px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  -webkit-overflow-scrolling: touch;
}

.services-scroll-wrapper .services-grid::-webkit-scrollbar {
  height: 6px;
}

.services-scroll-wrapper .services-grid::-webkit-scrollbar-track {
  background: transparent;
}

.services-scroll-wrapper .services-grid::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* 左右滚动按钮 */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.scroll-btn:hover {
  background: var(--primary-color);
  color: white;
}

.scroll-btn.prev {
  left: -24px;
}

.scroll-btn.next {
  right: -24px;
}

.scroll-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .services-grid {
    flex-wrap: nowrap;
    gap: 16px;
  }
  
  .service-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 200px;
    padding: 24px;
  }
  
  .scroll-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .scroll-btn.prev {
    left: 8px;
  }
  
  .scroll-btn.next {
    right: 8px;
  }
}

/* ========================================
   养生知识
   ======================================== */
.knowledge {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

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

.knowledge-card {
  position: relative;
  padding: 32px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

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

.knowledge-category {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.knowledge-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.knowledge-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

.knowledge-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  opacity: 0.15;
}

/* ========================================
   CTA 区域
   ======================================== */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.cta-content {
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
}

.cta-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* ========================================
   联系我们
   ======================================== */
.contact {
  padding: 100px 0;
  background: var(--bg-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info {
  display: grid;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 20px;
}

.contact-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.contact-text p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

/* 二维码预约区域 */
.contact-qrcode {
  background: var(--bg-light);
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.contact-qrcode h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.qrcode-desc {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.qrcode-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.qrcode-img {
  width: 240px;
  height: 240px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: white;
  padding: 12px;
}

.qrcode-placeholder {
  width: 240px;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.8;
  padding: 20px;
}

.qrcode-tips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.qrcode-tips p {
  font-size: 14px;
  color: var(--text-body);
  padding: 12px 8px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

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

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo-text {
  color: white;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  font-size: 16px;
  margin-bottom: 20px;
}

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

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

.footer-contact p {
  font-size: 14px;
  margin-bottom: 12px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
}

.footer-bottom a {
  color: var(--primary-color);
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
  .philosophy-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero-content {
    padding: 0 16px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .philosophy-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1;
  }
  
  .about-img-wrapper {
    padding-bottom: 80%;
  }
  
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links,
  .footer-contact {
    text-align: center;
  }
}

/* ========================================
   动画效果
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
