/* ===== 首页专用样式 ===== */

/* Hero轮播 */
.hero-swiper {
  position: relative;
}

.hero-slide {
  height: 580px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 600px;
}

.hero-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.hero-content h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 28px;
  opacity: 0.92;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.swiper-button-prev,
.swiper-button-next {
  color: #fff;
  background: rgba(255,255,255,0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 16px;
}

.swiper-pagination-bullet {
  background: rgba(255,255,255,0.6);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* 统计数字 */
.stats-bar {
  background: var(--primary);
  padding: 28px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item {
  color: #fff;
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.85;
}

/* 通用section */
.section {
  padding: 70px 0;
}

.section-gray {
  background: #f7f2ec;
}

.mt-40 { margin-top: 40px; }
.text-center { text-align: center; }

/* 宠物网格 */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pet-card-img-wrap {
  position: relative;
  overflow: hidden;
}

.pet-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pet-card:hover .pet-card-img {
  transform: scale(1.04);
}

.pet-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.pet-card-badge.new {
  background: var(--secondary);
}

.pet-card-badge.urgent {
  background: #e74c3c;
}

.pet-card-breed {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.gender-icon.male { color: #2980b9; font-size: 14px; }
.gender-icon.female { color: #e91e8c; font-size: 14px; }

.pet-health-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.health-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f0f8f0;
  color: var(--secondary);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.btn-like {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-like:hover, .btn-like.liked {
  color: #e74c3c;
  background: #fff0f0;
}

.btn-like.liked i {
  font-weight: 900;
}

/* 领养步骤 */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step-item {
  flex: 1;
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
}

.step-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #fff;
  font-size: 24px;
}

.step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.step-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.step-item p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--primary);
  font-size: 20px;
  margin-top: 32px;
}

/* 宠物介绍Tab */
.pet-intro-tabs {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tab-btns {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: #fdf8f3;
}

.tab-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
}

.tab-content {
  padding: 36px;
}

.tab-content.hidden {
  display: none;
}

.pet-intro-card {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  align-items: center;
}

.pet-intro-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.pet-intro-info h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

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

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.pros, .cons {
  padding: 16px;
  border-radius: var(--radius);
}

.pros {
  background: #f0f8f0;
}

.cons {
  background: #fff8f0;
}

.pros h4, .cons h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pros h4 { color: var(--secondary); }
.cons h4 { color: var(--primary); }

.pros li, .cons li {
  font-size: 13px;
  color: var(--text-light);
  padding: 3px 0;
  padding-left: 12px;
  position: relative;
}

.pros li::before, .cons li::before {
  content: '·';
  position: absolute;
  left: 0;
  font-weight: 700;
}

.pros li::before { color: var(--secondary); }
.cons li::before { color: var(--primary); }

/* 社区动态 */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.community-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

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

.community-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.community-card-body {
  padding: 18px;
}

.community-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.community-author {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
}

.community-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
}

.community-card p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.community-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.community-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.community-stats .fa-heart { color: #e74c3c; }
.community-stats .fa-comment { color: var(--primary); }

/* 知识科普 */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.knowledge-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  display: block;
}

.knowledge-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  color: var(--text);
}

.knowledge-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
}

.knowledge-icon.vaccine { background: #fff3e8; color: var(--primary); }
.knowledge-icon.deworm { background: #e8f4f8; color: #2980b9; }
.knowledge-icon.food { background: #edf7ee; color: var(--secondary); }
.knowledge-icon.health { background: #fef0f0; color: #e74c3c; }

.knowledge-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* 响应式 */
@media (max-width: 1100px) {
  .pets-grid { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero-content h1 { font-size: 30px; }
  .hero-slide { height: 420px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pets-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { flex-direction: column; align-items: stretch; }
  .step-arrow { transform: rotate(90deg); margin: 0 auto; }
  .pet-intro-card { grid-template-columns: 1fr; }
  .pet-intro-img img { height: 220px; }
  .community-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .pros-cons { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .pets-grid { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
