/* =============================================================
   VetCheck Blog Stylesheet
   Clean, professional, healthcare-focused aesthetic.
   Primary palette: trust-building teal/navy with soft neutrals.
   ============================================================= */

:root {
  /* VetCheck brand palette — primary purple from logo_vc_purple.svg (#5B11C7) */
  --vc-purple:      #5b11c7;
  --vc-purple-dark: #4509a0;
  --vc-purple-soft: #f1ebfa;
  --vc-navy:        #0a1538;
  --vc-navy-soft:   #1a2550;

  /* Aliases retained so existing rules below don't break */
  --vc-teal:        var(--vc-purple);
  --vc-teal-dark:   var(--vc-purple-dark);
  --vc-teal-soft:   var(--vc-purple-soft);

  /* Neutrals */
  --vc-ink:         #1a1f36;
  --vc-slate:       #425466;
  --vc-muted:       #8792a2;
  --vc-line:        #e3e8ee;
  --vc-line-soft:   #f0f4f8;

  /* Backgrounds */
  --vc-bg:          #ffffff;
  --vc-bg-soft:     #fafbfc;
  --vc-bg-warm:     #fbf9fd;

  /* Accents */
  --vc-accent:      #ff6b35;
  --vc-yellow:      #ffc83d;
  --vc-success:     #10b981;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Shadows */
  --s-sm: 0 1px 2px rgba(10,37,64,.04), 0 1px 3px rgba(10,37,64,.06);
  --s-md: 0 4px 12px rgba(10,37,64,.06), 0 2px 4px rgba(10,37,64,.04);
  --s-lg: 0 20px 40px rgba(10,37,64,.08), 0 8px 16px rgba(10,37,64,.06);

  /* Typography */
  --f-display: 'Source Serif 4', Georgia, serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--vc-ink);
  background: var(--vc-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* =============================================================
   LAYOUT
   ============================================================= */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* =============================================================
   HEADER
   ============================================================= */
.site-header {
  border-bottom: 1px solid var(--vc-line);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.94);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: 22px;
  color: var(--vc-navy);
  letter-spacing: -.01em;
}
.logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.logo-img-inverted {
  filter: brightness(0) invert(1);
}
.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--vc-purple) 0%, var(--vc-purple-dark) 100%);
  border-radius: 10px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 18px;
  box-shadow: 0 2px 8px rgba(91,17,199,.25);
}
.nav-links {
  display: flex; gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--vc-slate);
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--vc-teal);
}
.nav-cta {
  background: var(--vc-navy);
  color: white !important;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all .2s;
}
.nav-cta:hover {
  background: var(--vc-purple) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91,17,199,.3);
}

/* =============================================================
   BLOG HERO
   ============================================================= */
.blog-hero {
  padding: 80px 0 48px;
  background: linear-gradient(180deg, var(--vc-bg-warm) 0%, var(--vc-bg) 100%);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -100px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(91,17,199,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.blog-hero-inner {
  position: relative; z-index: 1;
  text-align: center;
  max-width: 780px; margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--vc-teal);
  background: var(--vc-teal-soft);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.blog-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: var(--vc-navy);
  margin-bottom: 20px;
}
.blog-hero h1 em {
  font-style: italic;
  color: var(--vc-teal);
}
.blog-hero p {
  font-size: 19px;
  color: var(--vc-slate);
  max-width: 600px;
  margin: 0 auto;
}

/* =============================================================
   TOOLBAR (search + filters)
   ============================================================= */
.toolbar {
  padding: 28px 0;
  border-bottom: 1px solid var(--vc-line);
  position: sticky; top: 72px; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.94);
}
.toolbar-inner {
  display: flex; gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.search-wrap {
  position: relative;
  flex: 1 1 320px;
  min-width: 280px;
}
.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1.5px solid var(--vc-line);
  border-radius: 12px;
  font-family: var(--f-body);
  font-size: 15px;
  background: var(--vc-bg-soft);
  transition: all .2s;
  color: var(--vc-ink);
}
.search-input:focus {
  outline: none;
  border-color: var(--vc-teal);
  background: white;
  box-shadow: 0 0 0 4px rgba(91,17,199,.1);
}
.search-icon {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--vc-muted);
  pointer-events: none;
}
.category-filters {
  display: flex; gap: 8px;
  flex-wrap: wrap;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--vc-bg-soft);
  border: 1.5px solid var(--vc-line);
  border-radius: 100px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--vc-slate);
  transition: all .2s;
  white-space: nowrap;
}
.category-chip:hover {
  border-color: var(--vc-teal);
  color: var(--vc-teal);
}
.category-chip.active {
  background: var(--vc-navy);
  border-color: var(--vc-navy);
  color: white;
}
.category-chip .count {
  opacity: .7;
  font-size: 12px;
}

/* =============================================================
   FEATURED ARTICLE
   ============================================================= */
.featured-section { padding: 56px 0 32px; }
.featured-article {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--vc-navy) 0%, var(--vc-navy-soft) 100%);
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: 56px;
  color: white;
  position: relative;
  text-decoration: none;
  transition: transform .3s ease;
}
.featured-article:hover { transform: translateY(-4px); }
.featured-article::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(91,17,199,.25) 0%, transparent 60%);
  pointer-events: none;
}
.featured-content { position: relative; z-index: 1; }
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,200,61,.15);
  color: var(--vc-yellow);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.featured-article h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.featured-article p {
  font-size: 17px;
  color: rgba(255,255,255,.8);
  margin-bottom: 28px;
  line-height: 1.6;
}
.featured-meta {
  display: flex; gap: 20px;
  align-items: center;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--vc-teal);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: all .2s;
}
.btn-primary:hover {
  background: white;
  color: var(--vc-navy);
  transform: translateY(-2px);
}
.featured-image {
  position: relative; z-index: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--s-lg);
  aspect-ratio: 4/3;
  background: var(--vc-teal-soft);
}
.featured-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* =============================================================
   ARTICLES GRID
   ============================================================= */
.articles-section { padding: 48px 0 96px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-title {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--vc-navy);
}
.results-count {
  color: var(--vc-muted);
  font-size: 14px;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 48px 32px;
}

/* Article Card */
.article-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  text-decoration: none;
  color: inherit;
}
.article-card:hover { transform: translateY(-4px); }
.article-card:hover .card-image img { transform: scale(1.04); }
.article-card:hover h3 { color: var(--vc-teal); }

.card-image {
  aspect-ratio: 16/10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--vc-bg-soft);
  margin-bottom: 20px;
  position: relative;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.card-category {
  position: absolute;
  top: 16px; left: 16px;
  background: white;
  color: var(--vc-navy);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: var(--s-sm);
}
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card h3 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--vc-navy);
  margin-bottom: 10px;
  transition: color .2s;
}
.card-summary {
  font-size: 15px;
  color: var(--vc-slate);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--vc-muted);
  margin-top: auto;
  padding-top: 12px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.author-dot {
  width: 24px; height: 24px;
  background: linear-gradient(135deg, var(--vc-teal), var(--vc-teal-dark));
  border-radius: 50%;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* =============================================================
   NEWSLETTER
   ============================================================= */
.newsletter-section {
  background: var(--vc-bg-warm);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--vc-line);
}
.newsletter-section::before {
  content: '';
  position: absolute;
  bottom: -60%; left: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(91,17,199,.1) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.newsletter-inner h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--vc-navy);
  margin-bottom: 12px;
  line-height: 1.1;
}
.newsletter-inner p {
  font-size: 17px;
  color: var(--vc-slate);
  margin-bottom: 28px;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.newsletter-input {
  flex: 1 1 240px;
  padding: 14px 20px;
  border: 1.5px solid var(--vc-line);
  border-radius: 10px;
  font-family: var(--f-body);
  font-size: 15px;
  background: white;
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--vc-teal);
  box-shadow: 0 0 0 4px rgba(91,17,199,.1);
}
.newsletter-btn {
  padding: 14px 28px;
  background: var(--vc-navy);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
}
.newsletter-btn:hover {
  background: var(--vc-teal);
  transform: translateY(-2px);
}

/* =============================================================
   FOOTER
   ============================================================= */
.site-footer {
  background: var(--vc-navy);
  color: rgba(255,255,255,.7);
  padding: 56px 0 32px;
}
.site-footer .logo { color: white; }
.site-footer .logo-mark {
  background: linear-gradient(135deg, var(--vc-teal) 0%, var(--vc-teal-dark) 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}
.footer-col h4 {
  color: white;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  margin-bottom: 10px;
  transition: color .2s;
}
.footer-col a:hover { color: var(--vc-teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

/* =============================================================
   ARTICLE DETAIL PAGE
   ============================================================= */
.article-view {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vc-teal);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 32px;
  transition: gap .2s;
}
.back-link:hover { gap: 12px; }
.article-view h1 {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--vc-navy);
  margin: 16px 0 20px;
}
.article-summary {
  font-size: 20px;
  color: var(--vc-slate);
  line-height: 1.5;
  margin-bottom: 24px;
}
.article-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--r-md);
  margin: 32px 0 40px;
}
.article-meta-full {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--vc-line);
  border-bottom: 1px solid var(--vc-line);
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--vc-slate);
}
.share-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.share-btn {
  width: 36px; height: 36px;
  border: 1.5px solid var(--vc-line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--vc-slate);
  cursor: pointer;
  transition: all .2s;
  background: white;
}
.share-btn:hover {
  border-color: var(--vc-teal);
  color: var(--vc-teal);
}

.article-body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--vc-ink);
}
.article-body h2 {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 600;
  margin: 48px 0 16px;
  letter-spacing: -.02em;
  color: var(--vc-navy);
}
.article-body h3 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--vc-navy);
}
.article-body p { margin-bottom: 24px; }
.article-body ul,
.article-body ol { margin: 0 0 24px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 3px solid var(--vc-teal);
  padding: 12px 0 12px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--vc-slate);
  font-size: 20px;
  background: var(--vc-teal-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 24px;
}
.article-body a {
  color: var(--vc-teal);
  border-bottom: 1px solid rgba(91,17,199,.3);
  transition: border-color .2s;
}
.article-body a:hover { border-color: var(--vc-teal); }
.article-body img {
  border-radius: var(--r-md);
  margin: 32px 0;
  box-shadow: var(--s-md);
}
.article-body code {
  background: var(--vc-bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}
.article-body pre {
  background: var(--vc-bg-soft);
  padding: 20px;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin-bottom: 24px;
}
.article-body pre code {
  background: none;
  padding: 0;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--vc-line);
}
.tag {
  background: var(--vc-bg-soft);
  border: 1px solid var(--vc-line);
  color: var(--vc-slate);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
}
.tag:hover {
  background: var(--vc-teal-soft);
  border-color: var(--vc-teal);
  color: var(--vc-teal);
}

/* Related articles */
.related-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  border-top: 1px solid var(--vc-line);
}
.related-section h3 {
  font-family: var(--f-display);
  font-size: 28px;
  color: var(--vc-navy);
  margin-bottom: 32px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

/* =============================================================
   EMPTY STATE
   ============================================================= */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--vc-muted);
}
.empty-state h3 {
  font-family: var(--f-display);
  font-size: 24px;
  color: var(--vc-navy);
  margin-bottom: 8px;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .featured-article {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  .featured-image { aspect-ratio: 16/10; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta):not(.active) { display: none; }
}
@media (max-width: 600px) {
  .blog-hero { padding: 56px 0 32px; }
  .toolbar { padding: 20px 0; }
  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .category-filters {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .articles-grid { gap: 40px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .share-buttons { margin-left: 0; width: 100%; }
  .featured-section { padding: 32px 0 16px; }
}

/* =============================================================
   ANIMATIONS
   ============================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.article-card {
  animation: fadeUp .5s cubic-bezier(.2,.8,.2,1) backwards;
}
.article-card:nth-child(1) { animation-delay: .05s; }
.article-card:nth-child(2) { animation-delay: .10s; }
.article-card:nth-child(3) { animation-delay: .15s; }
.article-card:nth-child(4) { animation-delay: .20s; }
.article-card:nth-child(5) { animation-delay: .25s; }
.article-card:nth-child(6) { animation-delay: .30s; }
.article-card:nth-child(7) { animation-delay: .35s; }
.article-card:nth-child(8) { animation-delay: .40s; }
.article-card:nth-child(9) { animation-delay: .45s; }
