/* ========================================
   瑞安市爱心阳光团队 网站样式
   主色调：翠绿生机 + 金色点缀
   适合老年人阅读：大字体、高对比度
   ======================================== */

/* --- 全局重置与基础 --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #27ae60;
  --primary-dark: #1a7a40;
  --primary-light: #eefaf3;
  --accent: #f39c12;
  --accent-light: #fef9e7;
  --bg: #fafaf5;
  --bg-section: #ffffff;
  --text: #2c2c2c;
  --text-light: #666666;
  --border: #e0e0d8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
}

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

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  min-height: 100vh;
}

/* --- 导航栏 --- */
.navbar {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.nav-logo-text {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 15px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
}

/* 手机端汉堡菜单 */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* --- 头部横幅 --- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2ecc71 100%);
  color: #fff;
  padding: 60px 24px 50px;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto 24px;
}

.hero-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  text-decoration: none;
  padding: 12px 36px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s;
}

.hero-btn:hover {
  background: #e09e00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243,156,18,0.4);
}

/* --- 通用内容区 --- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

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

.section-title h2 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
}

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

/* --- 首页：服务卡片 --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 3px solid var(--primary);
}

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

.service-card .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

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

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

/* --- 首页：数据展示 --- */
.stats-bar {
  background: var(--primary);
  color: #fff;
  padding: 40px 24px;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-item .number {
  font-size: 42px;
  font-weight: bold;
  color: var(--accent);
}

.stat-item .label {
  font-size: 15px;
  opacity: 0.85;
  margin-top: 4px;
}

/* --- 首页：新闻列表 --- */
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-section);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

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

.news-card .img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #d5f5e3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--primary);
}

.news-card .content {
  padding: 20px;
}

.news-card .date {
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

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

/* --- 关于我们页面 --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 60px;
}

.about-intro .text h2 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-intro .text p {
  font-size: 15px;
  line-height: 2;
  color: var(--text-light);
}

.about-intro .img-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-light), #d5f5e3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: var(--primary);
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 40px;
  margin-top: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--primary-light);
}

.timeline-item .year {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary);
}

.timeline-item p {
  color: var(--text-light);
  font-size: 14px;
  margin-top: 4px;
}

/* --- 服务项目页面 --- */
.service-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.service-detail-card {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.service-detail-card h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-detail-card h3 span {
  font-size: 28px;
}

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

.service-detail-card .features {
  margin-top: 16px;
  padding-left: 20px;
}

.service-detail-card .features li {
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}

/* --- 联系我们页面 --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

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

.contact-info p {
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-info .icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.contact-form {
  background: var(--bg-section);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

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

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

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

.form-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 36px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* --- 页脚 --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 24px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer p,
.footer a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* --- 页面横幅（子页面） --- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}

.page-banner h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.page-banner p {
  opacity: 0.85;
  font-size: 15px;
}

/* --- 面包屑 --- */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 15px;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .section {
    padding: 32px 16px;
  }

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

/* --- 通用工具类 --- */
.text-center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }

/* --- 新闻动态页面 --- */
.news-page-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-page-item {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.news-page-item:last-child {
  border-bottom: none;
}

.news-page-item .date-box {
  min-width: 72px;
  text-align: center;
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 12px 8px;
  height: fit-content;
}

.news-page-item .date-box .day {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  display: block;
}

.news-page-item .date-box .month {
  font-size: 13px;
  color: var(--text-light);
}

.news-page-item .info h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

.news-page-item .info p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .news-page-item {
    flex-direction: column;
    gap: 12px;
  }

  .news-page-item .date-box {
    flex-direction: row;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
  }
}
