/* ============================================
   BLOG PAGE STYLES — SEO-FOCUSED & PREMIUM
   ============================================ */

.blog-post-page,
.blog-listing-page {
    background: #020408;
    color: var(--text-primary);
    padding-top: 100px;
}

/* Breadcrumbs */
.breadcrumb-nav .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--accent-1);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.1);
    content: "/";
}

/* --- Listing Specific Styles --- */

.blog-hero {
    position: relative;
    padding-bottom: 4rem;
}

.featured-post-card {
    display: block;
    background: rgba(18, 22, 33, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.featured-img {
    height: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-img::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(18, 22, 33, 0.8));
}

@media (max-width: 991px) {
    .featured-img::after {
        background: linear-gradient(to bottom, transparent, rgba(18, 22, 33, 0.8));
    }
}

.featured-post-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.featured-post-card:hover .featured-img {
    transform: scale(1.05);
}

.featured-img {
    transition: transform 0.6s ease;
}

.featured-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #7c5cfc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-desc {
    font-size: 1.15rem;
    color: #a0aec0;
    line-height: 1.7;
}

/* Blog Cards */
.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}

.blog-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(124, 92, 252, 0.05), transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.blog-card.no-image {
    padding: 10px;
    background: rgba(18, 22, 33, 0.4);
    backdrop-filter: blur(20px);
}

.blog-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-1);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 92, 252, 0.1);
}

.blog-card:hover .blog-tag {
    color: var(--accent-1);
    transform: translateX(5px);
}

.blog-tag {
    display: inline-block;
    color: var(--accent-2);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.blog-img {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.blog-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.blog-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-body p {
    font-size: 1rem;
    color: #a0aec0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-footer {
    margin-top: auto;
}

.blog-link {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.blog-link:hover {
    gap: 12px;
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.1), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

/* --- Article Page Styles --- */
.blog-article-page {
    background: #020408;
    color: var(--text-primary);
    padding-top: 100px;
}

.blog-article-page .hero-title {
    font-size: clamp(2.2rem, 2.8vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.blog-article-page article {
    max-width: 960px;
}

.blog-article-page p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #b8c1d1;
    margin-bottom: 1.1rem;
}

.blog-article-page h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.blog-article-page h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
    color: #e8ecf5;
}

.blog-article-page a {
    color: var(--accent-1);
    text-decoration: none;
}

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

.blog-article-page .toc {
    background: rgba(18, 22, 33, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.5rem;
}

.blog-article-page .toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.blog-article-page .tool-placeholder {
    background: rgba(124, 92, 252, 0.12);
    border: 1px dashed rgba(124, 92, 252, 0.45);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    color: #e2dbff;
    font-weight: 600;
}

.blog-article-page .prompt-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.5rem;
}

.blog-article-page .prompt-list p {
    margin-bottom: 0.6rem;
}

.blog-article-page .cta-section {
    margin-top: 3rem;
    padding: 2.2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 92, 252, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.blog-article-page .cta-section .btn {
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .blog-article-page article {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .blog-article-page .toc,
    .blog-article-page .prompt-list,
    .blog-article-page .cta-section {
        padding: 1.2rem;
    }
}

.newsletter-cta::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

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

.newsletter-cta h2 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.cta-form {
    display: flex;
    gap: 15px;
    margin-top: 2.5rem;
}

.cta-form input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 24px;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.cta-form input:focus {
    border-color: var(--accent-1);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.1);
}

/* --- Post Specific Styles --- */

.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-category {
    display: inline-block;
    background: var(--accent-gradient);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(124, 92, 252, 0.3);
}

.post-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a2b1cd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-1);
}

/* Featured Image */
.featured-image-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 4rem;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Post Content - Readability Focus */
.post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e0;
}

.post-content .lead {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.6;
    color: #fff;
    margin-bottom: 2rem;
}

.post-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
}

.post-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
}

.post-content p {
    margin-bottom: 1.8rem;
}

.post-content blockquote {
    background: rgba(124, 92, 252, 0.05);
    border-left: 4px solid var(--accent-1);
    padding: 2.5rem;
    margin: 3rem 0;
    font-size: 1.3rem;
    font-style: italic;
    color: #fff;
    border-radius: 0 16px 16px 0;
}

.post-content ul {
    margin: 2rem 0;
    padding-left: 1.5rem;
}

.post-content ul li {
    margin-bottom: 1rem;
    position: relative;
}

.post-highlight-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
}

.post-highlight-box h4 {
    color: var(--accent-2);
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Footer Section */
.post-footer {
    max-width: 800px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.post-tags {
    display: flex;
    gap: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Author Card */
.author-card {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.author-card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

/* Social Share */
.share-grid {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-share:hover {
    transform: translateY(-5px);
    border-color: var(--accent-1);
    background: rgba(124, 92, 252, 0.1);
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
}

.related-card {
    display: block;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s ease;
}

.related-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.related-card h4 {
    padding: 20px 20px 10px;
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
}

.related-card .date {
    display: block;
    padding: 0 20px 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.related-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-1);
    background: rgba(255, 255, 255, 0.04);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .post-title {
        font-size: 2.5rem;
    }

    .post-meta {
        gap: 15px;
    }

    .post-footer {
        justify-content: center;
        text-align: center;
    }
}

/* Sidebar Styles */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
    /* Offset for navbar */
}

.sidebar-widget {
    background: rgba(18, 22, 33, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 18px;
    backdrop-filter: blur(20px);
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(124, 92, 252, 0.08);
    border-color: rgba(124, 92, 252, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-link.active h5 {
    color: var(--accent-1);
}

.sidebar-category {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 6px;
}

.sidebar-link h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 6px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.sidebar-link:hover h5 {
    color: #fff;
}

.sidebar-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.promo-box {
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(0, 212, 255, 0.05));
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(124, 92, 252, 0.2);
    text-align: center;
}

.promo-box h4 {
    font-size: 1.1rem;
    margin: 15px 0 10px;
    color: #fff;
    font-weight: 700;
}

.promo-box p {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.promo-box .badge {
    background: var(--accent-1);
    color: #fff;
    font-weight: 800;
    font-size: 0.65rem;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

@media (max-width: 991px) {
    .blog-sidebar {
        margin-top: 4rem;
    }
}

/* Flex Layout for Article & Sidebar */
.blog-flex-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.post-main-content {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.blog-sidebar-col {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    /* Space for navbar */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-sidebar-col::-webkit-scrollbar {
    display: none;
}

@media (max-width: 991px) {
    .blog-flex-layout {
        flex-direction: column;
        gap: 40px;
    }

    .blog-sidebar-col {
        width: 100%;
    }
}

/* ======================== */
/* Article Additional Styles */
/* ======================== */

/* Inline code */
.post-content code {
    background: rgba(124, 92, 252, 0.12);
    color: #c4b5fd;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

/* Links inside post content */
.post-content a {
    color: var(--accent-1);
    text-decoration: underline;
    text-decoration-color: rgba(124, 92, 252, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.post-content a:hover {
    text-decoration-color: var(--accent-1);
}

/* H2 visual separator */
.post-content h2 {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* List items spacing */
.post-content ul li {
    padding-left: 0.5rem;
    color: #b8c1d1;
}

/* Post meta spacing */
.post-meta {
    margin-top: 1.2rem;
}

/* Reading progress bar base */
#reading-progress {
    background: linear-gradient(90deg, #7c5cfc, #00d4ff);
}

/* ================================ */
/* Sidebar Article Minimal Links    */
/* ================================ */
.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-article-link {
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.sidebar-article-title {
    font-size: 0.92rem;
    font-weight: 500;
    color: #b8c1d1;
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.sidebar-article-link:hover .sidebar-article-title {
    color: var(--accent-1, #7c5cfc);
}