/* Blog System - Enhanced Styling */

/* Blog Header and Hero */
.blog-hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 20px;
    margin-bottom: 60px;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.blog-hero .lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Blog Stats */
.blog-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
    position: relative;
    z-index: 1;
}

.blog-stat {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.blog-stat:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Blog Controls */
.blog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 400px;
}

.blog-search input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.blog-search input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.blog-search input::placeholder {
    color: var(--muted);
}

.blog-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary);
    color: #0b0f1a;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.sort-dropdown {
    position: relative;
}

.sort-btn {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.sort-dropdown.active .sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.sort-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
    margin: 40px 0;
}

.blog-post {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.blog-post:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-post-image {
    height: 220px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.blog-post:hover .blog-post-image::before {
    transform: translateX(100%);
}

.blog-image-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.blog-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.blog-post-content {
    padding: 32px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
}

.blog-category {
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-read-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 15px;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.blog-tag {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.blog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.read-more {
    padding: 8px 20px;
    background: var(--primary);
    color: #0b0f1a;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.read-more:hover {
    background: #b8941f;
    transform: translateY(-1px);
}

.blog-stats-mini {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Featured Post */
.featured-post {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
}

.featured-post-image {
    height: 300px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary);
    color: #0b0f1a;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.featured-post .blog-title {
    font-size: 2rem;
    margin-bottom: 16px;
}

/* Sidebar */
.blog-sidebar {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 40px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.popular-posts {
    list-style: none;
    padding: 0;
}

.popular-post {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.popular-post:last-child {
    border-bottom: none;
}

.popular-post-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #0b0f1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.popular-post-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.popular-post-content h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-content h4 a:hover {
    color: var(--primary);
}

.popular-post-meta {
    font-size: 11px;
    color: var(--muted);
}

.newsletter-signup {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.newsletter-signup h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.newsletter-signup p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--primary);
}

.newsletter-form button {
    padding: 12px;
    background: var(--primary);
    color: #0b0f1a;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #b8941f;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 60px 0;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary);
    color: #0b0f1a;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    background: var(--primary);
    color: #0b0f1a;
    border-color: var(--primary);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 0;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 12px;
}

.no-results p {
    color: var(--muted);
    margin-bottom: 20px;
}

.no-results button {
    padding: 12px 24px;
    background: var(--primary);
    color: #0b0f1a;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .blog-search {
        max-width: none;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-post {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    
    .featured-post-image {
        height: 200px;
    }
    
    .featured-post-content {
        padding: 24px;
    }
    
    .blog-sidebar {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .blog-stats {
        grid-template-columns: 1fr;
    }
    
    .blog-categories {
        flex-direction: column;
    }
    
    .blog-post-content {
        padding: 24px;
    }
    
    .blog-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Dark/Light Theme Support */
[data-theme="light"] .blog-post {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .blog-controls {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .blog-sidebar {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}