/* ================================================
   ALGONET - Blog Post Styles
   ================================================ */

/* === Blog Post Hero === */
.blog-post-hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    z-index: 0;
}

.blog-post-hero-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    filter: blur(160px);
    opacity: 0.07;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    z-index: 0;
}

.blog-post-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-light);
    margin-bottom: 32px;
    transition: var(--transition);
}

.blog-back-link:hover {
    color: var(--primary);
    gap: 12px;
}

.blog-back-link i {
    font-size: 12px;
    transition: var(--transition);
}

.post-category-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.post-hero-title {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

.post-hero-excerpt {
    font-size: 18px;
    color: var(--gray-light);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 36px;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray);
}

.post-meta-item i {
    color: var(--primary);
    font-size: 13px;
}

.post-meta-divider {
    width: 4px;
    height: 4px;
    background: var(--gray);
    border-radius: 50%;
}

/* === Blog Post Layout === */
.blog-post-layout {
    padding: 60px 0 120px;
}

.blog-post-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Article Content === */
.article-content {
    font-size: 17px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
}

.article-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    margin: 52px 0 20px;
    letter-spacing: -0.3px;
    position: relative;
    padding-left: 20px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin: 36px 0 14px;
}

.article-content p {
    margin-bottom: 22px;
}

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

.article-content ul,
.article-content ol {
    margin: 20px 0 28px;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-content ul li,
.article-content ol li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.article-content ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 10px;
    flex-shrink: 0;
}

.article-content ol {
    counter-reset: list-counter;
}

.article-content ol li {
    counter-increment: list-counter;
}

.article-content ol li::before {
    content: counter(list-counter);
    width: 26px;
    height: 26px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.article-content blockquote {
    margin: 36px 0;
    padding: 28px 32px;
    background: rgba(0, 212, 255, 0.04);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-content blockquote p {
    font-size: 19px;
    font-style: italic;
    color: var(--white);
    margin-bottom: 0;
    line-height: 1.7;
}

.article-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: var(--primary);
    font-style: normal;
    font-weight: 600;
}

.article-content strong {
    color: var(--white);
    font-weight: 700;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--radius-lg);
    margin: 32px 0;
}

.info-box-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.info-box-icon i {
    font-size: 20px;
    color: var(--primary);
}

.info-box-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
}

.info-box-text p {
    font-size: 14px;
    color: var(--gray-light);
    line-height: 1.7;
    margin-bottom: 0 !important;
}

/* Stat Cards in Article */
.article-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 36px 0;
}

.article-stat-card {
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.article-stat-card:hover {
    border-color: rgba(0, 212, 255, 0.2);
    background: rgba(0, 212, 255, 0.04);
}

.article-stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 8px;
}

.article-stat-label {
    font-size: 13px;
    color: var(--gray-light);
    line-height: 1.4;
}

/* Article Divider */
.article-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 52px 0;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 52px;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.article-tags span {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    margin-right: 4px;
}

.article-tag-item {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 13px;
    color: var(--gray-light);
    transition: var(--transition);
}

.article-tag-item:hover {
    color: var(--primary);
    border-color: rgba(0, 212, 255, 0.3);
}

/* === Sidebar === */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.sidebar-widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* CTA Widget */
.sidebar-cta {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.06) 100%);
    border-color: rgba(0, 212, 255, 0.15);
    text-align: center;
}

.sidebar-cta-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 16px;
    margin: 0 auto 18px;
}

.sidebar-cta-icon i {
    font-size: 24px;
    color: var(--white);
}

.sidebar-cta h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sidebar-cta p {
    font-size: 14px;
    color: var(--gray-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.sidebar-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 20px;
}

/* TOC Widget */
.toc-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-item {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--gray-light);
    border-radius: 8px;
    transition: var(--transition);
    line-height: 1.4;
}

.toc-item:hover,
.toc-item.active {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.06);
}

/* Related Articles Widget */
.related-post-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.related-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-item:first-child {
    padding-top: 0;
}

.related-post-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--dark-3), var(--dark-4));
}

.related-post-info .tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-post-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-top: 4px;
    line-height: 1.4;
    transition: var(--transition);
}

.related-post-item:hover h4 {
    color: var(--primary);
}

/* === Article Bottom CTA === */
.article-bottom-cta {
    margin-top: 60px;
    padding: 48px 40px;
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.07) 0%, rgba(124, 58, 237, 0.05) 100%);
    border: 1px solid rgba(0, 212, 255, 0.12);
    border-radius: var(--radius-xl);
    text-align: center;
}

.article-bottom-cta h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
}

.article-bottom-cta p {
    font-size: 16px;
    color: var(--gray-light);
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.article-bottom-cta .cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .blog-post-grid {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-cta {
        grid-column: 1 / -1;
    }

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

@media (max-width: 768px) {
    .blog-post-hero {
        padding: 120px 0 60px;
    }

    .post-hero-title {
        font-size: 28px;
    }

    .post-hero-excerpt {
        font-size: 16px;
    }

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

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

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

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

    .article-bottom-cta {
        padding: 32px 24px;
    }

    .article-bottom-cta h3 {
        font-size: 22px;
    }

    .post-meta {
        gap: 12px;
    }

    .post-meta-divider {
        display: none;
    }
}
