/* styles.css */

/* 全局基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f7f7f9;
}

/* 配色：偏清爽专业的宠物医疗/社区风格 */
:root {
  --primary: #ff7b54;   /* 温暖橙色，亲和 */
  --primary-dark: #e46037;
  --secondary: #35a7ff; /* 清爽蓝色，专业感 */
  --bg-light: #ffffff;
  --border-light: #e5e5ea;
  --text-muted: #777;
}

/* 头部与导航 */
.header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 1rem 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.logo span {
  font-size: 0.9rem;
  font-weight: 400;
  margin-left: 0.5rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 顶部 Banner */
.hero {
  background-color: #fff;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border-light);
}

.hero-inner {
  display: grid;
  grid-template-columns: 2fr 1.4fr;
  gap: 1.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.hero-text p.subtitle {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(255, 123, 84, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(255, 123, 84, 0.25);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.hero-cta span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-image {
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  border-radius: 1.2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* 主体布局 */
.main {
  padding: 1.5rem 0 2.5rem;
}

.layout {
  display: grid;
  grid-template-columns: 3fr 1.2fr;
  gap: 1.5rem;
}

/* 内容卡片 */
.card {
  background-color: var(--bg-light);
  border-radius: 0.9rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0.7rem 0 0.3rem;
}

/* 首页正文段落 */
.home-content p {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  text-indent: 2em;
}

/* 列表页 */
.list {
  list-style: none;
  margin-top: 0.5rem;
}

.list li + li {
  border-top: 1px dashed var(--border-light);
}

.list-item {
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  padding: 0.7rem 0;
  align-items: flex-start;
}

.list-item img.thumb {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.list-item-content h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}

.list-item-content a {
  color: #222;
  text-decoration: none;
}

.list-item-content a:hover {
  color: var(--primary-dark);
}

.list-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.list-item-desc {
  font-size: 0.9rem;
  color: #555;
}

/* 侧边栏 */
.sidebar-block {
  margin-bottom: 1rem;
}

.sidebar-block h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.sidebar-list {
  list-style: none;
  font-size: 0.9rem;
}

.sidebar-list li + li {
  margin-top: 0.4rem;
}

.sidebar-list a {
  color: #333;
  text-decoration: none;
}

.sidebar-list a:hover {
  color: var(--primary-dark);
}

/* 文章页 */
.article-title {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.article-cover {
  margin: 0.5rem 0 1rem;
  text-align: center;
}

.article-cover img {
  max-width: 100%;
  border-radius: 0.8rem;
}

.article-content p {
  margin-bottom: 0.8rem;
  text-indent: 2em;
  font-size: 0.95rem;
}

.article-content h2 {
  font-size: 1.1rem;
  margin: 0.8rem 0 0.4rem;
}

/* 底部 */
.footer {
  border-top: 1px solid var(--border-light);
  background-color: #fafafa;
  padding: 1rem 0 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* 响应式：平板与移动端 */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-image {
    text-align: center;
    margin-top: 0.5rem;
  }
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    justify-content: flex-start;
  }
  .list-item {
    flex-direction: column;
  }
  .list-item img.thumb {
    width: 100%;
    height: 160px;
  }
}

