﻿/* Elvisto Blog — Shared Styles */
/* Matches exact site branding from Angular components */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a2e; line-height: 1.6; background: #fff; -webkit-font-smoothing: antialiased; }
a { color: #2563FF; text-decoration: none; }
a:hover { color: #1C4CC4; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 20px; }

/* Skip Link */
.skip-link { position: absolute; top: -100px; left: 16px; background: #2563FF; color: #fff; padding: 8px 16px; border-radius: 0 0 8px 8px; z-index: 9999; font-size: 14px; font-weight: 600; }
.skip-link:focus { top: 0; }

/* === Navigation === */
.page-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(0,0,0,0.08); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand-logo { height: 36px; width: auto; }
.nav-brand { text-decoration: none; display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link { color: #555; text-decoration: none; font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: #2563FF; }
.nav-cta { display: inline-flex; align-items: center; justify-content: center; background: #2563FF; color: #fff !important; font-weight: 600; font-size: 14px; border-radius: 20px; padding: 8px 20px; text-decoration: none; transition: background 0.2s, transform 0.15s; border: none; cursor: pointer; }
.nav-cta:hover { background: #1C4CC4; color: #fff; transform: translateY(-1px); }

/* Mobile Nav */
.nav-mobile { display: none; }
.mobile-signin { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; border-radius: 20px; color: #2563FF; border: 1.5px solid #2563FF; padding: 6px 16px; text-decoration: none; background: transparent; }
.mobile-signin:hover { background: rgba(37, 99, 255,0.05); color: #2563FF; }

/* CSS-only hamburger */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 8px; margin-left: 8px; }
.hamburger-icon { display: block; width: 22px; height: 2px; background: #1a1a2e; position: relative; transition: background 0.2s; }
.hamburger-icon::before, .hamburger-icon::after { content: ''; position: absolute; width: 22px; height: 2px; background: #1a1a2e; left: 0; transition: transform 0.2s; }
.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }
.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger-icon { background: transparent; }
.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger-icon::before { transform: rotate(45deg); top: 0; }
.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger-icon::after { transform: rotate(-45deg); top: 0; }
.mobile-nav-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid rgba(0,0,0,0.08); padding: 16px 24px; flex-direction: column; gap: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.mobile-nav-menu a { color: #555; text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 0; display: block; }
.mobile-nav-menu a:hover, .mobile-nav-menu a.active { color: #2563FF; }
.nav-toggle-checkbox:checked ~ .mobile-nav-menu { display: flex; }

/* === Layout === */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* === Blog Hero === */
.blog-hero { background: linear-gradient(135deg, #1C4CC4, #2563FF 40%, #06D6D1); padding: 120px 24px 60px; text-align: center; }
.blog-hero h1 { font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0 0 12px; }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 28px; }

/* Search Bar */
.search-wrapper { max-width: 500px; margin: 0 auto; position: relative; }
.search-input { width: 100%; padding: 14px 20px 14px 48px; font-size: 15px; font-family: inherit; border: none; border-radius: 999px; background: rgba(255,255,255,0.95); color: #1a1a2e; outline: none; box-shadow: 0 4px 16px rgba(0,0,0,0.1); transition: box-shadow 0.2s; }
.search-input::placeholder { color: #888; }
.search-input:focus { box-shadow: 0 4px 24px rgba(0,0,0,0.15); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #888; pointer-events: none; }

/* === Category Filters === */
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 32px 0 8px; }
.category-chip { display: inline-flex; align-items: center; padding: 6px 16px; font-size: 13px; font-weight: 600; font-family: inherit; border-radius: 20px; border: 1.5px solid #e8ecf4; background: #fff; color: #555; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.category-chip:hover { border-color: #2563FF; color: #2563FF; }
.category-chip.active { background: #2563FF; color: #fff; border-color: #2563FF; }

/* No results message */
.no-results { text-align: center; padding: 60px 20px; color: #888; font-size: 1.1rem; display: none; }
.no-results.visible { display: block; }

/* === Blog Listing — Magazine Style === */
.post-list { padding: 24px 0 48px; }

/* Featured Post */
.featured-post { display: block; background: linear-gradient(135deg, rgba(37, 99, 255,0.04), rgba(6, 214, 209,0.04)); border: 1px solid rgba(37, 99, 255,0.15); border-radius: 16px; padding: 36px; margin-bottom: 40px; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.15s; }
.featured-post:hover { box-shadow: 0 4px 20px rgba(37, 99, 255,0.1); transform: translateY(-2px); color: inherit; }
.featured-badge { display: inline-block; background: linear-gradient(135deg, #2563FF, #06D6D1); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.featured-post h2 { font-size: 1.75rem; font-weight: 700; color: #1a1a2e; margin: 0 0 12px; }
.featured-post .post-meta { margin-bottom: 12px; }
.featured-post .post-excerpt { font-size: 1rem; color: #555; line-height: 1.7; margin: 0; }

/* Post Item (list row) */
.post-item { display: block; padding: 24px 0; border-bottom: 1px solid #f0f1f5; text-decoration: none; color: inherit; transition: background 0.15s; }
.post-item:first-child { padding-top: 0; }
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: rgba(37, 99, 255,0.02); }
.post-item:hover h3 { color: #2563FF; }
.post-item h3 { font-size: 1.2rem; font-weight: 600; color: #1a1a2e; margin: 0 0 8px; transition: color 0.2s; line-height: 1.4; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: #888; }
.post-category { display: inline-flex; padding: 2px 10px; border-radius: 12px; background: #f0f4ff; color: #2563FF; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.post-separator { color: #ddd; }
.post-excerpt { font-size: 0.92rem; color: #666; line-height: 1.65; margin: 8px 0 0; }

/* === Article Page === */

/* Article Hero/Header */
.article-header { background: linear-gradient(135deg, #1C4CC4, #2563FF 40%, #06D6D1); padding: 100px 24px 48px; }
.article-header .container { max-width: 800px; }
.article-category { display: inline-block; padding: 4px 14px; border-radius: 20px; background: rgba(255,255,255,0.15); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.article-header h1 { font-size: 2.2rem; font-weight: 800; color: #fff; margin: 0 0 16px; line-height: 1.25; }
.article-header .article-meta { color: rgba(255,255,255,0.75); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.article-header .separator { color: rgba(255,255,255,0.4); }

/* Breadcrumbs */
.breadcrumbs { background: #f8f9fc; padding: 12px 0; border-bottom: 1px solid #e8ecf4; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; margin: 0; font-size: 13px; }
.breadcrumbs li { display: flex; align-items: center; gap: 4px; }
.breadcrumbs li:not(:last-child)::after { content: '\203A'; color: #aaa; margin-left: 4px; }
.breadcrumbs a { color: #2563FF; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: #888; }

/* Article Layout with TOC */
.article-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 48px 24px 0; max-width: 1100px; margin: 0 auto; }

/* Table of Contents (sticky sidebar) */
.article-toc { position: sticky; top: 88px; align-self: start; }
.article-toc h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #888; margin: 0 0 12px; }
.article-toc ol { list-style: none; padding: 0; margin: 0; }
.article-toc li { margin-bottom: 8px; }
.article-toc a { font-size: 13px; color: #666; text-decoration: none; line-height: 1.5; display: block; padding: 4px 0 4px 12px; border-left: 2px solid #e8ecf4; transition: color 0.2s, border-color 0.2s; }
.article-toc a:hover, .article-toc a.active { color: #2563FF; border-color: #2563FF; }

/* Article Content */
.article-content { max-width: 740px; padding-bottom: 64px; }
.article-content p { font-size: 1rem; color: #444; line-height: 1.8; margin: 0 0 16px; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin: 40px 0 16px; padding-top: 8px; }
.article-content h3 { font-size: 1.2rem; font-weight: 600; color: #1a1a2e; margin: 28px 0 12px; }
.article-content h4 { font-size: 1.05rem; font-weight: 600; color: #2563FF; margin: 20px 0 8px; }
.article-content ul, .article-content ol { margin: 8px 0 20px; padding-left: 24px; }
.article-content li { font-size: 0.95rem; color: #444; line-height: 1.75; padding: 4px 0; }
.article-content li strong { color: #1a1a2e; }
.article-content blockquote { border-left: 3px solid #2563FF; margin: 24px 0; padding: 16px 20px; background: #f8f9fc; border-radius: 0 8px 8px 0; font-style: italic; color: #555; }
.article-content code { background: #f0f4ff; color: #2563FF; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; font-family: 'Fira Code', 'Consolas', monospace; }
.article-content pre { background: #1a1a2e; color: #e8ecf4; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 16px 0 24px; }
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content a { color: #2563FF; text-decoration: underline; text-decoration-color: rgba(37, 99, 255,0.3); text-underline-offset: 2px; }
.article-content a:hover { text-decoration-color: #2563FF; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.92rem; }
.article-content th { text-align: left; padding: 10px 14px; background: #f8f9fc; border: 1px solid #e8ecf4; font-weight: 600; color: #1a1a2e; }
.article-content td { padding: 10px 14px; border: 1px solid #e8ecf4; color: #444; }

/* Inline CTA */
.inline-cta { background: linear-gradient(135deg, rgba(37, 99, 255,0.06), rgba(6, 214, 209,0.06)); border: 1px solid rgba(37, 99, 255,0.15); border-radius: 12px; padding: 28px; margin: 32px 0; text-align: center; }
.inline-cta h3 { font-size: 1.2rem; font-weight: 700; color: #1a1a2e; margin: 0 0 8px; }
.inline-cta p { font-size: 0.95rem; color: #555; margin: 0 0 16px; }
.cta-btn { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2563FF, #1C4CC4); color: #fff !important; font-weight: 600; font-size: 14px; padding: 10px 28px; border-radius: 20px; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.2s; border: none; cursor: pointer; }
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37, 99, 255,0.3); color: #fff; }

/* Key Takeaway Box */
.key-takeaway { background: #f0f9f0; border-left: 4px solid #1db954; border-radius: 0 8px 8px 0; padding: 20px 24px; margin: 24px 0; }
.key-takeaway strong { display: block; color: #1a1a2e; margin-bottom: 4px; }
.key-takeaway p { margin: 0; color: #444; font-size: 0.95rem; }

/* FAQ Section */
.faq-section { margin-top: 40px; }
.faq-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f1f5; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.05rem; font-weight: 600; color: #1a1a2e; margin: 0 0 8px; }
.faq-item p { font-size: 0.95rem; color: #444; line-height: 1.7; margin: 0; }

/* Author Section */
.author-section { background: #f8f9fc; padding: 48px 0; }
.author-card { display: flex; align-items: center; gap: 20px; max-width: 800px; margin: 0 auto; padding: 0 24px; }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #2563FF, #06D6D1); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.author-info h3 { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin: 0 0 4px; }
.author-info p { font-size: 0.88rem; color: #666; line-height: 1.6; margin: 0; }

/* Related Posts */
.related-posts { padding: 64px 0; }
.related-posts h2 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin: 0 0 24px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.related-card { display: block; background: #fff; border: 1px solid #e8ecf4; border-radius: 12px; padding: 24px; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.2s; }
.related-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); color: inherit; }
.related-card .related-category { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #f0f4ff; color: #2563FF; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }
.related-card h3 { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin: 0 0 8px; line-height: 1.4; }
.related-card .related-date { font-size: 12px; color: #888; }

/* Bottom CTA */
.bottom-cta { background: linear-gradient(135deg, #1C4CC4, #2563FF 40%, #06D6D1); padding: 64px 24px; text-align: center; }
.bottom-cta h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin: 0 0 12px; }
.bottom-cta p { font-size: 1rem; color: rgba(255,255,255,0.85); margin: 0 0 24px; }
.cta-btn-large { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #2563FF !important; font-size: 16px; font-weight: 700; padding: 14px 36px; border-radius: 999px; text-decoration: none !important; transition: transform 0.15s, box-shadow 0.2s; }
.cta-btn-large:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.15); color: #2563FF; }
.cta-note { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 12px; }

/* Blog listing CTA section */
.blog-cta-section { background: #f8f9fc; border-radius: 16px; padding: 48px 32px; text-align: center; margin: 0 0 64px; }
.blog-cta-section h2 { font-size: 1.6rem; font-weight: 700; color: #1a1a2e; margin: 0 0 12px; }
.blog-cta-section p { font-size: 0.95rem; color: #555; line-height: 1.7; max-width: 600px; margin: 0 auto 20px; }

/* === Footer === */
.page-footer { background: #1a1a2e; padding: 40px 24px; }
.footer-content { text-align: center; max-width: 1100px; margin: 0 auto; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 16px; }
.footer-logo { height: 28px; width: auto; }
.footer-name { font-size: 18px; font-weight: 700; color: #fff; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(255,255,255,0.3); font-size: 13px; margin: 0; }

/* === Responsive === */

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-toc { position: static; margin-bottom: 32px; padding: 20px; background: #f8f9fc; border-radius: 12px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile { display: flex; align-items: center; }
  .nav-toggle-label { display: block; }

  .blog-hero { padding: 90px 16px 40px; }
  .blog-hero h1 { font-size: 1.75rem; }
  .hero-subtitle { font-size: 0.95rem; }

  .article-header { padding: 90px 16px 36px; }
  .article-header h1 { font-size: 1.6rem; }

  .container, .container-narrow { padding: 0 16px; }

  .category-filters { gap: 6px; padding: 24px 0 8px; }
  .category-chip { font-size: 12px; padding: 5px 12px; }

  .post-item h3 { font-size: 1.05rem; }

  .featured-post { padding: 24px; }
  .featured-post h2 { font-size: 1.35rem; }

  .article-content h2 { font-size: 1.3rem; }
  .article-content h3 { font-size: 1.1rem; }

  .related-grid { grid-template-columns: 1fr; }

  .author-card { flex-direction: column; text-align: center; }

  .bottom-cta { padding: 48px 16px; }
  .bottom-cta h2 { font-size: 1.4rem; }

  .blog-cta-section { padding: 32px 20px; }
  .blog-cta-section h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .blog-hero h1 { font-size: 1.5rem; }
  .article-header h1 { font-size: 1.4rem; }
  .post-meta { font-size: 12px; }
  .featured-post h2 { font-size: 1.2rem; }
  .search-input { font-size: 14px; padding: 12px 16px 12px 44px; }
}


/* =============================================================================
   LIGHT GROUND - matching the public pages
   =============================================================================
   The blog is one click from the landing nav, so its three banner surfaces
   (.blog-hero, .article-header, .bottom-cta) used to hand the visitor a
   saturated #1C4CC4 -> #06D6D1 gradient straight after the landing's pale hero.
   Same ground, ink and badge treatment as the shared public-hero block in
   premium.css: one palette across every page a visitor can reach signed out.
   Appended, at the same specificity as the rules it replaces, so the original
   declarations stay readable above.
   ========================================================================== */
.blog-hero,
.article-header,
.bottom-cta {
  background:
    radial-gradient(900px 420px at 84% 4%, rgba(6, 214, 209, 0.18), transparent 62%),
    radial-gradient(760px 400px at 6% 92%, rgba(37, 99, 255, 0.10), transparent 64%),
    linear-gradient(162deg, #F2FCFD 0%, #E7F8FB 46%, #DDF4F8 100%);
  color: #33496B;
}

.blog-hero h1,
.article-header h1,
.bottom-cta h2 { color: #0A1B33; }

.hero-subtitle,
.bottom-cta p { color: #33496B; }

/* Muted captions still clear 4.5:1 on the pale ground. */
.article-header .article-meta,
.cta-note { color: #45608A; }
.article-header .separator { color: #526E93; }

/* The category pill was a white scrim on navy; on the pale ground it needs the
   public pages' badge treatment to read as a chip at all. */
.article-category {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(6, 214, 209, 0.30);
  color: #14507A;
}

/* Search: a near-white pill on a near-white ground had no edge of its own. */
.search-input {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(6, 214, 209, 0.30), 0 4px 16px rgba(13, 53, 128, 0.08);
}
.search-input:focus {
  box-shadow: inset 0 0 0 1.5px #2563FF, 0 4px 24px rgba(13, 53, 128, 0.12);
}
.search-input::placeholder { color: #5A6E86; }
.search-icon { color: #5A6E86; }

/* The CTA was a white button meant to punch out of navy; on the pale ground it
   disappeared, so it takes the same fill as the inline .cta-btn. */
.cta-btn-large,
.cta-btn-large:hover {
  background: linear-gradient(135deg, #2563FF, #1C4CC4);
  color: #ffffff !important;
}


/* =============================================================================
   CONTRAST - WCAG AA across the blog
   =============================================================================
   These are long-standing failures, not fallout from the light ground above;
   they were measured with the text composited over its real background rather
   than against the declared colour, which is why the near-misses show up at all.
   Ratios in the comments are the measured "after" values.

   1. #2563FF on the #f0f4ff chip ground was 4.43:1 - under 4.5 by a hair, on
      every category chip and every inline <code> span. Dropped to the brand's
      darker blue.
   2. #888 body grey was 3.54:1 on white and 3.37:1 on #f8f9fc. Replaced with
      the slate the public pages already use.
   3. White on the #2563FF -> #06D6D1 gradient was 1.82:1 at the cyan end. The
      end stop moves to a deeper teal; the blue end is unchanged.
   4. The footer copyright at 30% white on #1a1a2e was 2.70:1.
   ========================================================================== */

/* 1. Chip and inline-code ink: 4.43 -> 6.61 on #f0f4ff. */
.post-category,
.related-card .related-category,
.article-content code { color: #1C4CC4; }

/* 2. Muted greys: 3.37-3.54 -> 4.93 on #f8f9fc, 5.19 on white. */
.post-meta,
.breadcrumbs [aria-current="page"],
.article-toc h2,
.related-card .related-date,
.no-results { color: #5A6E86; }

/* The breadcrumb chevron is decorative, but #aaa was too faint to track. */
.breadcrumbs li:not(:last-child)::after { color: #5A6E86; }

/* 3. Gradient chips: 1.82 -> 5.67 against white at the far stop. A deeper teal
      than premium.css's #0e7fa8 pairing, which clears AA by only 0.05. */
.featured-badge,
.author-avatar { background: linear-gradient(135deg, #2563FF, #0B6E92); }

/* 4. Footer copyright: 2.70 -> 7.2 on #1a1a2e. */
.footer-copy { color: rgba(255, 255, 255, 0.62); }


/* =============================================================================
   BLOG INDEX - card grid
   =============================================================================
   The listing was 50 posts as a flat stack of text rows separated by hairlines:
   no shape, no scanning rhythm, and by the tenth row indistinguishable from a
   sitemap. This turns it into a responsive card grid.

   Deliberately CSS-only. Every card is already a single <a class="post-item">
   carrying data-category / data-title / data-excerpt for the search script, and
   blog-search.js filters by setting style.display to '' or 'none' - '' falls back
   to whatever the stylesheet says, so grid children keep working and a hidden card
   leaves the flow cleanly. Nothing here needs the 50 post files, or the script,
   to change.
   ========================================================================== */

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 8px 0 56px;
}

/* --- The card ------------------------------------------------------------- */
.post-item {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
  border: 1px solid rgba(13, 53, 128, 0.10);
  border-bottom: 1px solid rgba(13, 53, 128, 0.10);   /* the list rule set this to a hairline */
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(13, 53, 128, 0.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
/* The stack put the first card flush and stripped the last one's rule. */
.post-item:first-child { padding-top: 22px; }
.post-item:last-child { border-bottom: 1px solid rgba(13, 53, 128, 0.10); }

/* Accent that arrives on hover rather than sitting there 50 times over. */
.post-item::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #2563FF, #06D6D1);
  opacity: 0;
  transition: opacity .18s ease;
}
.post-item:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 255, 0.28);
  box-shadow: 0 16px 32px -20px rgba(13, 53, 128, 0.5);
  background: #ffffff;               /* the list rule tinted the row on hover */
}
.post-item:hover::before { opacity: 1; }
.post-item:focus-visible {
  outline: 2px solid #2563FF;
  outline-offset: 3px;
}

/* --- Order inside the card -------------------------------------------------
   Markup order is title, meta, excerpt. The meta row reads better as the card's
   header, so it moves up; the excerpt grows to keep the grid's rows even. */
.post-item .post-meta { order: 1; margin-bottom: 12px; }
.post-item h3 {
  order: 2;
  margin: 0 0 10px;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.008em;
  color: #16233d;
}
.post-item:hover h3 { color: #1C4CC4; }
.post-item .post-excerpt {
  order: 3;
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.62;
  /* Three lines keeps every card the same shape regardless of excerpt length. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-item .post-meta time,
.post-item .post-meta span:not(.post-category) { font-size: 12px; }

/* --- Category colour coding ------------------------------------------------
   Seven categories, seven tints, so a column of cards has rhythm instead of 50
   identical blue chips. Inks are picked to clear 4.5:1 on their own tint. */
.post-category { border-radius: 999px; padding: 3px 10px; }

.post-item[data-category="on-page-seo"] .post-category,
.featured-post[data-category="on-page-seo"] .post-category { background: #EEF3FF; color: #1C4CC4; }

.post-item[data-category="technical-seo"] .post-category,
.featured-post[data-category="technical-seo"] .post-category { background: #E6F8F8; color: #0B6E92; }

.post-item[data-category="content-strategy"] .post-category,
.featured-post[data-category="content-strategy"] .post-category { background: #F3EEFE; color: #5B21B6; }

.post-item[data-category="link-building"] .post-category,
.featured-post[data-category="link-building"] .post-category { background: #FDF3E3; color: #8F4008; }

.post-item[data-category="local-seo"] .post-category,
.featured-post[data-category="local-seo"] .post-category { background: #E9F6EC; color: #116634; }

.post-item[data-category="seo-tools"] .post-category,
.featured-post[data-category="seo-tools"] .post-category { background: #EEF0FE; color: #3730A3; }

.post-item[data-category="seo-strategy"] .post-category,
.featured-post[data-category="seo-strategy"] .post-category { background: #FDEDF1; color: #9F1239; }

/* --- Featured post ---------------------------------------------------------
   It was a faintly tinted box the same width as everything else, so it did not
   read as featured. Given its own ground, a larger head, and a read affordance. */
.featured-post {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 38px 40px 34px;
  border: 1px solid rgba(6, 214, 209, 0.30);
  border-radius: 20px;
  background:
    radial-gradient(620px 300px at 88% 0%, rgba(6, 214, 209, 0.14), transparent 64%),
    linear-gradient(150deg, #F6FDFE 0%, #EFF8FC 100%);
}
.featured-post h2 {
  margin: 0 0 14px;
  font-size: 1.85rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: #0A1B33;
}
.featured-post .post-excerpt {
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.7;
}
.featured-post .post-meta { margin-bottom: 16px; }
/* Decorative affordance - the whole block is already the link. */
.featured-post::after {
  content: 'Read the guide →';
  display: block;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 650;
  color: #1C4CC4;
  transition: transform .18s ease;
}
.featured-post:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 214, 209, 0.55);
  box-shadow: 0 20px 40px -26px rgba(13, 53, 128, 0.55);
}
.featured-badge { margin-bottom: 14px; }

/* --- Filter row ------------------------------------------------------------ */
.category-filters { gap: 9px; padding: 34px 0 20px; }
.category-chip {
  border-color: rgba(13, 53, 128, 0.12);
  border-radius: 999px;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.category-chip:hover { transform: translateY(-1px); background: #F7FAFF; }
.category-chip.active { box-shadow: 0 8px 18px -10px rgba(37, 99, 255, 0.85); }

.no-results { font-size: 1rem; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .featured-post { padding: 30px 26px 26px; }
  .featured-post h2 { font-size: 1.5rem; }
}
@media (max-width: 680px) {
  .post-list { grid-template-columns: 1fr; gap: 16px; padding-bottom: 40px; }
  .featured-post { padding: 26px 20px 22px; border-radius: 16px; }
  .featured-post h2 { font-size: 1.3rem; }
  .post-item { padding: 20px 18px 18px; }
}


/* =============================================================================
   ARTICLE LAYOUT - stop wide content blowing out the mobile grid
   =============================================================================
   Pre-existing, found while reworking the index. .article-layout is a grid, and a
   grid item's default min-width is auto - it refuses to shrink below its content's
   min-content width. A wide <table> or <pre> in the article column therefore forced
   the whole single-column mobile grid to 460px inside a 375px viewport: the page
   scrolled sideways and the contents rail was dragged wide with it.

   min-width: 0 lets the column shrink; the two elements that actually need the room
   scroll inside themselves instead of pushing the page.
   ========================================================================== */
.article-layout > * { min-width: 0; }

.article-content pre { max-width: 100%; }

/* display:block is what gives a table its own scroll container - as a table it
   would keep sizing to its widest row no matter what the parent says. */
.article-content table {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
