/* ════════════════════════════════════════════════════════════
   BLOG.CSS — SEO Info Vault
   Extends style.css. Full dark-mode aesthetic + animations.
   ════════════════════════════════════════════════════════════ */

/* ── Blog page body bg ───────────────────────────────────────── */
body { background: var(--void); }

/* ── Blog Hero ───────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(145deg, #060714 0%, #0d1b3e 45%, #060820 100%);
  padding: 7em 1em 5.5em;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,123,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(0,207,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(0,80,200,0.12) 0%, transparent 50%);
  pointer-events: none;
  animation: heroAura 7s ease-in-out infinite alternate;
}
/* Animated scan lines */
.blog-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,123,255,0.015) 2px,
    rgba(0,123,255,0.015) 4px
  );
  pointer-events: none;
}
.blog-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.2s both;
}
.blog-hero-badge {
  display: inline-block;
  background: rgba(0,123,255,0.15);
  border: 1px solid rgba(0,123,255,0.45);
  color: #7ec8ff;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.4em 1.2em; border-radius: 2em;
  margin-bottom: 1.2em;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(0,123,255,0.18);
  animation: pulseGlow 3s ease-in-out infinite;
}
.blog-hero h1 {
  font-size: clamp(2.5rem,6vw,4rem);
  color: #fff; margin-bottom: 0.5em; line-height: 1.1;
  animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.35s both;
  background: linear-gradient(135deg, #fff 40%, #7ec8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  font-size: 1.1rem; color: #a8b8cc;
  max-width: 600px; margin: 0 auto 2em; line-height: 1.8;
  animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.5s both;
}

/* Search bar */
.blog-search {
  display: flex; gap: 0.5em;
  max-width: 480px; margin: 0 auto 2em;
  animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.65s both;
}
.blog-search input {
  flex: 1; padding: 0.85em 1.25em;
  border: 1px solid rgba(0,123,255,0.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  color: #fff; font-family: var(--font); font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.blog-search input::placeholder { color: #6a7a8a; }
.blog-search input:focus {
  border-color: var(--primary);
  background: rgba(0,123,255,0.1);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
  outline: none;
}

/* Category pills */
.blog-cats {
  display: flex; flex-wrap: wrap; gap: 0.5em;
  justify-content: center;
  animation: fadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.8s both;
}
.cat-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #a8b8cc; font-family: var(--font); font-size: 0.85rem;
  font-weight: 600; padding: 0.45em 1.2em; border-radius: 2em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.cat-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,123,255,0.2); }
.cat-pill:hover, .cat-pill.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ── Main Layout ─────────────────────────────────────────────── */
.blog-main {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 3em; max-width: 1200px; margin: 0 auto; padding: 4em 1.5em;
  align-items: start;
}
@media (max-width: 960px) {
  .blog-main { grid-template-columns: 1fr; }
  .blog-sidebar { order: -1; }
}

/* ── Blog Grid ───────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75em;
}

/* ── Blog Card — DARK ────────────────────────────────────────── */
.blog-card {
  background: linear-gradient(145deg, var(--navy-2), var(--navy-3));
  border-radius: calc(var(--radius) * 1.75);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border: 1px solid rgba(0,123,255,0.15);
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  /* Scroll animation (overridden by JS anim-ready) */
  opacity: 0;
  transform: translateY(30px);
  animation: blogCardIn 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
  position: relative;
}
.blog-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--cyan), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.blog-card:hover::after { opacity: 1; }
.blog-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(0,123,255,0.15);
  border-color: rgba(0,123,255,0.4);
}

@keyframes blogCardIn { to { opacity: 1; transform: translateY(0); } }
.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.15s; }
.blog-card:nth-child(3) { animation-delay: 0.25s; }
.blog-card:nth-child(4) { animation-delay: 0.35s; }
.blog-card:nth-child(5) { animation-delay: 0.45s; }
.blog-card:nth-child(6) { animation-delay: 0.55s; }

/* Featured variant — spans 2 cols */
.blog-card--featured { grid-column: span 2; flex-direction: row; }
@media (max-width:680px) {
  .blog-card--featured { grid-column: span 1; flex-direction: column; }
}

/* Card image area */
.blog-card__img-wrap { position: relative; overflow: hidden; }
.blog-card__img {
  width: 100%; height: 200px;
  background-size: cover; background-position: center;
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.blog-card--featured .blog-card__img-wrap { flex: 1; }
.blog-card--featured .blog-card__img { height: 100%; min-height: 240px; }
.blog-card:hover .blog-card__img { transform: scale(1.07); }

/* Gradient BG placeholders */
.blog-card__img--1 { background: linear-gradient(135deg, #0c1a40 0%, #0a3570 100%); }
.blog-card__img--2 { background: linear-gradient(135deg, #0d2218 0%, #0a4030 100%); }
.blog-card__img--3 { background: linear-gradient(135deg, #201505 0%, #603000 100%); }
.blog-card__img--4 { background: linear-gradient(135deg, #1e0820 0%, #580048 100%); }
.blog-card__img--5 { background: linear-gradient(135deg, #051e22 0%, #004860 100%); }
.blog-card__img--6 { background: linear-gradient(135deg, #0d200a 0%, #1e4a00 100%); }

/* Emoji overlays */
.blog-card__img--1::after,
.blog-card__img--2::after,
.blog-card__img--3::after,
.blog-card__img--4::after,
.blog-card__img--5::after,
.blog-card__img--6::after {
  font-size: 3.5rem;
  display: flex; align-items: center; justify-content: center; height: 100%;
  text-shadow: 0 0 30px rgba(255,255,255,0.2);
  transition: transform 0.4s ease;
}
.blog-card__img--1::after { content: '🤖'; }
.blog-card__img--2::after { content: '📍'; }
.blog-card__img--3::after { content: '⚡'; }
.blog-card__img--4::after { content: '🔗'; }
.blog-card__img--5::after { content: '🛒'; }
.blog-card__img--6::after { content: '🌿'; }
.blog-card:hover .blog-card__img--1::after,
.blog-card:hover .blog-card__img--2::after,
.blog-card:hover .blog-card__img--3::after,
.blog-card:hover .blog-card__img--4::after,
.blog-card:hover .blog-card__img--5::after,
.blog-card:hover .blog-card__img--6::after {
  transform: scale(1.2) rotate(-5deg);
}

.blog-card__badge {
  position: absolute; top: 1em; left: 1em;
  background: var(--primary); color: #fff;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.35em 0.85em; border-radius: 2em; letter-spacing: 0.03em;
  box-shadow: 0 0 14px rgba(0,123,255,0.5);
}

/* Card body */
.blog-card__body {
  padding: 1.5em; display: flex; flex-direction: column; flex: 1;
}
.blog-card--featured .blog-card__body { flex: 1; padding: 2em; }

.blog-card__meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.5em; font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.75em;
}

.blog-card__title {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--white); margin-bottom: 0.75em; line-height: 1.4; text-align: left;
}
.blog-card__title a {
  color: inherit; text-decoration: none;
  transition: color var(--transition);
}
.blog-card__title a:hover { color: #7ec8ff; }
.blog-card--featured .blog-card__title { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }

.blog-card__excerpt {
  color: var(--text); font-size: 0.93rem; line-height: 1.7;
  flex: 1; margin-bottom: 1.2em; text-align: left;
}

.blog-card__cta {
  color: #7ec8ff; font-weight: 700; text-decoration: none; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.3em;
  transition: gap var(--transition), color var(--transition);
}
.blog-card__cta:hover { gap: 0.65em; color: var(--cyan); }

/* ── Category Tags ───────────────────────────────────────────── */
.cat-tag {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 0.25em 0.7em;
  border-radius: 2em; text-transform: uppercase;
}
.cat-tag--ai    { background: rgba(0,80,255,0.2);  color: #7ec8ff;  border: 1px solid rgba(0,123,255,0.3); }
.cat-tag--local { background: rgba(0,120,80,0.2);  color: #7eefc0;  border: 1px solid rgba(0,180,100,0.3); }
.cat-tag--tech  { background: rgba(180,80,0,0.2);  color: #ffb87e;  border: 1px solid rgba(200,100,0,0.3); }
.cat-tag--links { background: rgba(140,0,160,0.2); color: #e07eff;  border: 1px solid rgba(160,0,200,0.3); }
.cat-tag--ecom  { background: rgba(0,120,180,0.2); color: #7ecfff;  border: 1px solid rgba(0,150,220,0.3); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.blog-sidebar { display: flex; flex-direction: column; gap: 1.5em; }

.sidebar-widget {
  background: linear-gradient(145deg, var(--navy-2), var(--navy-3));
  border: 1px solid rgba(0,123,255,0.15);
  border-radius: calc(var(--radius) * 1.75);
  padding: 1.5em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sidebar-widget:hover {
  border-color: rgba(0,123,255,0.35);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.sidebar-widget h3 {
  font-size: 1rem; color: var(--white); margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid rgba(0,123,255,0.2);
}

/* Newsletter widget */
.sidebar-widget--cta {
  background: linear-gradient(145deg, #080d22, #0d1b3e);
  border-color: rgba(0,123,255,0.3);
  position: relative; overflow: hidden;
}
.sidebar-widget--cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(0,207,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.sidebar-widget--cta h3 { color: #fff; border-color: rgba(255,255,255,0.1); }
.sidebar-widget--cta p  { color: #a8b8cc; font-size: 0.9rem; margin-bottom: 1.2em; }

.sidebar-form { display: flex; flex-direction: column; gap: 0.75em; }
.sidebar-form input {
  padding: 0.75em 1em;
  border: 1px solid rgba(0,123,255,0.25);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
  color: #fff; font-family: var(--font); font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sidebar-form input::placeholder { color: #6a7a8a; }
.sidebar-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,123,255,0.2); outline: none; }
.sidebar-form .btn { width: 100%; justify-content: center; }

/* Category list */
.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 0.5em; }
.sidebar-list a {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text); text-decoration: none; font-size: 0.9rem;
  padding: 0.5em 0.75em; border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.sidebar-list a:hover { background: rgba(0,123,255,0.12); color: #7ec8ff; transform: translateX(4px); }
.sidebar-list span {
  background: rgba(0,123,255,0.15);
  color: #7ec8ff; font-size: 0.75rem; font-weight: 700;
  padding: 0.2em 0.6em; border-radius: 2em;
}

/* Featured post widget */
.featured-post-link {
  display: flex; gap: 1em; text-decoration: none;
  color: inherit; align-items: flex-start;
  transition: transform var(--transition);
}
.featured-post-link:hover { transform: translateX(4px); }
.featured-post-img {
  width: 80px; height: 80px; border-radius: var(--radius);
  flex-shrink: 0; background-size: cover; background-position: center;
  border: 1px solid rgba(0,123,255,0.2);
}
.featured-post-img--1 {
  background: linear-gradient(135deg, #0c1a40 0%, #0a3570 100%);
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.featured-post-img--1::after { content: '🤖'; }
.featured-post-body { flex: 1; }
.featured-post-body p { font-size: 0.88rem; color: var(--white); font-weight: 600; line-height: 1.4; margin: 0.4em 0; }
.featured-post-meta { font-size: 0.78rem; color: var(--text-light); }

/* Audit CTA widget */
.sidebar-widget--audit {
  background: linear-gradient(135deg, #003399, #0055cc);
  border-color: rgba(0,123,255,0.4);
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,123,255,0.2);
}
.sidebar-widget--audit h3 { color: #fff; border-color: rgba(255,255,255,0.2); }
.sidebar-widget--audit p  { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-bottom: 1.2em; }
.sidebar-widget--audit .btn-primary {
  background: #fff; color: var(--primary); width: 100%; animation: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.sidebar-widget--audit .btn-primary:hover { background: #e8f0ff; transform: translateY(-2px); }

/* ── Pagination ──────────────────────────────────────────────── */
.blog-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5em; padding: 2em 1em 4em;
}
.page-indicator { font-weight: 700; color: var(--text-light); font-size: 0.9rem; }
.blog-pagination .btn[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ── Wave divider for blog hero → content ───────────────────── */
.blog-wave {
  width: 100%; overflow: hidden; line-height: 0;
  background: linear-gradient(145deg, #060714 0%, #0d1b3e 45%, #060820 100%);
}
.blog-wave svg { display: block; width: 100%; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width:680px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero  { padding: 4.5em 1em 3.5em; }
  .blog-hero h1 { font-size: clamp(2rem,8vw,3rem); }
}
