/* ================================
   Blog Page Specific Styles
   ================================ */

/* Prevent white flash on page load */
html {
    background-color: #0a0a0f;
}

body {
    background-color: #0a0a0f;
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Blog Hero Section */
.blog-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 80px;
    overflow: hidden;
}

.blog-hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-content .hero-headline {
    font-size: clamp(40px, 6vw, 64px);
    margin-bottom: 24px;
}

.blog-hero-content .hero-description {
    font-size: 18px;
    max-width: 600px;
}

/* Nav Active State for Blog */
.nav-active {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Featured Post Section */
.blog-featured {
    padding: 0 0 80px;
    background: var(--bg-primary);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    padding-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

/* Hidden Utility Class for Filtering */
.hidden {
    display: none !important;
}

.category-tab {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-medium);
}

.category-tab:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: var(--bg-primary);
}

/* Featured Posts Container */
.featured-posts-container {
    position: relative;
    /* Static layout */
}

.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



.featured-post:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 20px 80px rgba(0, 212, 255, 0.1);
}

.featured-image {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--bg-primary);
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.featured-content h2 {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.featured-content>p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.post-category {
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-date {
    font-size: 13px;
    color: var(--text-muted);
}

/* Blog Posts Grid Section */
.blog-posts {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* Post Card */
.post-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-medium);
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.post-image {
    display: block;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: 28px;
}

.post-content h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-content h3 a:hover {
    color: var(--accent-primary);
}

.post-content>p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Load More Button */
.blog-load-more {
    text-align: center;
    margin-top: 60px;
}

.blog-load-more .btn-secondary {
    width: auto;
    padding: 16px 40px;
}

/* Newsletter Section */
.blog-newsletter {
    padding: 100px 0;
    background: var(--bg-primary);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.newsletter-content>p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.newsletter-content form {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
}

.newsletter-content form p {
    display: inline-block;
    margin: 0 8px;
    vertical-align: middle;
}

.newsletter-content form input[type="email"] {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    outline: none;
    transition: all var(--transition-fast);
}

.newsletter-content form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.newsletter-content form input[type="email"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.newsletter-content form .btn-primary {
    white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .category-tabs {
        gap: 6px;
        margin-bottom: 24px;
    }

    .category-tab {
        padding: 10px 18px;
        font-size: 13px;
    }

    .featured-post {
        display: flex !important;
        /* Override grid */
        flex-direction: column;
        /* Static layout for mobile */
    }



    .featured-image {
        height: 280px;
    }

    .featured-content {
        padding: 32px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-hero-content .hero-headline {
        font-size: 32px;
    }

    .featured-content h2 {
        font-size: 24px;
    }

    .post-content {
        padding: 20px;
    }

    .post-content h3 {
        font-size: 16px;
    }
}

/* Coming Soon Badge */
.coming-soon-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 16px;
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    backdrop-filter: blur(4px);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

.coming-soon-badge+img {
    filter: blur(4px);
    transform: scale(1.1);
    /* Prevents blurred edges from showing container background */
}