/* ============================================================
   BLOG STYLES — AIExecution
   Loaded after style.css on all blog pages
   ============================================================ */

/* ---- CATEGORY COLOR SYSTEM ---- */
:root {
  --cat-definition:  #4B7BFF;
  --cat-howto:       #10B981;
  --cat-comparison:  #7C5CF8;
  --cat-tools:       #0EA5E9;
  --cat-roi:         #F59E0B;
  --cat-casestudy:   #E55C3C;
}

/* ============================================================
   BLOG LISTING PAGE
   ============================================================ */

/* --- Hero --- */
.blog-hero {
  background: var(--bg-dark);
  padding: clamp(72px, 10vw, 120px) 0 clamp(48px, 7vw, 80px);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(75,123,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(124,92,252,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.blog-hero__inner { position: relative; z-index: 1; }
.blog-hero__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.blog-hero__headline {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.06;
  color: #fff; margin-bottom: 18px; max-width: 640px;
}
.blog-hero__sub {
  font-size: clamp(15px, 1.8vw, 18px); color: rgba(255,255,255,0.55);
  max-width: 480px; line-height: 1.7;
}

/* --- Filter Bar --- */
.blog-filter {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 64px; z-index: 90;
}
.blog-filter__inner {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 0; overflow-x: auto; scrollbar-width: none;
}
.blog-filter__inner::-webkit-scrollbar { display: none; }
.blog-filter__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: transparent;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  cursor: pointer; white-space: nowrap;
  transition: all var(--t1); font-family: var(--font);
}
.blog-filter__btn:hover { border-color: var(--accent); color: var(--accent); }
.blog-filter__btn.is-active {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.blog-filter__dot {
  width: 7px; height: 7px; border-radius: 50; flex-shrink: 0;
}

/* --- Featured Post --- */
.blog-featured { padding: clamp(48px, 6vw, 72px) 0 0; }
.blog-featured__card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: box-shadow var(--t2), transform var(--t2);
  text-decoration: none;
}
.blog-featured__card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.blog-featured__visual {
  min-height: 340px; position: relative;
  display: flex; align-items: flex-end; padding: 32px;
}
.blog-featured__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 5px 12px;
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  border-radius: var(--r-pill); color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.blog-featured__content {
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; justify-content: center;
}
.blog-featured__cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 14px;
}
.blog-featured__title {
  font-size: clamp(22px, 2.5vw, 32px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.15; color: var(--text-1);
  margin-bottom: 16px;
}
.blog-featured__excerpt {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 28px; flex: 1;
}
.blog-featured__meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-3);
}
.blog-featured__meta-sep { opacity: 0.4; }
.blog-featured__read-more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--accent);
  margin-top: 20px; text-decoration: none;
  transition: gap var(--t1);
}
.blog-featured__read-more:hover { gap: 12px; }
@media (max-width: 760px) {
  .blog-featured__card { grid-template-columns: 1fr; }
  .blog-featured__visual { min-height: 240px; }
}

/* --- Grid --- */
.blog-grid-section { padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 100px); }
.blog-grid-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px;
}
.blog-grid-header__title {
  font-size: 18px; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em;
}
.blog-grid-header__count {
  font-size: 13px; color: var(--text-3);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .blog-grid { grid-template-columns: 1fr; } }

/* --- Article Card --- */
.blog-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: box-shadow var(--t2), transform var(--t2), border-color var(--t2);
}
.blog-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-4px);
  border-color: var(--border-hover);
}
.blog-card__visual {
  height: 180px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.blog-card__visual-icon {
  width: 56px; height: 56px; opacity: 0.25;
}
.blog-card__visual-pattern {
  position: absolute; inset: 0; opacity: 0.07;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 24px 24px;
}
.blog-card__body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card__cat {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 10px;
}
.blog-card__title {
  font-size: 16px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.02em; line-height: 1.35; margin-bottom: 10px;
  flex: 1;
}
.blog-card__excerpt {
  font-size: 13px; color: var(--text-3); line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-3);
}
.blog-card__footer-read { font-weight: 500; }
.blog-card__arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all var(--t1); flex-shrink: 0;
}
.blog-card:hover .blog-card__arrow {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

/* --- Article Hero --- */
.article-hero {
  padding: clamp(80px, 10vw, 120px) 0 clamp(48px, 6vw, 72px);
  position: relative; overflow: hidden;
}
.article-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.article-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 100%);
}
.article-hero__pattern {
  position: absolute; inset: 0; opacity: 0.06;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 28px 28px;
}
.article-hero__inner { position: relative; z-index: 1; max-width: 820px; }
.article-hero__breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 20px;
}
.article-hero__breadcrumb a {
  color: rgba(255,255,255,0.5); text-decoration: none;
  transition: color var(--t1);
}
.article-hero__breadcrumb a:hover { color: rgba(255,255,255,0.9); }
.article-hero__breadcrumb-sep { opacity: 0.4; }
.article-hero__cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; margin-bottom: 18px;
}
.article-hero__title {
  font-size: clamp(28px, 4vw, 52px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1; color: #fff; margin-bottom: 20px;
}
.article-hero__meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.article-hero__meta-item { display: flex; align-items: center; gap: 6px; }
.article-hero__meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.article-hero__author {
  display: flex; align-items: center; gap: 10px;
}
.article-hero__av {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.25); flex-shrink: 0;
}
.article-hero__av img { width: 100%; height: 100%; object-fit: cover; }

/* --- Article Layout --- */
.article-body-wrap {
  background: var(--bg);
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 100px);
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

/* --- Prose --- */
.article-prose {
  font-size: 17px; color: var(--text-2); line-height: 1.82;
  max-width: 680px;
}
.article-prose h2 {
  font-size: clamp(22px, 2.5vw, 30px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.2; color: var(--text-1);
  margin: 2.4em 0 0.7em; padding-top: 2em;
  border-top: 1px solid var(--border);
}
.article-prose h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.article-prose h3 {
  font-size: clamp(17px, 2vw, 22px); font-weight: 700;
  letter-spacing: -0.025em; color: var(--text-1);
  margin: 1.8em 0 0.6em;
}
.article-prose h4 {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.01em; margin: 1.4em 0 0.5em;
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px;
  color: var(--text-3);
}
.article-prose p { margin: 0 0 1.4em; }
.article-prose p:last-child { margin-bottom: 0; }
.article-prose strong { color: var(--text-1); font-weight: 600; }
.article-prose a {
  color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.article-prose a:hover { color: var(--accent-dark); }
.article-prose ul, .article-prose ol {
  padding-left: 1.5em; margin: 0 0 1.4em;
}
.article-prose li { margin-bottom: 0.55em; }
.article-prose ul li::marker { color: var(--accent); }
.article-prose ol li::marker { color: var(--accent); font-weight: 600; }

/* Stat callout box */
.stat-box {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  margin: 2em 0;
}
.stat-box__cell {
  background: var(--bg-2); padding: 24px 20px; text-align: center;
}
.stat-box__num {
  font-size: clamp(26px, 3vw, 38px); font-weight: 700;
  letter-spacing: -0.04em; color: var(--accent); line-height: 1;
  margin-bottom: 6px;
}
.stat-box__label { font-size: 13px; color: var(--text-2); line-height: 1.5; }

/* Pull quote */
.pull-quote {
  border-left: 4px solid var(--accent);
  padding: 20px 28px; margin: 2em 0;
  background: var(--accent-bg); border-radius: 0 var(--r-md) var(--r-md) 0;
}
.pull-quote p {
  font-size: 18px; font-style: italic; color: var(--text-1);
  line-height: 1.65; margin: 0 0 10px;
}
.pull-quote cite {
  font-size: 13px; color: var(--text-3); font-style: normal; font-weight: 600;
}

/* Callout / Info box */
.callout {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 20px 24px; margin: 2em 0;
  background: var(--bg-2);
  display: flex; gap: 16px; align-items: flex-start;
}
.callout--blue { border-left: 3px solid var(--accent); background: var(--accent-bg); }
.callout--green { border-left: 3px solid #10B981; background: rgba(16,185,129,0.05); }
.callout--orange { border-left: 3px solid #F59E0B; background: rgba(245,158,11,0.05); }
.callout__icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout__body { flex: 1; }
.callout__title { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.callout__text { font-size: 14px; color: var(--text-2); line-height: 1.65; margin: 0; }

/* Comparison Table */
.comp-table {
  width: 100%; border-collapse: collapse; margin: 2em 0;
  font-size: 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden;
}
.comp-table th {
  background: var(--bg-dark); color: #fff;
  padding: 14px 18px; text-align: left; font-weight: 600;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.comp-table td {
  padding: 13px 18px; border-bottom: 1px solid var(--border);
  color: var(--text-2); vertical-align: top; line-height: 1.55;
}
.comp-table tr:last-child td { border-bottom: none; }
.comp-table tr:nth-child(even) td { background: var(--bg-2); }
.comp-table .win { color: #10B981; font-weight: 600; }
.comp-table .lose { color: #EF4444; }

/* Step list */
.step-list { list-style: none; padding: 0; margin: 2em 0; counter-reset: steps; }
.step-list li {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid var(--border);
  counter-increment: steps;
}
.step-list li:last-child { border-bottom: none; }
.step-list__num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-bg); border: 1.5px solid rgba(75,123,255,0.2);
  color: var(--accent); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  content: counter(steps);
}
.step-list__num::before { content: counter(steps); }
.step-list__body strong { display: block; color: var(--text-1); margin-bottom: 5px; font-size: 16px; }
.step-list__body p { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.65; }

/* --- Sidebar --- */
.article-sidebar { position: sticky; top: 88px; }

.toc-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; margin-bottom: 20px;
}
.toc-card__title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 16px;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li {
  border-bottom: 1px solid var(--border); padding: 0;
}
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: block; padding: 9px 0;
  font-size: 13px; color: var(--text-2); text-decoration: none;
  line-height: 1.4; transition: color var(--t1); padding-left: 12px;
  border-left: 2px solid transparent;
  transition: all var(--t1);
}
.toc-list a:hover, .toc-list a.is-active {
  color: var(--accent); border-left-color: var(--accent);
}

.sidebar-cta {
  background: var(--bg-dark); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: 20px; overflow: hidden; position: relative;
}
.sidebar-cta::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,123,255,0.25) 0%, transparent 70%);
}
.sidebar-cta__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}
.sidebar-cta__text {
  font-size: 15px; font-weight: 700; color: #fff;
  line-height: 1.35; margin-bottom: 12px; letter-spacing: -0.02em;
}
.sidebar-cta__sub {
  font-size: 12px; color: rgba(255,255,255,0.4);
  line-height: 1.6; margin-bottom: 18px;
}
.sidebar-cta .btn { width: 100%; justify-content: center; font-size: 13px; }

.sidebar-author {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.sidebar-author__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 14px;
}
.sidebar-author__inner { display: flex; align-items: flex-start; gap: 14px; }
.sidebar-author__av {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; border: 2px solid var(--accent);
}
.sidebar-author__av img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.sidebar-author__name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.sidebar-author__role { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.sidebar-author__bio { font-size: 13px; color: var(--text-2); line-height: 1.65; margin-top: 12px; }

/* --- Article Footer Sections --- */
.article-related {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 72px) 0;
}
.article-related__title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--text-1); margin-bottom: 28px;
}
.article-related__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 760px) {
  .article-related__grid { grid-template-columns: 1fr; }
}

.article-author-bio {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: clamp(40px, 5vw, 60px) 0;
}
.author-bio-card {
  display: flex; gap: 32px; align-items: flex-start;
  max-width: 780px;
}
.author-bio-card__av {
  width: 80px; height: 80px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(75,123,255,0.12);
}
.author-bio-card__av img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.author-bio-card__name {
  font-size: 18px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.author-bio-card__role { font-size: 13px; color: var(--accent); margin-bottom: 14px; }
.author-bio-card__text {
  font-size: 15px; color: var(--text-2); line-height: 1.78; margin-bottom: 16px;
}
.author-bio-card__links { display: flex; gap: 10px; }
.author-bio-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding: 6px 14px; border: 1px solid var(--border);
  border-radius: var(--r-pill); background: var(--bg-2);
  text-decoration: none; transition: all var(--t1);
}
.author-bio-card__link:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) {
  .author-bio-card { flex-direction: column; }
}

/* Article CTA section */
.article-cta {
  background: var(--bg-dark);
  padding: clamp(56px, 7vw, 88px) 0;
  position: relative; overflow: hidden; text-align: center;
}
.article-cta::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(75,123,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 30%, rgba(124,92,252,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.article-cta__inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }
.article-cta__label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 16px;
}
.article-cta__headline {
  font-size: clamp(26px, 3.5vw, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.12; color: #fff; margin-bottom: 14px;
}
.article-cta__sub {
  font-size: 15px; color: rgba(255,255,255,0.5);
  line-height: 1.7; margin-bottom: 32px;
}

/* Category color helpers — apply to .blog-card__visual, .blog-featured__visual, .article-hero */
.cat--definition  { background: linear-gradient(135deg, #1a2f7a 0%, #2a5be8 50%, #4B7BFF 100%); }
.cat--howto       { background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #10B981 100%); }
.cat--comparison  { background: linear-gradient(135deg, #2d1b69 0%, #4c1d95 40%, #7C5CF8 100%); }
.cat--tools       { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 40%, #0EA5E9 100%); }
.cat--roi         { background: linear-gradient(135deg, #78350f 0%, #b45309 40%, #F59E0B 100%); }
.cat--casestudy   { background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 40%, #E55C3C 100%); }
