/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --border: #e5e7eb;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  padding-left: 8px;
  border-left: 2px solid var(--border);
}

.header-nav {
  display: flex;
  gap: 4px;
}

.header-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s;
}

.header-nav a:hover {
  background: var(--bg-light);
  color: var(--text);
}

.header-nav a.nav-active {
  background: var(--primary);
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  padding: 60px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

/* Category Filter */
.category-filter {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-pills::-webkit-scrollbar { display: none; }

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

.pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Featured Section */
.featured-section {
  padding: 40px 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 480px;
}

.featured-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  display: block;
}

.featured-card.large {
  grid-row: 1 / 3;
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
}

.category-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--primary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-time {
  font-size: 12px;
  opacity: 0.8;
  margin-left: 8px;
}

.featured-overlay h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.3;
}

.featured-card.large .featured-overlay h2 {
  font-size: 26px;
}

/* Topics */
.topics-section {
  padding: 16px 0 32px;
  border-bottom: 1px solid var(--border);
}

.topics-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topics-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.topic-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}

.topic-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Blog Grid */
.blog-section {
  padding: 40px 0 60px;
}

.section-heading {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.blog-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.blog-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.card-body {
  padding: 14px 16px 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-tag.dog { background: #dbeafe; color: #1d4ed8; }
.card-tag.cat { background: #fce7f3; color: #be185d; }
.card-tag.fish { background: #cffafe; color: #0891b2; }
.card-tag.bird { background: #fef3c7; color: #b45309; }
.card-tag.reptile { background: #d1fae5; color: #047857; }
.card-tag.small-animal { background: #ede9fe; color: #7c3aed; }
.card-tag.all-pet { background: #f3f4f6; color: #374151; }

.card-date {
  font-size: 12px;
  color: var(--text-light);
}

.card-readtime {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article Page */
.article-page {
  padding: 32px 0 60px;
}

.breadcrumb {
  font-size: 13px;
  margin-bottom: 24px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-light);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .sep {
  margin: 0 6px;
  color: #d1d5db;
}

.breadcrumb .current {
  color: var(--text);
}

.article-header {
  margin-bottom: 24px;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.article-readtime {
  font-size: 13px;
  color: var(--text-light);
}

.article-date {
  font-size: 13px;
  color: var(--text-light);
}

.article-header h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
}

.article-hero {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article-body {
  max-width: 780px;
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul {
  margin: 12px 0 20px 20px;
  list-style: disc;
}

.article-body li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.article-body strong {
  font-weight: 600;
  color: var(--text);
}

.article-body em {
  font-style: italic;
}

.name-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.name-table th,
.name-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.name-table th {
  font-weight: 600;
  color: var(--text);
  background: var(--bg-light);
}

.checklist {
  list-style: none;
  margin: 16px 0;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Related Articles */
.related-articles {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Newsletter */
.newsletter {
  background: var(--primary);
  color: #fff;
  padding: 60px 24px;
  text-align: center;
}

.newsletter h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.newsletter p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  outline: none;
}

.newsletter-form button {
  background: var(--text);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: #16213e;
}

/* Footer */
.footer {
  background: var(--text);
  color: #fff;
}

.footer .container {
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 14px;
  color: #9ca3af;
  margin-top: 12px;
  max-width: 300px;
}

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

.footer-links a {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  padding: 4px 0;
  transition: color 0.15s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid #374151;
}

.footer-bottom p {
  font-size: 12px;
  color: #9ca3af;
}

.footer-legal {
  display: flex;
  gap: 16px;
}

.footer-legal a {
  font-size: 12px;
  color: #9ca3af;
  transition: color 0.15s;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .featured-grid {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .hero h1 { font-size: 32px; }
  .featured-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  .featured-card.large { grid-row: auto; }
  .featured-card { aspect-ratio: 16/9; }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .article-header h1 { font-size: 28px; }
  .article-body { font-size: 16px; }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form input { border-radius: 8px; }
  .newsletter-form button { border-radius: 8px; }
}
