/* ============================================================
   BLOG.CSS — Neurobird Blog-specific styles
   Depends on: ../styles.css (base variables, reset, components)
   ============================================================ */

/* ---- Reading Progress Bar ---- */
.article-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--blue);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ---- Nav active state (always on blog) ---- */
.nav__link--active {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

/* ============================================================
   BLOG HERO (listing page)
   ============================================================ */
.blog-hero {
    padding: 120px 0 72px;
    border-bottom: 1px solid var(--border);
}

.blog-hero__inner {
    max-width: 680px;
}

.blog-hero__inner .eyebrow {
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.blog-hero__sub {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 580px;
}

/* ============================================================
   FEATURED ARTICLE
   ============================================================ */
.blog-featured {
    padding: 64px 0 0;
}

.blog-featured__card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.blog-featured__card:hover {
    border-color: var(--blue-dim);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.blog-featured__image {
    position: relative;
    overflow: hidden;
}

.blog-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.blog-featured__card:hover .blog-featured__image img {
    transform: scale(1.04);
}

.blog-featured__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

.blog-featured__content {
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.blog-featured__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.blog-featured__title {
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.blog-featured__excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.blog-featured__cta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    margin-top: 8px;
    transition: gap 0.2s var(--ease);
}

.blog-featured__card:hover .blog-featured__cta {
    gap: 12px;
}

/* ============================================================
   BLOG TAG CHIPS
   ============================================================ */
.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.blog-tag--red {
    background: rgba(220, 38, 38, 0.12);
    color: #F87171;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.blog-tag--blue {
    background: rgba(37, 99, 235, 0.12);
    color: #60A5FA;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.blog-tag--amber {
    background: rgba(180, 83, 9, 0.15);
    color: #FCD34D;
    border: 1px solid rgba(180, 83, 9, 0.25);
}

.blog-tag--green {
    background: rgba(21, 128, 61, 0.12);
    color: #4ADE80;
    border: 1px solid rgba(21, 128, 61, 0.2);
}

/* ============================================================
   BLOG GRID (listing page)
   ============================================================ */
.blog-grid-section {
    padding: 64px 0 96px;
}

.blog-grid-section--related {
    padding: 64px 0 0;
    border-top: 1px solid var(--border);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
   BLOG CARD
   ============================================================ */
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.blog-card:hover {
    border-color: var(--border-blue);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.blog-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease);
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.blog-card__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.blog-card__footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.blog-card__read {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    transition: letter-spacing 0.2s var(--ease);
}

.blog-card:hover .blog-card__read {
    letter-spacing: 0.02em;
}

/* ============================================================
   BLOG CTA BANNER
   ============================================================ */
.blog-cta-banner {
    padding: 64px 0 96px;
}

.blog-cta-banner__inner {
    background: var(--bg-card);
    border: 1px solid var(--border-blue);
    border-radius: var(--r-lg);
    padding: 52px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.blog-cta-banner__left {
    max-width: 520px;
}

.blog-cta-banner__left p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-top: 12px;
}

.blog-cta-banner__right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================================
   ARTICLE HERO
   ============================================================ */
.article-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 0;
    overflow: hidden;
    margin-top: 64px; /* nav height */
}

.article-hero__image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.article-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(6, 8, 15, 0.2) 0%,
        rgba(6, 8, 15, 0.7) 60%,
        rgba(6, 8, 15, 0.95) 100%
    );
}

.article-hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-bottom: 64px;
}

.article-hero__content {
    max-width: 820px;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
    font-family: var(--font-mono);
}

.article-breadcrumb a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.15s;
}

.article-breadcrumb a:hover {
    color: rgba(255,255,255,0.85);
}

.article-hero__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.article-hero__meta .label-mono {
    color: rgba(255,255,255,0.5);
}

.article-hero__title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 20px;
}

.article-hero__subtitle {
    font-size: 18px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.7);
    max-width: 680px;
}

/* ============================================================
   ARTICLE LAYOUT (2-column: TOC + content)
   ============================================================ */
.article-body-section {
    padding: 72px 0 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 72px;
    align-items: start;
}

/* ---- TOC Sidebar ---- */
.article-toc {
    position: sticky;
    top: 96px;
}

.article-toc__inner {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.article-toc__label {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    display: block;
}

.article-toc nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.article-toc__link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.article-toc__link:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.article-toc__link.active {
    background: var(--blue-dim);
    color: var(--blue);
}

/* ---- Article Content ---- */
.article-content {
    max-width: 720px;
}

.article-lead {
    font-size: 19px;
    line-height: 1.75;
    color: var(--text-secondary);
    border-left: 3px solid var(--blue);
    padding-left: 20px;
    margin-bottom: 40px;
}

.article-content h2 {
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 48px 0 16px;
    scroll-margin-top: 96px;
}

.article-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 10px;
}

.article-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.article-content a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}

.article-content a:hover {
    text-decoration-color: var(--blue);
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-content em {
    color: var(--text-primary);
    font-style: italic;
}

/* ---- Article Figure ---- */
.article-figure {
    margin: 36px 0;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-figure img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

.article-figure figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    background: var(--bg-card);
}

/* ---- Callout Boxes ---- */
.article-callout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    border-radius: var(--r-md);
    margin: 28px 0;
    font-size: 15px;
    line-height: 1.65;
}

.article-callout__icon {
    flex-shrink: 0;
    width: 24px;
    margin-top: 2px;
    opacity: 0.85;
}

.article-callout--blue {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--text-secondary);
}

.article-callout--blue .article-callout__icon {
    color: var(--blue);
}

.article-callout--red {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--text-secondary);
}

.article-callout--red .article-callout__icon {
    color: #F87171;
}

.article-callout--amber {
    background: rgba(180, 83, 9, 0.08);
    border: 1px solid rgba(180, 83, 9, 0.2);
    color: var(--text-secondary);
}

.article-callout--amber .article-callout__icon {
    color: #FCD34D;
}

.article-callout--green {
    background: rgba(21, 128, 61, 0.08);
    border: 1px solid rgba(21, 128, 61, 0.2);
    color: var(--text-secondary);
}

.article-callout--green .article-callout__icon {
    color: #4ADE80;
}

/* ---- Checklist ---- */
.article-checklist {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-checklist__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.article-checklist__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.article-checklist__icon--ok {
    background: rgba(21, 128, 61, 0.15);
    color: #4ADE80;
}

.article-checklist__icon--warn {
    background: rgba(220, 38, 38, 0.12);
    color: #F87171;
}

.article-checklist__icon--neutral {
    background: var(--bg-surface);
    color: var(--text-tertiary);
}

/* ---- Stats Row ---- */
.article-stats-row {
    display: flex;
    gap: 0;
    margin: 32px 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}

.article-stat {
    flex: 1;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    border-right: 1px solid var(--border);
    background: var(--bg-card);
}

.article-stat:last-child {
    border-right: none;
}

.article-stat__value {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}

.article-stat__label {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    line-height: 1.5;
    text-align: center;
}

/* ---- Numbered Steps ---- */
.article-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 28px 0;
}

.article-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.article-step:last-child {
    border-bottom: none;
}

.article-step__num {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-dim);
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.article-step__body {
    flex: 1;
}

.article-step__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.article-step__desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

/* ---- Table ---- */
.article-table-wrap {
    overflow-x: auto;
    margin: 28px 0;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.article-table thead th {
    background: var(--bg-surface);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-table tbody td {
    padding: 14px 18px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

.article-table tbody tr:last-child td {
    border-bottom: none;
}

.article-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

/* ---- Timeline ---- */
.article-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 28px 0;
    position: relative;
    padding-left: 32px;
}

.article-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.article-timeline__item {
    position: relative;
    padding: 0 0 28px 24px;
}

.article-timeline__item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg);
    z-index: 1;
}

.article-timeline__item--done::before {
    background: #15803D;
    border-color: #15803D;
}

.article-timeline__item--active::before {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--blue-dim);
}

.article-timeline__item--pending::before {
    background: var(--bg-surface);
    border-color: var(--border);
}

.article-timeline__date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    display: block;
}

.article-timeline__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.article-timeline__desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ---- Article Scenario Blocks ---- */
.article-scenario {
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--r-md);
    padding: 24px;
    margin-bottom: 16px;
}

.article-scenario__tag {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #F87171;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.article-scenario__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.article-scenario__body {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.article-scenario__body strong {
    color: #F87171;
}

/* ---- Article Law Quote ---- */
.article-law-quote {
    background: var(--bg-surface);
    border-left: 3px solid var(--blue);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 20px 24px;
    margin: 24px 0;
}

.article-law-quote p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.article-law-quote cite {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    font-style: normal;
}

/* ---- Article Footer ---- */
.article-footer {
    margin-top: 52px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.article-footer__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-footer__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-footer__author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.article-footer__author-role {
    font-size: 11px;
    color: var(--text-tertiary);
}

.article-footer__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet: 1024px ---- */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 200px 1fr;
        gap: 48px;
    }

    .blog-featured__card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .blog-featured__image {
        aspect-ratio: 16 / 7;
    }

    .blog-featured__content {
        padding: 36px 40px;
    }

    .blog-cta-banner__inner {
        padding: 40px;
    }
}

/* ---- Mobile/Small Tablet: 768px ---- */
@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 0 52px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid--3 {
        grid-template-columns: 1fr;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-toc {
        position: static;
        order: -1;
    }

    .article-hero {
        min-height: 420px;
    }

    .article-hero__title {
        font-size: clamp(24px, 7vw, 36px);
    }

    .blog-featured__content {
        padding: 28px;
    }

    .article-stats-row {
        flex-direction: column;
    }

    .article-stat {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .article-stat:last-child {
        border-bottom: none;
    }

    .blog-cta-banner__inner {
        flex-direction: column;
        padding: 32px 28px;
        gap: 32px;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---- Small mobile: 480px ---- */
@media (max-width: 480px) {
    .blog-hero__sub {
        font-size: 16px;
    }

    .blog-featured__title {
        font-size: 20px;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-lead {
        font-size: 16px;
    }
}
