/*
 * 居家乐网站公共样式表
 * 颜色和排版参考现代医疗与养老网站的最佳实践：
 * - 使用深浅不同的绿色形成层次感，营造宁静、和谐的氛围【539116042869586†L626-L670】。
 * - 大量留白和一致的布局提高可读性【539116042869586†L668-L671】。
 * - 高对比度文字确保老年人和视障用户易于阅读【456297070205674†L230-L238】。
 * - 所有元素采用响应式设计，适配桌面和移动端【456297070205674†L230-L233】。
 */

:root {
  /* 主色调：深绿色，体现安心、可靠 */
  --primary: #2d6a4f;
  /* 次色调：薄荷绿，营造清新感 */
  --secondary: #95d5b2;
  /* 强调色：明亮的青柠绿，用于按钮和呼叫行动 */
  --accent: #8ac926;
  /* 背景色 */
  --light: #f9f9f9;
  /* 深色文本 */
  --text: #333333;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light);
}

/* 顶部导航栏 */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  font-size: 1.6rem;
  font-weight: bold;
}

nav {
  position: relative;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  position: relative;
}

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

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* 英雄区 */
.hero {
  position: relative;
  background-image: url("assets/hero_bg.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 6rem 1rem;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
}

.hero .content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: #76b820; /* 深一点的强调色 */
}

/* 公共区块样式 */
.section {
  padding: 4rem 1rem;
}

.section .container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

/* 卡片列表 */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

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

.card img {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.card p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #555555;
}

/* 产品价格卡片 */
.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.product-card h4 {
  margin: 0 0 0.5rem;
  color: var(--primary);
}

.product-card .price {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 0.5rem 0 1rem;
  font-weight: bold;
}

.product-card ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0 0 1rem;
}

.product-card ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
}

.product-card ul li::before {
  content: "✔";
  color: var(--secondary);
  position: absolute;
  left: 0;
  top: 0;
}

.product-card .btn {
  align-self: stretch;
  text-align: center;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

input[type="text"], input[type="tel"], input[type="email"], textarea, select, input[type="date"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

textarea {
  height: 120px;
  resize: vertical;
}

/* 页脚 */
footer {
  background-color: var(--primary);
  color: #ffffff;
  padding: 2rem 1rem;
}

footer .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

footer a {
  color: var(--secondary);
  text-decoration: none;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--primary);
    padding: 1rem 0;
    display: none;
  }
  nav ul.show {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
}