/* =============================================================================
   publishing.co.uk — Theme Stylesheet
   Brand: Navy #1A1A1A | Indigo #6B21A8 | Rose #7C2D3E | Emerald #166534
   Font: Inter + Merriweather (Google Fonts)
   ============================================================================= */

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

:root {
  --navy:    #1A1A1A;
  --indigo:  #6B21A8;
  --indigo-light: #A78BFA;
  --rose:    #7C2D3E;
  --emerald: #166534;
  --bg:      #FFFDF7;
  --bg-warm: #FFF9F0;
  --border:  #E8E0D4;
  --muted:   #7C7C7C;
  --white:   #ffffff;
  --font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', 'Georgia', 'Times New Roman', serif;
  --max-w:   1200px;
  --max-w-article: 720px;
  --radius:  12px;
  --radius-sm: 8px;
  --shadow:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 40px -8px rgba(0,0,0,.12), 0 8px 16px -4px rgba(0,0,0,.06);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: #1A1A1A;
  background: #FFFDF7;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--indigo); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rose); }

img { max-width: 100%; height: auto; display: block; }

/* --- Typography --- */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; margin-bottom: 1rem; letter-spacing: -.02em; }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.25; margin: 2.5rem 0 1rem; letter-spacing: -.01em; }
h3 { font-size: 1.35rem; font-weight: 600; line-height: 1.35; margin: 2rem 0 .75rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
p  { margin-bottom: 1.25rem; }

blockquote {
  border-left: 4px solid var(--indigo);
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background: rgba(107,33,168,.04);
  color: var(--muted);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: #f1f5f9;
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .88em;
}

pre {
  background: var(--navy);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: .9rem;
  line-height: 1.6;
  box-shadow: var(--shadow-md);
}
pre code { background: none; padding: 0; color: inherit; }

hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
th, td { padding: .85rem 1.15rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; background: #f1f5f9; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td { font-size: .95rem; }
tr:last-child td { border-bottom: none; }

ul, ol { margin: 0 0 1.25rem 1.5rem; }
li { margin-bottom: .4rem; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-w-article); margin: 0 auto; padding: 0 1.5rem; }

/* --- Header / Nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 1.25rem; font-weight: 800; color: #1A1A1A;
  text-decoration: none;
}
.site-logo .domain { color: var(--indigo); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color var(--transition);
}
.site-nav a:hover, .site-nav a.active { color: #1A1A1A; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600; font-size: .9rem;
  transition: all var(--transition);
  cursor: pointer; border: none;
  text-decoration: none;
}
.btn--primary { background: var(--indigo); color: var(--white); }
.btn--primary:hover { background: #4f46e5; color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(107,33,168,.35); }
.site-nav a.btn--primary { color: var(--white); white-space: nowrap; text-decoration: none; }
.site-nav a.btn--primary:hover { color: var(--white); }
.site-nav a.btn--rose { color: var(--white); }
.site-nav a.btn--rose:hover { color: var(--white); }
.btn--rose { background: var(--rose); color: var(--white); }
.btn--rose:hover { background: #db2777; color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(124,45,62,.35); }
.btn--outline { background: transparent; border: 2px solid var(--indigo); color: var(--indigo); }
.btn--outline:hover { background: var(--indigo); color: var(--white); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--navy); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; flex-direction: column; gap: 1rem;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white); padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav .btn { width: 100%; justify-content: center; }
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  padding: 3.5rem 0 1.5rem;
}
.section-header h1 { font-size: 2.75rem; }
.section-header p {
  font-size: 1.1rem; color: var(--muted);
  max-width: 560px; margin: .5rem auto 0;
  line-height: 1.7;
}

/* =============================================================================
   BLOG GRID — Redesigned for clean, professional spacing
   ============================================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0 3rem;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}
/* =============================================================================
   POST CARD HEADER — Pure CSS, no image files, zero cropping
   ============================================================================= */
.post-card__header {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #6B21A8 100%);
  flex-shrink: 0;
}

/* Category-specific gradient themes */
.post-card__header--formatting {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 45%, #6B21A8 100%);
}
.post-card__header--troubleshooting {
  background: linear-gradient(145deg, #3b0764 0%, #7c3aed 50%, #a855f7 100%);
}
.post-card__header--publishing {
  background: linear-gradient(135deg, #1A1A1A 0%, #1d4ed8 50%, #6B21A8 100%);
}
.post-card__header--comparisons {
  background: linear-gradient(135deg, #0f2a2a 0%, #0d9488 50%, #6B21A8 100%);
}
.post-card__header--default {
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #6B21A8 100%);
}

/* Decorative geometric shapes */
.post-card__header::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -60px;
  right: -40px;
  pointer-events: none;
}
.post-card__header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -40px;
  left: -20px;
  pointer-events: none;
}

/* Category badge inside header */
.post-card__header-badge {
  position: absolute;
  bottom: 14px;
  left: 16px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .65rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.25);
  line-height: 1.4;
}

/* Decorative diamond accent */
.post-card__header-accent {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 8px;
  transform: rotate(45deg);
  pointer-events: none;
}
.post-card__header-accent::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
}
.post-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card__meta {
  display: flex; align-items: center; gap: .6rem;
  font-size: .78rem; color: var(--muted);
  margin-bottom: .6rem;
}
.post-card__category {
  background: rgba(107,33,168,.08);
  color: var(--indigo);
  padding: .2rem .55rem;
  border-radius: 5px;
  font-weight: 600; font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.post-card__title {
  font-size: 1.1rem; font-weight: 700;
  line-height: 1.4; margin-bottom: .5rem;
}
.post-card__title a { color: #1A1A1A; }
.post-card__title a:hover { color: var(--indigo); }
.post-card__excerpt {
  font-size: .88rem; color: var(--muted);
  line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

/* Featured / Hero card — first card spans full width */
.blog-grid--featured .post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.blog-grid--featured .post-card:first-child .post-card__header {
  aspect-ratio: auto;
  height: 100%;
  min-height: 280px;
  border-radius: var(--radius) 0 0 var(--radius);
}
/* Larger decorative shapes for featured card */
.blog-grid--featured .post-card:first-child .post-card__header::before {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -60px;
}
.blog-grid--featured .post-card:first-child .post-card__header::after {
  width: 200px;
  height: 200px;
  bottom: -70px;
  left: -30px;
}
.blog-grid--featured .post-card:first-child .post-card__header-accent {
  width: 56px;
  height: 56px;
  top: 28px;
  right: 28px;
}
.blog-grid--featured .post-card:first-child .post-card__header-badge {
  font-size: .75rem;
  padding: .3rem .8rem;
  bottom: 18px;
  left: 20px;
}
.blog-grid--featured .post-card:first-child .post-card__body {
  padding: 2rem 2.25rem;
  justify-content: center;
}
.blog-grid--featured .post-card:first-child .post-card__title {
  font-size: 1.45rem;
}
.blog-grid--featured .post-card:first-child .post-card__excerpt {
  -webkit-line-clamp: 4;
  font-size: .92rem;
}
@media (max-width: 768px) {
  .blog-grid--featured .post-card:first-child {
    grid-template-columns: 1fr;
  }
  .blog-grid--featured .post-card:first-child .post-card__header {
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 200px;
    aspect-ratio: 16 / 10;
  }
}

/* =============================================================================
   ARTICLE SINGLE — Premium Publication Quality
   ============================================================================= */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--rose));
  z-index: 200;
  width: 0;
  transition: width .15s linear;
  box-shadow: 0 0 8px rgba(107,33,168,.4);
}

/* Article Header */
.article-header {
  padding: 3rem 0 2rem;
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: 2.5rem;
  max-width: 800px;
  margin: 0 auto .75rem;
  letter-spacing: -.025em;
  line-height: 1.12;
}
.article-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; flex-wrap: wrap;
  font-size: .88rem; color: var(--muted);
  margin-top: .5rem;
}
.article-meta__item { display: flex; align-items: center; gap: .4rem; }
.article-meta__divider { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* Featured Image */
.article-featured-image {
  max-width: 960px; margin: 0 auto;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.article-featured-image img { width: 100%; }

/* Article Layout with Sidebar */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.article-layout__main { min-width: 0; }
.article-layout__sidebar {
  position: sticky; top: 80px; align-self: start;
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; gap: 2rem; }
  .article-layout__sidebar { position: static; }
}

/* Article Content — Premium Typography */
.article-content {
  max-width: var(--max-w-article);
  margin: 0 auto;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}
.article-content > p:first-of-type {
  font-size: 1.18rem;
  line-height: 1.75;
  color: #1A1A1A;
}
  border-bottom: 2px solid var(--border);
  position: relative;
}
.article-content h2::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 60px; height: 2px;
  background: var(--indigo);
}
.article-content h3 {
  font-size: 1.3rem;
  margin: 2.25rem 0 .75rem;
  color: #1A1A1A;
}
.article-content a { 
  text-decoration: underline; 
  text-underline-offset: 3px; 
  text-decoration-color: rgba(107,33,168,.3);
  transition: text-decoration-color var(--transition);
}
.article-content a:hover {
  text-decoration-color: var(--indigo);
}
.article-content img {
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

/* Figure / Image Captions */
.article-content figure {
  margin: 2rem 0;
}
.article-content figure img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.article-content figcaption {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-top: .6rem;
  font-style: italic;
}

/* Pull Quote */
.pull-quote {
  border: none;
  border-left: 4px solid var(--rose);
  background: linear-gradient(135deg, rgba(124,45,62,.04), rgba(107,33,168,.04));
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.2rem;
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.65;
  color: #1A1A1A;
  position: relative;
}
.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: -.15rem; left: .75rem;
  font-size: 4rem;
  color: var(--rose);
  opacity: .2;
  font-family: var(--font-serif);
  line-height: 1;
}

/* Key Takeaway / Pro Tip Box */
.key-takeaway, .pro-tip {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--emerald);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.key-takeaway strong:first-child, .pro-tip strong:first-child {
  display: block;
  color: #059669;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}

/* Warning / Caution Box */
.warning-box {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.warning-box strong:first-child {
  display: block;
  color: #d97706;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem;
}

/* Step-by-Step numbered sections */
.article-content .step-section {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3.5rem;
  margin: 2rem 0;
}
.article-content .step-section::before {
  content: counter(step-counter);
  position: absolute;
  left: 0; top: 0;
  width: 2.5rem; height: 2.5rem;
  background: var(--indigo);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
}

/* --- Sidebar Cards --- */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.sidebar-card h4 {
  font-size: .8rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
  margin-bottom: .75rem;
  font-weight: 700;
}
.sidebar-card ul { list-style: none; margin: 0; padding: 0; }
.sidebar-card li { margin-bottom: .4rem; }
.sidebar-card li a {
  font-size: .85rem; color: var(--muted);
  transition: color var(--transition), padding-left var(--transition);
  display: block;
  padding: .2rem 0;
  border-left: 2px solid transparent;
  padding-left: .75rem;
}
.sidebar-card li a:hover, .sidebar-card li a.active {
  color: var(--indigo);
  border-left-color: var(--indigo);
}

/* Author Card */
.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow);
}
.author-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--rose));
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.author-card__info h4 { margin: 0 0 .25rem; font-size: 1rem; }
.author-card__info p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* Social Sharing */
.social-share {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.social-share__label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: .25rem;
}
.social-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--muted);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.social-share__btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.social-share__btn--twitter:hover { background: #1da1f2; color: var(--white); }
.social-share__btn--facebook:hover { background: #1877f2; color: var(--white); }
.social-share__btn--linkedin:hover { background: #0a66c2; color: var(--white); }
.social-share__btn--copy:hover { background: var(--navy); color: var(--white); }

/* --- Tags & Categories --- */
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.tag {
  display: inline-block;
  padding: .3rem .7rem;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: .8rem; font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
}
.tag:hover { background: var(--indigo); color: var(--white); }

/* --- Newsletter CTA — Redesigned --- */
.newsletter-cta {
  background: linear-gradient(135deg, var(--navy) 0%, #1e293b 50%, #312e81 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.75rem 2.5rem;
  text-align: center;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.newsletter-cta::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107,33,168,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.newsletter-cta::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,45,62,.1) 0%, transparent 70%);
  border-radius: 50%;
}
.newsletter-cta > * { position: relative; z-index: 1; }
.newsletter-cta h3 { color: var(--white); font-size: 1.5rem; margin-bottom: .5rem; }
.newsletter-cta p { color: #94a3b8; margin-bottom: 1.25rem; }
.newsletter-cta form {
  display: flex; gap: .5rem;
  max-width: 480px; margin: 0 auto;
}
.newsletter-cta input[type="email"] {
  flex: 1; padding: .75rem 1.15rem;
  border: 1px solid #334155; border-radius: 9999px;
  background: rgba(30,41,59,.8); color: var(--white);
  font-size: .9rem; font-family: var(--font);
  transition: border-color var(--transition);
}
.newsletter-cta input[type="email"]::placeholder { color: #64748b; }
.newsletter-cta input[type="email"]:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(107,33,168,.2); }

@media (max-width: 540px) {
  .newsletter-cta form { flex-direction: column; }
  .newsletter-cta { padding: 2rem 1.5rem; }
}

/* In-article newsletter */
.newsletter-inline {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 2px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.newsletter-inline h3 { color: #1A1A1A; font-size: 1.25rem; margin-bottom: .35rem; }
.newsletter-inline p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.newsletter-inline form {
  display: flex; gap: .5rem;
  max-width: 420px; margin: 0 auto;
}
.newsletter-inline input[type="email"] {
  flex: 1; padding: .65rem 1rem;
  border: 1px solid #c7d2fe; border-radius: 9999px;
  background: var(--white);
  font-size: .9rem; font-family: var(--font);
}
.newsletter-inline input[type="email"]:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(107,33,168,.15); }

/* --- Related Posts --- */
.related-posts { padding: 2.5rem 0 3rem; background: #FFFDF7; }
.related-posts h3 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.related-posts .blog-grid { padding-top: 0; }

/* --- Tools / Resources Grid --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 4rem;
  margin: 0 auto;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.tool-card__icon {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  background: rgba(107,33,168,.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.tool-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.tool-card p { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }

/* --- SEO Programmatic Pages --- */
.seo-page { padding: 3rem 0; }
.seo-page .container--narrow { max-width: 800px; }
.seo-comparison-table { margin: 2rem 0; }
.seo-cta-box {
  background: linear-gradient(135deg, var(--indigo), #4f46e5);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.seo-cta-box h3 { color: var(--white); margin-bottom: .5rem; }
.seo-cta-box p { color: rgba(255,255,255,.85); margin-bottom: 1rem; }

/* --- Pagination --- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; padding: 2rem 0 4rem;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
.pagination .active { background: var(--indigo); color: var(--white); border-color: var(--indigo); }

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand .site-logo { font-size: 1.15rem; }
.footer-brand p { font-size: .9rem; margin-top: .5rem; line-height: 1.6; }
.footer-col h4 {
  color: var(--white); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: #94a3b8; font-size: .9rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  font-size: .8rem;
  text-align: center;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 1rem 0;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--indigo); }
.breadcrumbs span { margin: 0 .35rem; }

/* --- Utility --- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Smooth Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card { animation: fadeInUp .4s ease both; }
.post-card:nth-child(2) { animation-delay: .05s; }
.post-card:nth-child(3) { animation-delay: .1s; }
.post-card:nth-child(4) { animation-delay: .15s; }
.post-card:nth-child(5) { animation-delay: .2s; }
.post-card:nth-child(6) { animation-delay: .25s; }
.post-card:nth-child(7) { animation-delay: .3s; }
.post-card:nth-child(8) { animation-delay: .35s; }
.post-card:nth-child(9) { animation-delay: .4s; }

/* FAQ Section Styles */
.faq-section {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border, #e2e8f0);
}
.faq-section h2 {
  margin-bottom: 1.5rem;
}
.faq-item {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--navy, #1A1A1A);
}
.faq-item p {
  font-size: 0.95rem;
  color: var(--muted, #64748b);
  margin: 0;
  line-height: 1.65;
}
/* Author Bio Styles */
.author-bio {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border-radius: 12px;
  border: 1px solid #c7d2fe;
}
.author-bio__avatar {
  flex-shrink: 0;
}
.author-bio__name {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--navy, #1A1A1A);
}
.author-bio__description {
  font-size: 0.88rem;
  color: var(--muted, #64748b);
  line-height: 1.6;
  margin: 0;
}

/* =============================================================================
   BLOG LISTING PAGE — Complete Redesign
   Category Navigation, Search, Styled Headers, Polished Cards
   ============================================================================= */

/* --- Blog Hero Section --- */
.blog-hero {
  text-align: center;
  padding: 4rem 0 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(236, 72, 153, 0.02) 100%);
}
.blog-hero__title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #1A1A1A;
}
.blog-hero__desc {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Blog Controls (Category Nav + Search) --- */
.blog-controls-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  z-index: 95;
  transition: box-shadow var(--transition);
}
.blog-controls-wrap--stuck {
  position: sticky;
  top: 64px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* --- Category Navigation Pills --- */
.cat-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.cat-nav__pill {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  padding: 0.5rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-transform: capitalize;
}
.cat-nav__pill:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: rgba(99, 102, 241, 0.04);
}
.cat-nav__pill--active {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* --- Search Bar --- */
.blog-search {
  position: relative;
  flex: 0 1 280px;
  display: flex;
  align-items: center;
}
.blog-search__icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.blog-search__input {
  width: 100%;
  padding: 0.6rem 2.4rem 0.6rem 2.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: #1A1A1A;
  background: var(--white);
  transition: all var(--transition);
}
.blog-search__input::placeholder {
  color: var(--muted);
}
.blog-search__input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.blog-search__clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}
.blog-search__clear:hover {
  color: #1A1A1A;
}

/* --- No Results Message --- */
.blog-no-results {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
  font-size: 1rem;
}

/* --- Category Section --- */
.cat-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.5s ease both;
}
.cat-section:last-of-type {
  border-bottom: none;
}

.cat-section__header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cat-section__header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cat-section__icon {
  font-size: 2rem;
  line-height: 1;
}
.cat-section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0;
  letter-spacing: -0.01em;
}
.cat-section__count {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.25rem 0 0;
  font-weight: 500;
}
.cat-section__line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo), rgba(99, 102, 241, 0.2), transparent);
  border-radius: 1px;
}

/* --- Blog Grid (Category-specific) --- */
.blog-grid--category {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 0;
  margin: 0;
}
@media (max-width: 1024px) {
  .blog-grid--category {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .blog-grid--category {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Post Card V2 (Redesigned) --- */
.post-card--v2 {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.post-card--v2:hover {
  border-color: var(--indigo);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
  transform: translateY(-4px);
}

/* Stagger animation for cards */
.post-card--v2:nth-child(1) { animation-delay: 0.05s; }
.post-card--v2:nth-child(2) { animation-delay: 0.1s; }
.post-card--v2:nth-child(3) { animation-delay: 0.15s; }
.post-card--v2:nth-child(4) { animation-delay: 0.2s; }
.post-card--v2:nth-child(5) { animation-delay: 0.25s; }
.post-card--v2:nth-child(6) { animation-delay: 0.3s; }

/* Card header (gradient) */
.post-card--v2 .post-card__header {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 50%, #6B21A8 100%);
  flex-shrink: 0;
}
.post-card--v2 .post-card__header--formatting {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 45%, #6B21A8 100%);
}
.post-card--v2 .post-card__header--troubleshooting {
  background: linear-gradient(145deg, #3b0764 0%, #7c3aed 50%, #a855f7 100%);
}
.post-card--v2 .post-card__header--publishing {
  background: linear-gradient(135deg, #1A1A1A 0%, #1d4ed8 50%, #6B21A8 100%);
}
.post-card--v2 .post-card__header--comparisons {
  background: linear-gradient(135deg, #0f2a2a 0%, #0d9488 50%, #6B21A8 100%);
}

/* Decorative shapes */
.post-card--v2 .post-card__header::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -50px;
  right: -30px;
  pointer-events: none;
}
.post-card--v2 .post-card__header::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -30px;
  left: -10px;
  pointer-events: none;
}

/* Card header accent */
.post-card--v2 .post-card__header-accent {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transform: rotate(45deg);
  pointer-events: none;
}
.post-card--v2 .post-card__header-accent::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Card body */
.post-card--v2 .post-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Card meta (date, read time) */
.post-card__meta--v2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.post-card__date {
  font-weight: 500;
  color: #1A1A1A;
}
.post-card__dot {
  opacity: 0.5;
}
.post-card__readtime {
  font-weight: 500;
}

/* Card title */
.post-card--v2 .post-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: #1A1A1A;
}
.post-card--v2 .post-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.post-card--v2 .post-card__title a:hover {
  color: var(--indigo);
}

/* Card excerpt */
.post-card--v2 .post-card__excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1rem;
}

/* Card CTA link */
.post-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
  transition: all var(--transition);
  width: fit-content;
}
.post-card__cta:hover {
  color: var(--rose);
  gap: 0.6rem;
}
.post-card__cta svg {
  transition: transform var(--transition);
}
.post-card__cta:hover svg {
  transform: translateX(2px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .blog-hero__title {
    font-size: 2rem;
  }
  .blog-controls {
    gap: 1rem;
    justify-content: flex-start;
  }
  .cat-nav {
    order: 2;
    width: 100%;
  }
  .blog-search {
    order: 1;
    width: 100%;
    flex: 1 1 auto;
  }
  .cat-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .cat-section__line {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 2.5rem 0 1.5rem;
  }
  .blog-hero__title {
    font-size: 1.75rem;
  }
  .blog-hero__desc {
    font-size: 0.95rem;
  }
  .cat-nav {
    gap: 0.5rem;
  }
  .cat-nav__pill {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
  }
  .blog-search {
    flex: 1 1 100%;
  }
  .post-card--v2 .post-card__body {
    padding: 1.25rem;
  }
  .post-card--v2 .post-card__title {
    font-size: 1rem;
  }
  .post-card__meta--v2 {
    font-size: 0.75rem;
  }
}

/* Author Bio Headshot Styles */
.author-bio__headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #c7d2fe;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.author-bio__heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy, #0f172a);
  margin: 0 0 0.25rem;
}


/* Author byline should never get drop cap */
.author-byline {
  font-size: 1rem;
  font-weight: normal;
  color: #6B21A8;
  margin-bottom: 1.5rem;
}
.author-byline::first-letter {
  font-size: inherit !important;
  font-weight: inherit !important;
  float: none !important;
  line-height: inherit !important;
  margin: 0 !important;
}

/* ============================================================
   GUIDES PAGE — complete redesign
   Replaces all previous .blog-* and .post-card--v2 styles
   ============================================================ */

/* ── Hero ── */
.guides-hero {
  padding: 4rem 0 2.5rem;
  text-align: center;
}
.guides-hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1A1A1A;
  margin-bottom: 0.75rem;
}
.guides-hero__desc {
  font-size: 1.1rem;
  color: #6B7280;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Sticky controls wrap ── */
.guides-controls-wrap {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 0.75rem 0;
}
.guides-controls-wrap--stuck {
  border-bottom-color: #E5E7EB;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.guides-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ── Category pills ── */
.guides-cat-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}
.guides-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid #E5E7EB;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}
.guides-pill:hover {
  border-color: #6366F1;
  color: #6366F1;
  background: #F5F3FF;
}
.guides-pill--active {
  background: #6366F1;
  border-color: #6366F1;
  color: #fff;
}
.guides-pill--active:hover {
  background: #4F46E5;
  border-color: #4F46E5;
  color: #fff;
}
.guides-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}
.guides-pill--active .guides-pill__count {
  background: rgba(255,255,255,0.25);
}

/* ── Search ── */
.guides-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  transition: border-color 0.18s;
  flex-shrink: 0;
}
.guides-search:focus-within {
  border-color: #6366F1;
  background: #fff;
}
.guides-search svg { color: #9CA3AF; flex-shrink: 0; }
.guides-search__input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #1A1A1A;
  width: 180px;
}
.guides-search__input::placeholder { color: #9CA3AF; }
.guides-search__clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #9CA3AF;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.guides-search__clear:hover { color: #374151; }

/* ── No results ── */
.guides-no-results {
  text-align: center;
  padding: 3rem 0;
  color: #6B7280;
  font-size: 1rem;
}

/* ── Category section ── */
.guides-section {
  padding: 3rem 0 1rem;
}
.guides-section:last-of-type { padding-bottom: 3rem; }
.guides-section__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}
.guides-section__header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}
.guides-section__icon {
  font-size: 1.5rem;
  line-height: 1;
}
.guides-section__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 0;
  line-height: 1.2;
}
.guides-section__count {
  font-size: 0.8rem;
  color: #9CA3AF;
  margin: 0.2rem 0 0;
  font-weight: 500;
}
.guides-section__divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #E5E7EB, transparent);
}

/* ── Card grid ── */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) {
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .guides-grid { grid-template-columns: 1fr; }
}

/* ── Guide card ── */
.guide-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: guideCardIn 0.4s ease both;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.13);
  border-color: #A5B4FC;
}
@keyframes guideCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.guide-card:nth-child(1) { animation-delay: 0.04s; }
.guide-card:nth-child(2) { animation-delay: 0.08s; }
.guide-card:nth-child(3) { animation-delay: 0.12s; }
.guide-card:nth-child(4) { animation-delay: 0.16s; }
.guide-card:nth-child(5) { animation-delay: 0.20s; }
.guide-card:nth-child(6) { animation-delay: 0.24s; }

/* ── Card visual header ── */
.guide-card__visual {
  position: relative;
  height: 120px;
  overflow: hidden;
  flex-shrink: 0;
  /* Default gradient */
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 55%, #7C3AED 100%);
}
.guide-card__visual-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.guide-card__visual-shapes::before {
  content: '';
  position: absolute;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -50px; right: -30px;
}
.guide-card__visual-shapes::after {
  content: '';
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -25px; left: -10px;
}
.guide-card__visual-icon {
  position: absolute;
  bottom: 14px;
  left: 18px;
  color: rgba(255,255,255,0.7);
  line-height: 1;
}

/* Per-category gradient overrides */
.guide-card--kdp-formatting .guide-card__visual {
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 45%, #6B21A8 100%);
}
.guide-card--self-publishing .guide-card__visual {
  background: linear-gradient(135deg, #0f2a2a 0%, #0d9488 50%, #065F46 100%);
}
.guide-card--book-design .guide-card__visual {
  background: linear-gradient(135deg, #1a0533 0%, #7c3aed 50%, #db2777 100%);
}
.guide-card--marketing-sales .guide-card__visual {
  background: linear-gradient(135deg, #1a0a00 0%, #c2410c 50%, #f59e0b 100%);
}
.guide-card--tools-software .guide-card__visual {
  background: linear-gradient(135deg, #0c1a2e 0%, #1d4ed8 50%, #0891b2 100%);
}
.guide-card--kindle-publishing .guide-card__visual {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
}

/* ── Card body ── */
.guide-card__body {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Category badge ── */
.guide-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6366F1;
  margin-bottom: 0.6rem;
  line-height: 1;
}

/* ── Title ── */
.guide-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 0.65rem;
  color: #111827;
  /* Clamp to 2 lines for uniformity */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guide-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.guide-card__title a:hover { color: #6366F1; }

/* ── Excerpt ── */
.guide-card__excerpt {
  font-size: 0.875rem;
  color: #6B7280;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 1rem;
}

/* ── Footer row ── */
.guide-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #F3F4F6;
}
.guide-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #9CA3AF;
  font-weight: 500;
}
.guide-card__meta svg { flex-shrink: 0; }
.guide-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6366F1;
  text-decoration: none;
  transition: gap 0.15s, color 0.15s;
}
.guide-card__cta:hover {
  color: #4F46E5;
  gap: 0.5rem;
}
.guide-card__cta svg { transition: transform 0.15s; }
.guide-card__cta:hover svg { transform: translateX(2px); }

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .guides-hero { padding: 2.5rem 0 1.5rem; }
  .guides-controls { gap: 0.75rem; }
  .guides-search__input { width: 140px; }
  .guides-section__header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .guides-section__divider { width: 100%; }
}
@media (max-width: 480px) {
  .guides-hero__title { font-size: 1.75rem; }
  .guides-search__input { width: 110px; }
}

/* Info Callout Boxes - replacing image placeholders */
.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #166534;
}

.info-callout-icon {
  flex-shrink: 0;
  color: #22c55e;
  margin-top: 0.1rem;
}

.info-callout-icon svg {
  width: 20px;
  height: 20px;
}

.info-callout-content {
  flex: 1;
}

.info-callout-content p {
  margin: 0;
  color: #166534;
}

.info-callout-content strong {
  color: #15803d;
}

@media (max-width: 640px) {
  .info-callout {
    padding: 1rem;
    gap: 0.75rem;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Interactive Tools Showcase Grid — Guides Index
   ========================================================================== */
.guides-tools-featured {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #eef2ff 100%);
  border-bottom: 1px solid #e9d5ff;
  padding-bottom: 2.5rem;
}
.tools-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.tool-showcase-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.tool-showcase-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.tool-showcase-card__icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.tool-showcase-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--navy);
  line-height: 1.3;
}
.tool-showcase-card:hover .tool-showcase-card__title {
  color: var(--indigo);
}
.tool-showcase-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 0.75rem;
}
.tool-showcase-card__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tool-showcase-card:hover .tool-showcase-card__cta {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .tools-showcase-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   SKILLS DIRECTORY — Premium AI Agent Skills Showcase
   ============================================================================= */

/* --- Hero Section --- */
.skills-hero {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0f0a1e 0%, #1a1145 35%, #2d1b69 60%, #1a1145 85%, #0f0a1e 100%);
}
.skills-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.skills-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .4;
}
.skills-hero__orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #6B21A8 0%, transparent 70%);
  top: -150px; right: -100px;
  animation: skillsOrbFloat 12s ease-in-out infinite;
}
.skills-hero__orb--2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #7C2D3E 0%, transparent 70%);
  bottom: -100px; left: -50px;
  animation: skillsOrbFloat 15s ease-in-out infinite reverse;
}
.skills-hero__orb--3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #4338ca 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: skillsOrbFloat 10s ease-in-out infinite;
}
@keyframes skillsOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}
.skills-hero__grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
}
.skills-hero__inner {
  position: relative;
  z-index: 2;
}
.skills-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(107,33,168,.2);
  border: 1px solid rgba(107,33,168,.4);
  color: #c4b5fd;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .4rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.skills-hero__badge-dot {
  width: 6px; height: 6px;
  background: #a78bfa;
  border-radius: 50%;
  animation: skillsPulse 2s ease-in-out infinite;
}
@keyframes skillsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}
.skills-hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.skills-hero__subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.skills-hero__subtitle strong {
  color: #c4b5fd;
  font-weight: 600;
}
.skills-hero__stats {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 1.25rem 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.skills-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}
.skills-hero__stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.skills-hero__stat-label {
  font-size: .75rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.skills-hero__stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.12);
}

/* --- Filter Bar --- */
.skills-filter-section {
  padding: 2rem 0 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.skills-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1.25rem;
}
.skills-search-wrap {
  position: relative;
  max-width: 400px;
}
.skills-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.skills-search {
  width: 100%;
  padding: .7rem 1rem .7rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--white);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--navy);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.skills-search:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(107,33,168,.12);
}
.skills-search::placeholder {
  color: var(--muted);
}
.skills-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.skills-tag {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--white);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.skills-tag:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: rgba(107,33,168,.04);
}
.skills-tag--active {
  background: var(--indigo);
  color: var(--white);
  border-color: var(--indigo);
}
.skills-tag--active:hover {
  background: #5b1d99;
  color: var(--white);
  border-color: #5b1d99;
}

/* --- Skills Directory --- */
.skills-directory {
  padding: 2.5rem 0 3rem;
}

/* --- Category Sections --- */
.skills-category {
  margin-bottom: 3rem;
}
.skills-category__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.skills-category__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.skills-category__icon-wrap svg {
  width: 24px;
  height: 24px;
}
.skills-category__icon-wrap--kdp {
  background: linear-gradient(135deg, #6B21A8 0%, #9333ea 100%);
  color: #fff;
}
.skills-category__icon-wrap--amazon {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  color: #fff;
}
.skills-category__icon-wrap--ads {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  color: #fff;
}
.skills-category__icon-wrap--content {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
}
.skills-category__icon-wrap--utility {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  color: #fff;
}
.skills-category__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}
.skills-category__desc {
  font-size: .88rem;
  color: var(--muted);
  margin: .15rem 0 0;
  line-height: 1.4;
}

/* --- Skills Grid --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* --- Skill Card --- */
.skill-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}
.skill-card:hover {
  border-color: transparent;
  box-shadow: 0 20px 40px -12px rgba(107,33,168,.15), 0 8px 20px -8px rgba(0,0,0,.1);
  transform: translateY(-4px);
}
.skill-card__header {
  position: relative;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.skill-card__header::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .08;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.2) 0%, transparent 40%);
}
.skill-card__header--kdp {
  background: linear-gradient(135deg, #4c1d95 0%, #6B21A8 50%, #7c3aed 100%);
}
.skill-card__header--amazon {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 50%, #ea580c 100%);
}
.skill-card__header--ads {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #3b82f6 100%);
}
.skill-card__header--content {
  background: linear-gradient(135deg, #064e3b 0%, #059669 50%, #10b981 100%);
}
.skill-card__header--utility {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
}
.skill-card__number {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .06em;
  position: relative;
  z-index: 1;
}
.skill-card__icon-lg {
  font-size: 2rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.skill-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.skill-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 .6rem;
  line-height: 1.3;
  transition: color var(--transition);
}
.skill-card:hover .skill-card__title {
  color: var(--indigo);
}
.skill-card__desc {
  font-size: .87rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin: 0 0 1rem;
}
.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.skill-card__tag {
  display: inline-block;
  padding: .2rem .6rem;
  background: rgba(107,33,168,.06);
  color: var(--indigo);
  font-size: .72rem;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: .02em;
}

/* --- No Results --- */
.skills-no-results {
  text-align: center;
  padding: 4rem 1rem;
}
.skills-no-results__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.skills-no-results h3 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: .5rem;
}
.skills-no-results p {
  color: var(--muted);
  font-size: .95rem;
}

/* --- CTA Section --- */
.skills-cta-section {
  padding: 0 0 3rem;
}
.skills-cta {
  background: linear-gradient(135deg, var(--navy) 0%, #1e293b 50%, #312e81 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.skills-cta::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107,33,168,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.skills-cta::after {
  content: '';
  position: absolute;
  bottom: -40%; left: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(124,45,62,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.skills-cta > * {
  position: relative;
  z-index: 1;
}
.skills-cta__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: .75rem;
  letter-spacing: -0.02em;
}
.skills-cta__desc {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}
.skills-cta .btn {
  font-size: 1rem;
  padding: .85rem 2rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .skills-hero {
    padding: 3.5rem 0 3rem;
  }
  .skills-hero__title {
    font-size: 2.25rem;
  }
  .skills-hero__subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  .skills-hero__stats {
    gap: 1.25rem;
    padding: 1rem 1.5rem;
  }
  .skills-hero__stat-num {
    font-size: 1.35rem;
  }
  .skills-filter-section {
    position: static;
  }
  .skills-filter-tags {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .25rem;
  }
  .skills-filter-tags::-webkit-scrollbar {
    display: none;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .skills-category__header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }
  .skills-cta {
    padding: 2.5rem 1.5rem;
  }
  .skills-cta__title {
    font-size: 1.35rem;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* --- Open-Source Tools: Additional Styles --- */
a.skill-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
a.skill-card:hover {
  text-decoration: none;
}
.skill-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.skill-card__stars {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(180,83,9,.08);
  padding: .2rem .55rem;
  border-radius: 4px;
  letter-spacing: .01em;
}
.skill-card__license {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 600;
  color: #059669;
  background: rgba(5,150,105,.08);
  padding: .2rem .55rem;
  border-radius: 4px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.skill-card__link {
  display: inline-block;
  margin-top: auto;
  padding-top: .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--indigo);
  transition: color var(--transition);
}
.skill-card:hover .skill-card__link {
  color: #5b1d99;
}
