/* Innovative Blog Page Styles */

:root {
    --primary-glow: rgba(79, 141, 245, 0.4);
    --secondary-glow: rgba(139, 92, 246, 0.4);
}

.blog-hero {
    background: #050505;
    position: relative;
    overflow: hidden;
    padding-top: 10rem;
    padding-bottom: 8rem;
}

/* Mesh Gradient / Animated Blobs */
.blog-hero::before, .blog-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    opacity: 0.3;
    animation: blobFloat 20s infinite alternate;
}

.blog-hero::before {
    background: #4F8DF5;
    top: -100px;
    left: -100px;
}

.blog-hero::after {
    background: #8B5CF6;
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}

.text-gradient {
    background: linear-gradient(135deg, #4F8DF5 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

/* Glassmorphism Category Bar */
.category-bar-wrapper {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.5rem;
    display: inline-flex;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    color: #94a3b8;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.category-btn:hover {
    color: white;
}

.category-btn.active {
    background: white;
    color: black;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Featured Card - Floating Glass */
.featured-card {
    background: #0a0a0a !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3rem;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 20px rgba(139, 92, 246, 0.1);
}

@media (min-width: 1024px) {
    .featured-card {
        border-radius: 4rem;
    }
}

.featured-card:hover {
    box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 30px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

/* --- Individual Post Page Styles --- */

/* Reading Progress Bar */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #4F8DF5, #8B5CF6);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Post Banner */
.post-banner {
    background: linear-gradient(94deg, #2d53ba, #c12390 116%); /* WebSpide Logo Colors */
    border-radius: 2rem;
    padding: 4rem 2rem;
    color: white;
    box-shadow: 0 20px 40px rgba(193, 35, 144, 0.2);
}

/* Table of Contents */
.toc-sidebar {
    position: sticky;
    top: 6rem; /* Stick below header */
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    padding-right: 1rem;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}
.toc-sidebar::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 4px;
}

.toc-link {
    display: block;
    padding: 0.5rem 0;
    color: #64748b;
    font-size: 0.95rem;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.toc-link:hover {
    color: #0f172a;
    border-left-color: #cbd5e1;
}

.toc-link.active {
    color: #2563eb;
    font-weight: 600;
    border-left-color: #2563eb;
}

/* Post Content Typography */
.post-prose h2 {
    font-weight: 800;
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
    scroll-margin-top: 6rem; /* Offset for sticky header when jumping to anchors */
}

.post-prose h3 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
    scroll-margin-top: 6rem;
}

.post-prose p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1.5rem;
}

/* Social Share */
.share-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.3s ease;
}
.share-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-2px);
}
.share-btn.twitter:hover { background: #1da1f2; color: white; }
.share-btn.linkedin:hover { background: #0077b5; color: white; }
.share-btn.facebook:hover { background: #1877f2; color: white; }

/* Custom Layout for Post Page */
@media (min-width: 1024px) {
    .layout-sidebar {
        width: 25% !important;
        flex-shrink: 0;
    }
    .layout-content {
        width: 75% !important;
        flex-shrink: 0;
        padding-left: 2rem;
    }
}
@media (min-width: 1280px) {
    .layout-sidebar {
        width: 30% !important;
    }
    .layout-content {
        width: 70% !important;
        padding-left: 4rem;
    }
}

.featured-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 20px var(--secondary-glow);
}

/* Blog Cards - Innovative Hover */
.blog-card {
    background: white;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 3rem; /* Increased rounding */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    margin: 1rem;
    height: 240px;
}

.card-image {
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-card:hover .card-image {
    transform: scale(1.1) rotate(1deg);
}

.category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    color: black;
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Innovative Read More */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: black;
    position: relative;
}

.read-more-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #4F8DF5, #8B5CF6);
    transition: width 0.3s ease;
}

.blog-card:hover .read-more-btn::after {
    width: 100%;
}

/* Pagination - Futuristic */
.pagination-link {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.pagination-link.active {
    background: black;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Section Divider */
.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.title-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

/* Utility Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
