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

/* === Banner / Carousel === */
.banner {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  border-radius: 0;
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  /*object-fit: cover;*/
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 100%);
  display: flex;
  align-items: center;
  padding: 0 80px;
}

.banner-text {
  max-width: 500px;
  color: #fff;
}

.banner-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.banner-text p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
  line-height: 1.6;
}

.banner-nav {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.banner-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

.banner-arrow.prev {
  left: 24px;
}

.banner-arrow.next {
  right: 24px;
}

/* === Hot Breeds === */
.breed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.breed-card {
  text-align: center;
  cursor: pointer;
}

.breed-card .card-img {
  aspect-ratio: 1;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.breed-card .card-body {
  padding: 16px;
}

.breed-card .breed-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.breed-card .breed-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === News List === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card .card-img {
  aspect-ratio: 16/9;
}

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

.knowledge-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.knowledge-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(255, 107, 53, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.knowledge-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.knowledge-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .breed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .knowledge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .banner {
    height: 320px;
  }
  .banner-overlay {
    padding: 0 24px;
  }
  .banner-text h2 {
    font-size: 1.5rem;
  }
  .banner-text p {
    font-size: 0.9rem;
  }
  .breed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .banner {
    height: 240px;
  }
  .banner-arrow {
    display: none;
  }
}
