/* ============================================
   BLOG PAGE - DARK THEME (Matching Homepage)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary, #0a0a1a);
    padding-top: 100px;
    line-height: 1.8;
    color: var(--text-primary, #f8fafc);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hero Section - Dark Theme with Gradient Overlay */
.hero-section {
    background: linear-gradient(135deg, var(--bg-primary, #0a0a1a) 0%, var(--bg-secondary, #0d1117) 50%, var(--bg-tertiary, #0f172a) 100%);
    color: var(--text-primary, #f8fafc);
    padding: 100px 40px 80px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.hero-section p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Bar - Dark Glassmorphism */
.search-bar {
    max-width: 600px;
    display: flex;
    gap: 12px;
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 15px;
    outline: none;
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-primary, #f8fafc);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.search-bar input::placeholder {
    color: var(--text-muted, #64748b);
}

.search-bar input:focus {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.search-bar button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary, #6366f1);
}

/* Featured Section */
.featured-section {
    margin-bottom: 4rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Featured Card - Dark Glassmorphism */
.featured-card {
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 25px 50px -12px rgba(99, 102, 241, 0.25),
        0 0 30px rgba(99, 102, 241, 0.15);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Post Image */
.post-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.post-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.featured-card:hover .post-image::before,
.post-card:hover .post-image::before {
    transform: translateX(100%);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post Content */
.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.category-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary, #6366f1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary, #6366f1);
}

.post-excerpt {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
}

.read-more {
    color: var(--primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    color: var(--accent, #06b6d4);
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted, #64748b);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Regular Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Card - Dark Theme */
.post-card {
    background: var(--glass-bg, rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

/* Sidebar - Dark Theme */
.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-section {
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: var(--primary, #6366f1);
}

.category-list, .tag-list {
    list-style: none;
}

.category-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.category-item a {
    text-decoration: none;
    color: var(--text-secondary, #94a3b8);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-item a:hover {
    color: var(--text-primary, #f8fafc);
}

.category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tag-item:hover {
    background: var(--primary, #6366f1);
    color: white;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Pagination - Dark Theme */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 3rem;
}

.pagination a, .pagination span {
    padding: 12px 18px;
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    color: var(--primary, #6366f1);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
}

.pagination a:hover {
    background: var(--primary, #6366f1);
    color: white;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 20px;
}

.empty-state i {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 2rem;
}

/* Coming Soon Section */
.coming-soon {
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 20px;
    padding: 4rem 3rem;
    text-align: center;
}

.coming-soon i {
    font-size: 80px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.coming-soon h2 {
    font-size: 2.5rem;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 1rem;
}

.coming-soon p {
    font-size: 1.15rem;
    color: var(--text-secondary, #94a3b8);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Subscribe Form */
.subscribe-form {
    max-width: 500px;
    margin: 2rem auto;
    display: flex;
    gap: 12px;
}

.subscribe-form input {
    flex: 1;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary, #f8fafc);
    transition: all 0.3s ease;
}

.subscribe-form input::placeholder {
    color: var(--text-muted, #64748b);
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.subscribe-form button {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.subscribe-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--glass-bg, rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.feature-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--accent, #06b6d4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .hero-section {
        padding: 80px 20px 60px;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .featured-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-bar button {
        width: 100%;
    }

    .subscribe-form {
        flex-direction: column;
    }

    .subscribe-form button {
        width: 100%;
    }

    .coming-soon {
        padding: 3rem 2rem;
    }

    .coming-soon h2 {
        font-size: 2rem;
    }
}

/* Light Theme Override */
body.light-theme {
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .hero-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

body.light-theme .hero-section::before {
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

body.light-theme .hero-section h1 {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .hero-section p {
    color: rgba(255, 255, 255, 0.9);
}

body.light-theme .search-bar {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .search-bar input {
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .search-bar input::placeholder {
    color: #94a3b8;
}

body.light-theme .section-title {
    color: #1e293b;
}

body.light-theme .featured-card,
body.light-theme .post-card,
body.light-theme .sidebar-section,
body.light-theme .coming-soon,
body.light-theme .feature-card,
body.light-theme .empty-state {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-theme .post-title {
    color: #1e293b;
}

body.light-theme .post-excerpt,
body.light-theme .category-item a,
body.light-theme .coming-soon p,
body.light-theme .feature-card p {
    color: #64748b;
}

body.light-theme .sidebar-title,
body.light-theme .coming-soon h2,
body.light-theme .feature-card h3,
body.light-theme .empty-state h3 {
    color: #1e293b;
}

body.light-theme .category-badge {
    background: #e0e7ff;
    color: #6366f1;
    border-color: transparent;
}

body.light-theme .tag-item {
    background: #f3f4f6;
    border-color: #e2e8f0;
    color: #64748b;
}

body.light-theme .tag-item:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

body.light-theme .pagination a,
body.light-theme .pagination span {
    background: #fff;
    border-color: #e2e8f0;
}

body.light-theme .pagination a:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

body.light-theme .subscribe-form input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-theme .category-item:hover {
    background: #f3f4f6;
}

body.light-theme .post-footer {
    border-top-color: #e2e8f0;
}
