/* FurPawJoy Frontend Styles */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #2563eb;
  --bg-hero: #eef2ff;
  --bg-gray: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 14px;
  --shadow: 0 2px 16px rgba(37,99,235,.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #333;
  line-height: 1.7;
}

/* Hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* Pet Cards */
.pet-card {
  transition: transform .2s, box-shadow .2s;
  border-radius: 10px;
}
.pet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12) !important;
}
.pet-icon { font-size: 2.5rem; }

/* Article Content */
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-content h1,
.article-content h2,
.article-content h3 {
  margin-top: 1.8rem;
  margin-bottom: .8rem;
  font-weight: 700;
}
.article-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1rem 0;
}
.article-content p { margin-bottom: 1.2rem; }
.article-content ul,
.article-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: #666;
  margin: 1.5rem 0;
}
.article-content code {
  background: #f4f6fb;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

/* Navbar */
.navbar-brand { font-size: 1.25rem; letter-spacing: -.01em; }

/* Footer */
footer { color: #dee2e6; }
footer h5,
footer h6 { color: #fff; }
.footer-link { color: #adb5bd; text-decoration: none; }
.footer-link:hover { color: #fff; text-decoration: none; }

/* Navbar hover dropdown */
.nav-dropdown-hover:hover > .dropdown-menu {
  display: block;
  margin-top: 0;
}
.nav-dropdown-hover > .dropdown-toggle:active {
  pointer-events: none;
}
.nav-dropdown-hover > .dropdown-menu {
  margin-top: 0;
}

/* ========== HOME PAGE ========== */

/* Hero */
.home-hero {
  background: var(--bg-hero);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 72px 0 60px;
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}
.hero-inner {
  max-width: 600px;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero-accent { color: var(--primary); }
.hero-accent-light { color: #93c5fd; }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn-primary {
  background: var(--primary);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
}
.hero-btn-primary:hover { background: var(--primary-dark); }
.home-hero--quiz {
  background: linear-gradient(135deg, #2d0d6b 0%, #6c63ff 65%, #a78bfa 100%);
  background-size: cover;
  background-position: center;
}
/* Carousel: 固定高度防止切换抖动，不覆盖 Bootstrap display 控制 */
#heroCarousel .home-hero { min-height: 440px; }
@media (max-width: 768px) {
  #heroCarousel .home-hero { min-height: 300px; padding: 48px 0; }
}

/* Quick Bar */
.quick-bar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: stretch;
  margin: -28px 0 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.quick-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.quick-item:hover { background: var(--bg-hero); color: var(--primary); }
.quick-icon { font-size: 1.6rem; flex-shrink: 0; }
.quick-title { font-weight: 600; font-size: .95rem; }
.quick-sub { font-size: .78rem; color: var(--text-muted); margin-top: 1px; }
.quick-divider { width: 1px; background: #e2e8f0; align-self: stretch; }

/* Sections */
.home-section { padding: 56px 0; }
.home-section-gray { background: var(--bg-gray); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 0; }
.section-link { font-size: .9rem; color: var(--primary); text-decoration: none; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* Pet Image Cards (Explore by Pet) */
.pet-cards-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.pet-img-card {
  position: relative;
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 200px;
  height: 180px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-color: #dbeafe;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  align-items: flex-end;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
}
.pet-img-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37,99,235,.18);
}
.pet-img-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
}
.pet-img-card-name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* Pet Pill (kept for fallback) */
.pet-scroll {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pet-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s, color .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.pet-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 12px rgba(37,99,235,.12);
}
.pet-pill-icon { font-size: 1.2rem; }
.pet-pill-name { white-space: nowrap; }

/* Article Cards */
.art-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}
.art-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(37,99,235,.12);
  color: var(--text);
}
.art-card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.art-card-body { padding: 16px 18px 20px; }
.art-card-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 50px;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.art-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.art-card-excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.art-card-text {
  border-top: 3px solid var(--primary);
}
.section-sub {
  color: var(--text-muted);
  font-size: .92rem;
  margin-top: -8px;
  margin-bottom: 4px;
}

/* Article list (横向列表卡) */
.art-list { display: flex; flex-direction: column; gap: 12px; }
.art-list-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .2s;
  align-items: flex-start;
}
.art-list-item:hover {
  box-shadow: 0 6px 20px rgba(37,99,235,.10);
  transform: translateY(-2px);
  color: var(--text);
}
.art-list-thumb {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.art-list-item--text {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  background: #fff;
}
.art-list-item--text .art-list-title { font-size: 1rem; }
.art-list-item--text .art-list-excerpt { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width:575px) {
  .art-list-thumb { width: 72px; height: 56px; }
}

/* Responsive */
/* Article keyword links */
.art-kw-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #bfdbfe;
  text-underline-offset: 2px;
}
.art-kw-link:hover {
  text-decoration-color: var(--primary);
}
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .quick-bar { flex-direction: column; }
  .quick-divider { width: auto; height: 1px; }
}

/* Section Search Bar */
.section-search-wrap {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 32px 0;
}
.section-search-form {
  display: flex;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: 0 6px 28px rgba(37,99,235,.14);
  border-radius: 50px;
  overflow: hidden;
}
.section-search-input {
  border: none;
  border-radius: 50px 0 0 50px !important;
  padding: 16px 28px;
  font-size: 1.08rem;
  flex: 1;
  background: #fff;
}
.section-search-input:focus {
  box-shadow: none;
  outline: none;
  background: #fff;
}
.section-search-btn {
  border-radius: 0 50px 50px 0 !important;
  padding: 0 36px;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Article Table */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .97rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.article-content table thead {
  background: var(--primary);
  color: #fff;
}
.article-content table thead th {
  padding: 11px 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.article-content table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background .15s;
}
.article-content table tbody tr:last-child {
  border-bottom: none;
}
.article-content table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.article-content table tbody tr:hover {
  background: #eff6ff;
}
.article-content table tbody td {
  padding: 10px 14px;
  vertical-align: top;
  color: var(--text);
}
/* 响应式：小屏横向滚动 */
@media (max-width: 768px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
  }
}


/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  gap: 4px;
}
.pagination .page-link {
  border-radius: 8px !important;
  border: 1.5px solid #dee2e6;
  color: #495057;
  padding: 6px 13px;
  font-size: .875rem;
  line-height: 1.4;
  background: #fff;
  transition: background .15s, color .15s, border-color .15s;
  min-width: 38px;
  text-align: center;
}
.pagination .page-link:hover {
  background: #f0f4ff;
  border-color: #6c63ff;
  color: #6c63ff;
}
.pagination .page-item.active .page-link {
  background: #6c63ff;
  border-color: #6c63ff;
  color: #fff;
  font-weight: 600;
}
.pagination .page-item.disabled .page-link {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #adb5bd;
}
