/* =================================================================
   BLOG PAGE - ADDITIONAL STYLES
================================================================= */

/* Blog Hero Section */
.blog-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(52, 143, 80, 0.15) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M20 20h60v60H20z' fill='none' stroke='%23348f50' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E") repeat;
    opacity: 0.05;
}

.blog-hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Blog Search Bar */
.blog-search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 15px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: #56b4d3;
    box-shadow: 0 0 0 4px rgba(86, 180, 211, 0.1);
}

.search-icon {
    padding: 0 20px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-input {
    flex: 1;
    padding: 15px 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    padding: 0 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.search-clear.visible {
    opacity: 1;
}

.search-clear:hover {
    color: #ff4757;
}

.search-btn {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 143, 80, 0.3);
}

/* Blog Filters */
.blog-filters {
    padding: 30px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--navbar-height);
    z-index: 100;
    backdrop-filter: blur(20px);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.category-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-tab {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.category-tab:hover,
.category-tab.active {
    border-color: #56b4d3;
    color: white;
    transform: translateY(-2px);
}

.category-tab:hover::before,
.category-tab.active::before {
    left: 0;
}

.category-tab.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(52, 143, 80, 0.3);
}

.sort-select {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 150px;
}

.sort-select:focus {
    outline: none;
    border-color: #56b4d3;
    box-shadow: 0 0 0 3px rgba(86, 180, 211, 0.1);
}

/* Featured Posts */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.featured-post {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.featured-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.featured-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(52, 143, 80, 0.15);
    border-color: rgba(86, 180, 211, 0.3);
}

.featured-post:hover::before {
    transform: scaleX(1);
}

.post-image {
    position: relative;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-placeholder {
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.3;
}

.post-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.post-category-badge.trending {
    background: linear-gradient(135deg, #ff6b35, #ff8e53);
    color: white;
}

.post-category-badge.hot {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
}

.post-category-badge.news {
    background: linear-gradient(135deg, #56b4d3, #348f50);
    color: white;
}

.post-category-badge.tech {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.post-category-badge.education {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.post-category-badge.analysis {
    background: linear-gradient(135deg, #00d4aa, #00e5ff);
    color: white;
}

.post-category-badge.defi {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #333;
}

.post-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--text-primary);
}

.post-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.post-content h3 a:hover {
    color: #56b4d3;
}

.post-content > p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(86, 180, 211, 0.1);
    color: #56b4d3;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(86, 180, 211, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(86, 180, 211, 0.2);
    transform: translateY(-1px);
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Blog Grid Layout */
.blog-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-post-card {
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(52, 143, 80, 0.15);
    border-color: rgba(86, 180, 211, 0.3);
}

.blog-post-card .post-image {
    height: 160px;
}

.blog-post-card .post-content {
    padding: 25px;
}

.blog-post-card h3 {
    font-size: 1.2rem;
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    padding: 30px;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.sidebar-widget p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Newsletter Signup */
.newsletter-signup {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-signup input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.newsletter-signup input:focus {
    outline: none;
    border-color: #56b4d3;
    box-shadow: 0 0 0 3px rgba(86, 180, 211, 0.1);
}

.newsletter-signup .btn {
    padding: 12px 20px;
    font-size: 0.95rem;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-post {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.popular-post:hover {
    background: rgba(86, 180, 211, 0.05);
    transform: translateX(5px);
}

.popular-post-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.popular-post-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-post-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.popular-post-content h4 a:hover {
    color: #56b4d3;
}

.popular-post-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.category-item:hover {
    background: rgba(86, 180, 211, 0.05);
    transform: translateX(5px);
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    background: rgba(86, 180, 211, 0.1);
    color: #56b4d3;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cloud-tag {
    background: rgba(86, 180, 211, 0.1);
    color: #56b4d3;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(86, 180, 211, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.cloud-tag:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Blog Pagination */
.blog-pagination {
    text-align: center;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.load-more-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
}

.load-more-btn .btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Newsletter CTA */
.newsletter-cta {
    background: var(--primary-gradient);
    color: white;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.newsletter-content > p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto 30px;
    gap: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
    background: white;
    color: #348f50;
    font-weight: 600;
    border: none;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.newsletter-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 0.95rem;
}

.newsletter-features .feature {
    opacity: 0.9;
}

/* Blog Filtering Animation */
.blog-post-card.filtered-out,
.featured-post.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.3s ease;
}

.blog-post-card.filtered-in,
.featured-post.filtered-in {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition: all 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .blog-hero {
        min-height: 50vh;
        padding: 100px 0 60px;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .blog-search-bar {
        flex-direction: column;
        max-width: 100%;
    }

    .search-btn {
        align-self: stretch;
    }

    .filters-wrapper {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .category-filters {
        justify-content: center;
        gap: 10px;
    }

    .category-tab {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .post-meta {
        flex-direction: column;
        gap: 8px;
    }

    .post-stats {
        justify-content: center;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }

    .newsletter-features {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .category-filters {
        flex-direction: column;
        align-items: center;
    }

    .category-tab {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .featured-post .post-content,
    .blog-post-card .post-content {
        padding: 20px;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .post-image {
        height: 140px;
    }

    .post-placeholder {
        font-size: 3rem;
    }

    .newsletter-content h2 {
        font-size: 2rem;
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .blog-filters {
    background: rgba(26, 26, 26, 0.95);
}

[data-theme="dark"] .search-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

/* Light Mode Specific Adjustments */
[data-theme="light"] .blog-filters {
    background: rgba(248, 249, 250, 0.95);
}

[data-theme="light"] .search-input-wrapper {
    background: rgba(255, 255, 255, 0.8);
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .featured-post,
    .blog-post-card,
    .popular-post,
    .category-item {
        transition: none;
    }
    
    .category-tab::before {
        transition: none;
    }
}

/* Focus styles for better accessibility */
.category-tab:focus,
.search-input:focus,
.load-more-btn:focus,
.cloud-tag:focus {
    outline: 3px solid #56b4d3;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .blog-filters,
    .blog-sidebar,
    .newsletter-cta,
    .chat-widget,
    .scroll-top {
        display: none;
    }
    
    .blog-post-card,
    .featured-post {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .blog-content-wrapper {
        grid-template-columns: 1fr;
    }
}