/* ========================================
   BLOG STYLES
   Landing page, article pages, components
   Consistent with site design system
   ======================================== */

/* ─── BLOG LANDING: FEATURED HERO ─── */
.blog-featured {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, var(--secondary-dark) 50%, #1a1a2e 100%);
    padding: 0;
    overflow: hidden;
}

.blog-featured-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 420px;
}

.blog-featured-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #12121f 0%, #1a1a2e 100%);
    overflow: hidden;
}

.blog-featured-image .featured-icon {
    font-size: 8rem;
    color: var(--accent-orange);
    opacity: 0.15;
    position: absolute;
}

.blog-featured-image .featured-visual {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-featured-image .featured-visual i {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--accent-orange), #ffaa33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(255, 140, 0, 0.3));
}

.blog-featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, transparent, #1a1a1a);
    z-index: 3;
}

.blog-featured-content {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 140, 0, 0.15);
    border: 1px solid rgba(255, 140, 0, 0.3);
    color: var(--accent-orange);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.blog-featured-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.blog-featured-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

.blog-featured-meta i {
    margin-right: 0.3rem;
    color: var(--accent-orange);
}

.blog-featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-featured-cta:hover {
    gap: 1rem;
    color: var(--accent-orange-hover);
}

.blog-featured-cta i {
    transition: transform 0.3s ease;
}

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

/* ─── CATEGORY FILTER PILLS ─── */
.blog-filters {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.5rem;
}

.blog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    background: white;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

.blog-filter-pill:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 140, 0, 0.04);
}

.blog-filter-pill.active {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
}

.blog-filter-pill i {
    font-size: 0.75rem;
}

/* ─── BLOG CARD GRID ─── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(255, 140, 0, 0.12);
    border-color: rgba(255, 140, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-image .card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-card-image i {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    color: var(--accent-orange);
    filter: drop-shadow(0 4px 12px rgba(255, 140, 0, 0.3));
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-image i {
    transform: scale(1.1);
}

/* Card image themes */
.card-bg-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d50 100%);
}

.card-bg-warm {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a1a0a 100%);
}

.card-bg-cool {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.card-bg-deep {
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1850 100%);
}

/* Geometric decoration inside card images */
.blog-card-image::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255, 140, 0, 0.08);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.blog-card-image::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(255, 140, 0, 0.04);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.blog-card-body {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: #aaa;
}

.blog-card-category {
    background: rgba(255, 140, 0, 0.1);
    color: var(--accent-orange);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-body h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--secondary-dark);
    margin: 0 0 0.8rem;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.blog-card-body p {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.65;
    margin: 0 0 1.5rem;
    flex: 1;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-link {
    gap: 0.85rem;
}

/* ─── NEWSLETTER / CTA BANNER ─── */
.blog-cta-banner {
    background: linear-gradient(135deg, var(--secondary-dark), #3a3a3a);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.blog-cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-cta-banner-content {
    position: relative;
    z-index: 2;
}

.blog-cta-banner-content h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.blog-cta-banner-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin: 0;
}

.blog-cta-banner-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}


/* ─── ARTICLE PAGE: READING PROGRESS ─── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-orange), #ffaa33);
    z-index: 10000;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

/* ─── ARTICLE PAGE: LAYOUT ─── */
.blog-article {
    max-width: 780px;
    margin: 0 auto;
}

.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-orange);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.blog-back:hover {
    gap: 0.8rem;
}

/* Article Meta */
.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #999;
}

.blog-article-meta span i {
    color: var(--accent-orange);
    font-size: 0.8rem;
}

.blog-article-category {
    background: rgba(255, 140, 0, 0.1);
    color: var(--accent-orange);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Article Content Typography */
.blog-article h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary-dark);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 0;
}

.blog-article h2::after {
    display: none;
}

.blog-article h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-dark);
    margin: 2rem 0 0.8rem;
}

.blog-article p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 1.5rem;
}

.blog-article ul,
.blog-article ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.blog-article ul li,
.blog-article ol li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: #444;
    font-size: 1.02rem;
    line-height: 1.75;
}

.blog-article ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-size: 0.85rem;
    top: 0.65rem;
}

.blog-article ol {
    counter-reset: article-counter;
    list-style: none;
}

.blog-article ol li {
    counter-increment: article-counter;
}

.blog-article ol li::before {
    content: counter(article-counter) ".";
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: 800;
    font-size: 1rem;
    top: 0.5rem;
}

/* ─── CALLOUT BOX ─── */
.blog-callout {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.06), rgba(255, 140, 0, 0.02));
    border-left: 4px solid var(--accent-orange);
    padding: 1.5rem 2rem;
    border-radius: 0 16px 16px 0;
    margin: 2rem 0;
}

.blog-callout p {
    margin: 0;
    color: #444;
    font-size: 1rem;
}

.blog-callout strong {
    color: var(--secondary-dark);
}

.blog-callout a {
    color: var(--accent-orange);
    font-weight: 700;
    text-decoration: none;
}

.blog-callout a:hover {
    text-decoration: underline;
}

/* Tip callout variant */
.blog-callout-tip {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02));
}

.blog-callout-tip .callout-icon {
    color: #10b981;
}

/* Warning callout variant */
.blog-callout-warning {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02));
}

.blog-callout-warning .callout-icon {
    color: #ef4444;
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--secondary-dark);
}

.callout-icon {
    font-size: 1rem;
    color: var(--accent-orange);
}

/* ─── TABLE STYLES ─── */
.blog-table-wrap {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.blog-table th {
    background: var(--secondary-dark);
    color: white;
    padding: 1rem 1.2rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}

.blog-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #555;
}

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

.blog-table tr:nth-child(even) td {
    background: #fafafa;
}

.blog-table .highlight-cell {
    color: var(--accent-orange);
    font-weight: 700;
}

/* ─── TABLE OF CONTENTS ─── */
.blog-toc {
    background: #f8f8f8;
    border-radius: 16px;
    padding: 1.8rem 2rem;
    margin: 0 0 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-toc-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--secondary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(255, 140, 0, 0.2);
}

.blog-toc-title i {
    color: var(--accent-orange);
}

.blog-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.blog-toc ol li {
    counter-increment: toc-counter;
    padding: 0.4rem 0;
    padding-left: 0;
}

.blog-toc ol li::before {
    display: none;
}

.blog-toc ol li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.blog-toc ol li a::before {
    content: counter(toc-counter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 140, 0, 0.1);
    color: var(--accent-orange);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.blog-toc ol li a:hover {
    background: rgba(255, 140, 0, 0.06);
    color: var(--accent-orange);
}

/* ─── AUTHOR BOX ─── */
.blog-author-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #f8f8f8;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin: 3rem 0 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-author-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-orange), #ffaa33);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-author-avatar i {
    font-size: 1.5rem;
    color: white;
}

.blog-author-info h4 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--secondary-dark);
    margin: 0 0 0.3rem;
}

.blog-author-info p {
    font-size: 0.88rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* ─── RELATED ARTICLES ─── */
.blog-related {
    padding: 4rem 2rem;
    background: #f8f8f8;
}

.blog-related-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-related h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.blog-related h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-orange);
    border-radius: 2px;
    margin: 0.8rem auto 0;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ─── SHARE BAR ─── */
.blog-share {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2rem 0;
    padding: 1.2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-share-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.blog-share-btn:hover {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
    transform: translateY(-2px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-featured-inner {
        grid-template-columns: 1fr;
    }
    .blog-featured-image {
        height: 200px;
    }
    .blog-featured-image::after {
        display: none;
    }
    .blog-featured-content {
        padding: 2rem 1.5rem 3rem;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-related-grid {
        grid-template-columns: 1fr;
    }
    .blog-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    .blog-author-box {
        flex-direction: column;
        text-align: center;
    }
    .blog-article h2 {
        font-size: 1.35rem;
    }
    .blog-toc {
        padding: 1.2rem 1.5rem;
    }
    .blog-filters {
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .blog-card-image {
        height: 160px;
    }
    .blog-featured-content h2 {
        font-size: 1.4rem;
    }
    .blog-article-meta {
        gap: 0.8rem;
    }
}
