/* ============================================
   BLOG STYLES
   blog-styles.css  —  The 23 Eleven
   Covers: blog index + individual post pages
   Depends on: ../styles.css (CSS custom props)
   ============================================ */


/* ============================================
   SHARED BREADCRUMB  (blog variant)
   Matches service-page breadcrumb style: chevron separator,
   white-toned text on dark hero background.
   ============================================ */
.blog-breadcrumb {
    margin-bottom: var(--space-lg);
}

.blog-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-breadcrumb li {
    display: flex;
    align-items: center;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
}

/* Chevron separator — matches fa-chevron-right used in service pages */
.blog-breadcrumb li:not(:last-child)::after {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    content: '\f054'; /* fa-chevron-right */
    font-size: 0.6rem;
    margin-left: var(--space-xs);
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
}

.blog-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.blog-breadcrumb a:hover,
.blog-breadcrumb a:focus {
    color: var(--color-white, #ffffff);
}

.blog-breadcrumb [aria-current="page"],
.blog-breadcrumb li:last-child span {
    color: var(--color-white, #ffffff);
    font-weight: var(--fw-semibold);
}


/* ============================================
   SHARED CATEGORY TAG
   Used on both index cards and post hero
   ============================================ */
.blog-category-tag {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    background-color: rgba(252, 163, 17, 0.1);
    border: 1px solid rgba(252, 163, 17, 0.3);
    border-radius: var(--border-radius-full);
    padding: 3px var(--space-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.blog-category-tag:hover {
    background-color: rgba(252, 163, 17, 0.2);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .blog-category-tag {
    background-color: rgba(252, 163, 17, 0.15);
    border-color: rgba(252, 163, 17, 0.4);
}

[data-theme="dark"] .blog-category-tag:hover {
    background-color: rgba(252, 163, 17, 0.25);
}


/* ============================================
   SHARED POST META  (author, date, read-time)
   ============================================ */
.blog-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: var(--fs-sm);
    color: var(--text-tertiary);
}

.blog-author {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.blog-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(252, 163, 17, 0.4);
    flex-shrink: 0;
}

.blog-author-name {
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
}

.blog-date,
.blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-date i,
.blog-read-time i {
    color: var(--accent-primary);
    font-size: var(--fs-xs);
}


/* ============================================
   ┌─────────────────────────────────────────┐
   │          BLOG INDEX PAGE                │
   └─────────────────────────────────────────┘
   ============================================ */

/* ── Index Hero ── */
.blog-index-hero {
    padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-2xl);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.blog-index-title {
    font-family: var(--font-display);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--text-primary);
    margin: var(--space-sm) 0 var(--space-md);
    max-width: 700px;
}

.blog-index-subtitle {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    max-width: 620px;
    margin: 0;
}


/* ── Featured Post ── */
.blog-featured {
    padding: var(--space-3xl) 0;
    background-color: var(--bg-primary);
}

.blog-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.blog-featured-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-featured-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.blog-featured-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.blog-featured-card:hover .blog-featured-image img {
    transform: scale(1.04);
}

.blog-featured-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px var(--space-sm);
    border-radius: var(--border-radius-full);
    pointer-events: none;
}

.blog-featured-content {
    padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.blog-featured-title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    color: var(--text-primary);
    margin: 0;
}

.blog-featured-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.blog-featured-title a:hover,
.blog-featured-title a:focus {
    color: var(--accent-primary);
}

.blog-featured-excerpt {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0;
}

.blog-featured-btn {
    align-self: flex-start;
    margin-top: var(--space-sm);
}

.blog-featured-btn i {
    transition: transform var(--transition-fast);
}

.blog-featured-btn:hover i,
.blog-featured-btn:focus i {
    transform: translateX(4px);
}


/* ── All Posts / Filter Section ── */
.blog-posts-section {
    padding: var(--space-3xl) 0 var(--space-4xl);
    background-color: var(--bg-secondary);
}

.blog-posts-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.blog-posts-heading {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin: 0;
    flex-shrink: 0;
    line-height: var(--lh-tight);
}

/* Filter Tabs */
.blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
}

.blog-filter-btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1.5;
}

.blog-filter-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background-color: rgba(252, 163, 17, 0.05);
}

.blog-filter-btn.active,
.blog-filter-btn[aria-pressed="true"] {
    color: var(--color-white);
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.blog-filter-btn:focus-visible {
    outline: 3px solid rgba(252, 163, 17, 0.5);
    outline-offset: 2px;
}


/* ── Blog Post Grid ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}


/* ── Blog Card ── */
.blog-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    cursor: default;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(252, 163, 17, 0.3);
}

.blog-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}

.blog-card-image {
    width: 100%;
    height: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

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

.blog-card-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.blog-card-title {
    font-family: var(--font-display);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    color: var(--text-primary);
    margin: 0;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.blog-card-title a:hover,
.blog-card-title a:focus {
    color: var(--accent-primary);
}

.blog-card-excerpt {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0;
    flex: 1;

    /* Clamp to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .blog-post-meta {
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}


/* ── Empty state ── */
.blog-empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--text-tertiary);
}

.blog-empty-state i {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-md);
    display: block;
    opacity: 0.4;
}

.blog-empty-state p {
    font-size: var(--fs-base);
}

.blog-empty-state a {
    color: var(--accent-primary);
}


/* ── Index CTA Strip ── */
.blog-index-cta {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--color-dark-gray) 0%, var(--color-black) 100%);
    position: relative;
    overflow: hidden;
}

.blog-index-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(252, 163, 17, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.blog-index-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.blog-index-cta-title {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin: 0 0 var(--space-xs);
    line-height: var(--lh-tight);
}

.blog-index-cta-sub {
    font-size: var(--fs-base);
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.blog-index-cta .btn i {
    transition: transform var(--transition-fast);
}

.blog-index-cta .btn:hover i,
.blog-index-cta .btn:focus i {
    transform: translateX(4px);
}


/* ============================================
   ┌─────────────────────────────────────────┐
   │       INDIVIDUAL BLOG POST PAGE         │
   └─────────────────────────────────────────┘
   ============================================ */

/* ── Post Hero  (clean panel — mirrors project-hero from portfolio-styles.css) ── */
.post-hero {
    padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-2xl);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.post-hero-content {
    max-width: 820px;
}

.post-hero-title {
    font-family: var(--font-display);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--text-primary);
    margin: var(--space-sm) 0 var(--space-md);
}

.post-hero-excerpt {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0 0 var(--space-lg);
}


/* ── Post Body  (sidebar layout) ── */
.post-body {
    padding: var(--space-3xl) 0;
    background-color: var(--bg-primary);
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-3xl);
    align-items: start;
}


/* ── Article Content ── */
.post-content {
    min-width: 0;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    z-index: calc(var(--z-header) + 1);
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* Featured image inside article (when no hero image) */
.post-featured-image {
    margin-bottom: var(--space-2xl);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article body typography */
.post-article {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
}

.post-article h2 {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin: var(--space-2xl) 0 var(--space-md);
    padding-bottom: var(--space-md);
    position: relative;
}

.post-article h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.post-article h3 {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-sm);
}

.post-article h4 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-sm);
}

.post-article p {
    margin-bottom: var(--space-lg);
}

.post-article p:last-child {
    margin-bottom: 0;
}

.post-article a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.post-article a:hover {
    color: var(--accent-secondary);
}

.post-article strong {
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
}

.post-article em {
    font-style: italic;
}

/* Lists */
.post-article ul,
.post-article ol {
    margin: 0 0 var(--space-lg) var(--space-xl);
    padding: 0;
}

.post-article ul {
    list-style: none;
    margin-left: 0;
}

.post-article ul li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.post-article ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
}

.post-article ol {
    list-style: decimal;
    padding-left: var(--space-xl);
}

.post-article ol li {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-xs);
}

.post-article ol li::marker {
    color: var(--accent-primary);
    font-weight: var(--fw-semibold);
}

/* Blockquote / Pull quote */
.post-article blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl) var(--space-xl) var(--space-xl) var(--space-2xl);
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    position: relative;
}

.post-article blockquote::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--accent-primary);
    opacity: 0.3;
    position: absolute;
    top: var(--space-sm);
    left: var(--space-md);
}

.post-article blockquote p {
    font-size: var(--fs-lg);
    font-style: italic;
    color: var(--text-primary);
    margin: 0;
    line-height: var(--lh-relaxed);
}

.post-article blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--text-tertiary);
    font-style: normal;
}

/* Inline images */
.post-article figure {
    margin: var(--space-2xl) 0;
}

.post-article figure img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    display: block;
    box-shadow: var(--shadow-md);
}

.post-article figcaption {
    margin-top: var(--space-sm);
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    text-align: center;
    font-style: italic;
}

.post-article figcaption .figure-credit {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    font-style: normal;
    color: var(--text-tertiary);
    opacity: 0.75;
    letter-spacing: 0.01em;
}

/* Callout / tip box */
.post-callout {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-radius: var(--border-radius-lg);
    margin: var(--space-2xl) 0;
    background-color: rgba(252, 163, 17, 0.08);
    border: 1px solid rgba(252, 163, 17, 0.25);
}

.post-callout-icon {
    font-size: var(--fs-xl);
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.post-callout-body strong {
    display: block;
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.post-callout-body p {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--lh-relaxed);
}

/* Horizontal rule between sections */
.post-article hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: var(--space-2xl) 0;
}

/* Key takeaways box */
.post-takeaways {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
    box-shadow: var(--shadow-sm);
}

.post-takeaways-heading {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.post-takeaways-heading i {
    font-size: var(--fs-sm);
}

.post-takeaways ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.post-takeaways ul li {
    padding-left: 0;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.post-takeaways ul li::before {
    content: none;
}

.post-takeaways ul li i {
    color: var(--accent-primary);
    font-size: var(--fs-xs);
    margin-top: 4px;
    flex-shrink: 0;
}


/* ── Tags ── */
.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.post-tags-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: var(--space-xs);
}

.post-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--accent-primary);
    background-color: rgba(252, 163, 17, 0.1);
    border: 1px solid rgba(252, 163, 17, 0.3);
    border-radius: var(--border-radius-full);
    transition: all var(--transition-fast);
}

.post-tag:hover {
    background-color: rgba(252, 163, 17, 0.2);
    border-color: var(--accent-primary);
}


/* ── Share Bar ── */
.post-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.post-share-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-secondary);
    margin-right: var(--space-xs);
    white-space: nowrap;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    border-radius: var(--border-radius-full);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    background-color: transparent;
    color: var(--text-secondary);
    white-space: nowrap;
}

.post-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.post-share-btn i {
    font-size: var(--fs-sm);
}

.post-share-btn.share-x:hover      { color: #000;    border-color: #000;    background-color: rgba(0,0,0,0.05); }
.post-share-btn.share-linkedin:hover { color: #0077B5; border-color: #0077B5; background-color: rgba(0,119,181,0.06); }
.post-share-btn.share-facebook:hover { color: #1877F2; border-color: #1877F2; background-color: rgba(24,119,242,0.06); }
.post-share-btn.share-copy:hover    { color: var(--accent-primary); border-color: var(--accent-primary); }

.post-share-btn.copied {
    color: #4CAF50;
    border-color: #4CAF50;
    background-color: rgba(76,175,80,0.08);
}

[data-theme="dark"] .post-share-btn.share-x:hover { color: #fff; border-color: #fff; background-color: rgba(255,255,255,0.08); }


/* ── Prev / Next Navigation ── */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.post-nav-link:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-nav-link.post-nav-next {
    text-align: right;
}

.post-nav-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
}

.post-nav-link.post-nav-next .post-nav-label {
    justify-content: flex-end;
}

.post-nav-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    line-height: var(--lh-snug);
    transition: color var(--transition-fast);
}

.post-nav-link:hover .post-nav-title {
    color: var(--accent-primary);
}

.post-nav-label i {
    font-size: var(--fs-xs);
    transition: transform var(--transition-fast);
}

.post-nav-link.post-nav-prev:hover .post-nav-label i {
    transform: translateX(-3px);
}

.post-nav-link.post-nav-next:hover .post-nav-label i {
    transform: translateX(3px);
}


/* ── Post CTA  (matches project-cta exactly) ── */
.post-cta {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--color-dark-gray) 0%, var(--color-black) 100%);
    position: relative;
    overflow: hidden;
}

.post-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(252, 163, 17, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.post-cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.post-cta-title {
    font-family: var(--font-display);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    margin-bottom: var(--space-md);
    line-height: var(--lh-snug);
}

.post-cta-text {
    font-size: var(--fs-lg);
    color: rgba(255,255,255,0.85);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-xl);
}

.post-cta .btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--fs-md);
}

.post-cta .btn-lg i {
    transition: transform var(--transition-fast);
}

.post-cta .btn-lg:hover i,
.post-cta .btn-lg:focus i {
    transform: translateX(4px);
}


/* ============================================
   SIDEBAR
   ============================================ */
.post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-xl));
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Shared sidebar card */
.sidebar-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
}

/* ── About Author ── */
.sidebar-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
}

.sidebar-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(252, 163, 17, 0.4);
}

.sidebar-author-name {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
    margin: 0;
    line-height: var(--lh-tight);
}

.sidebar-author-role {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    margin: 0;
}

.sidebar-author-bio {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    margin: 0;
}

/* ── Related Posts ── */
.sidebar-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sidebar-related-item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.sidebar-related-img {
    width: 64px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-related-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.sidebar-related-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    text-decoration: none;
    line-height: var(--lh-snug);
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-related-title:hover {
    color: var(--accent-primary);
}

.sidebar-related-date {
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
}

/* ── Categories ── */
.sidebar-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius-md);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.sidebar-category-link:hover {
    background-color: rgba(252, 163, 17, 0.08);
    color: var(--accent-primary);
    padding-left: var(--space-md);
}

.sidebar-category-count {
    font-size: var(--fs-xs);
    color: var(--text-tertiary);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-full);
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
}

.sidebar-category-link:hover .sidebar-category-count {
    background-color: rgba(252, 163, 17, 0.12);
    color: var(--accent-primary);
}


/* ============================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Index */
    .blog-index-title { font-size: var(--fs-3xl); }
    .blog-index-subtitle { font-size: var(--fs-base); }
    .blog-featured-card { grid-template-columns: 1fr; }
    .blog-featured-image-link { aspect-ratio: 16 / 7; }
    .blog-featured-content { padding: var(--space-xl); }
    .blog-featured-title { font-size: var(--fs-xl); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }

    /* Post */
    .post-hero {
        padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-xl);
    }
    .post-hero-title { font-size: var(--fs-3xl); }
    .post-hero-excerpt { font-size: var(--fs-base); }
    .post-layout { grid-template-columns: 1fr 280px; gap: var(--space-2xl); }
    .post-cta-title { font-size: var(--fs-2xl); }
    .post-cta-text { font-size: var(--fs-base); }
}


/* ============================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Index */
    .blog-index-hero {
        padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-xl);
    }
    .blog-index-title { font-size: var(--fs-2xl); }
    .blog-featured { padding: var(--space-2xl) 0; }
    .blog-posts-section { padding: var(--space-2xl) 0 var(--space-3xl); }
    .blog-posts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-index-cta-inner { flex-direction: column; align-items: flex-start; }

    /* Post */
    .post-hero {
        padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-lg);
    }
    .post-hero-title { font-size: var(--fs-2xl); }
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-sidebar {
        position: static;
        order: -1;           /* sidebar above article on mobile */
        grid-row: unset;
    }
    .post-article h2 { font-size: var(--fs-xl); }
    .post-article h3 { font-size: var(--fs-lg); }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-link.post-nav-next { text-align: left; }
    .post-nav-link.post-nav-next .post-nav-label { justify-content: flex-start; }
    .post-cta { padding: var(--space-3xl) 0; }
    .post-cta-title { font-size: var(--fs-xl); }
    .post-cta-text { font-size: var(--fs-base); }
    .post-cta .btn-lg { width: 100%; }
}


/* ============================================
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .blog-index-title { font-size: var(--fs-xl); }
    .blog-index-subtitle { font-size: var(--fs-sm); }
    .blog-filter { gap: 6px; }
    .blog-filter-btn { font-size: var(--fs-xs); padding: 4px var(--space-sm); }
    .blog-card-content { padding: var(--space-md); }
    .blog-card-title { font-size: var(--fs-base); }

    .post-hero {
        padding: calc(var(--nav-height) + var(--space-lg)) 0 var(--space-md);
    }
    .post-hero-title { font-size: var(--fs-xl); }
    .post-hero-excerpt { font-size: var(--fs-sm); }
    .post-body { padding: var(--space-2xl) 0; }
    .post-article h2 { font-size: var(--fs-lg); }
    .post-share { flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
    .post-cta { padding: var(--space-2xl) 0; }
    .post-cta-title { font-size: var(--fs-lg); }
    .post-cta-text { font-size: var(--fs-sm); margin-bottom: var(--space-lg); }
    .post-cta .btn-lg { font-size: var(--fs-sm); }
}


/* ============================================
   DARK THEME OVERRIDES
   ============================================ */
[data-theme="dark"] .blog-featured-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .post-share,
[data-theme="dark"] .post-nav-link {
    background-color: var(--bg-card);
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .post-article blockquote {
    background-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .post-callout {
    background-color: rgba(252, 163, 17, 0.1);
}

[data-theme="dark"] .post-takeaways {
    background-color: var(--bg-card);
    border-color: rgba(255,255,255,0.08);
}


/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .blog-featured-image img,
    .blog-card-image img {
        transition: none;
    }
    .blog-featured-card:hover .blog-featured-image img,
    .blog-card:hover .blog-card-image img {
        transform: none;
    }
    .blog-featured-card:hover,
    .blog-card:hover,
    .post-nav-link:hover,
    .post-share-btn:hover {
        transform: none;
    }
    .reading-progress {
        transition: none;
    }
}


/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .blog-index-cta,
    .post-cta,
    .post-share,
    .post-nav,
    .post-sidebar { display: none; }

    .post-layout { display: block; }
    .post-hero { background: none; border-bottom: 1px solid #000; padding: var(--space-lg) 0; }
    .post-hero-title { color: #000 !important; }
    .post-hero-excerpt { color: #000 !important; }
    .reading-progress { display: none; }

    .post-article a { text-decoration: none; color: #000; }
    .post-article a::after { content: ' (' attr(href) ')'; font-size: 0.75em; color: #666; }
}


/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .blog-category-tag,
    .post-tag { border-width: 2px; }
    .post-article blockquote { border-left-width: 6px; }
    .post-nav-link:focus,
    .blog-card:focus-within { box-shadow: 0 0 0 4px var(--accent-primary); }
}

@media (forced-colors: active) {
    .blog-category-tag,
    .post-tag { border: 2px solid currentColor; }
    .post-article h2::after,
    .sidebar-card-title { background: currentColor; }
    .reading-progress { background: Highlight; }
}

/* ============================================
   END OF BLOG-STYLES.CSS
   ============================================ */
