/* ===== BLOG PAGE SPECIFIC STYLES ===== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.blog-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.blog-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-hero-image-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 60px 20px;
    margin-top: 2rem;
    backdrop-filter: blur(10px);
}

.blog-hero-image-placeholder p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Blog Controls */
.blog-controls {
    background: var(--light-bg);
    padding: 40px 0;
    border-bottom: 1px solid var(--soft-gray);
}

.blog-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.blog-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 2px solid var(--soft-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: var(--soft-gray);
}

.blog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-sort label {
    font-weight: 500;
    color: var(--text-dark);
}

.sort-select {
    padding: 10px 16px;
    border: 2px solid var(--soft-gray);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.blog-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid var(--soft-gray);
    border-radius: 20px;
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.category-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Featured Posts */
.featured-posts {
    padding: 80px 0;
    background: white;
}

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

.featured-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.featured-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.featured-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--soft-gray), var(--light-bg));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid var(--soft-gray);
}

.featured-image-placeholder p {
    margin: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.featured-content {
    padding: 24px;
}

.featured-content h3 {
    font-size: 1.4rem;
    margin: 12px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.featured-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* All Posts */
.all-posts {
    padding: 80px 0;
    background: var(--light-bg);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.post-card-image {
    height: 150px;
    background: linear-gradient(135deg, var(--soft-gray), var(--light-bg));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid var(--soft-gray);
}

.post-card-image p {
    margin: 0.25rem 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-card-content {
    padding: 20px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.category-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tag.technical {
    background: rgba(0, 119, 182, 0.1);
    color: var(--primary-blue);
}

.category-tag.forestry {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.category-tag.personal {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.category-tag.ai {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.reading-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-card-content h3 {
    font-size: 1.2rem;
    margin: 12px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.post-card-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--soft-gray);
}

.post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.post-tags .tag {
    padding: 2px 8px;
    background: var(--soft-gray);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
}

.post-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 60px;
}

/* Tag Cloud */
.tag-cloud-section {
    padding: 80px 0;
    background: white;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    padding: 20px;
}

.tag-cloud-tag {
    padding: 8px 16px;
    background: var(--soft-gray);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tag-cloud-tag:hover {
    background: var(--primary-blue);
    color: white;
    transform: scale(1.05);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-search {
        max-width: none;
    }
    
    .blog-categories {
        justify-content: center;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tag-cloud {
        gap: 8px;
    }
    
    .tag-cloud-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 100px 0 60px;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .featured-content,
    .post-card-content {
        padding: 16px;
    }
    
    .featured-content h3,
    .post-card-content h3 {
        font-size: 1.1rem;
    }
}

/* Animation for post cards */
.post-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search suggestions styling */
.search-suggestions {
    background: white;
    border: 2px solid var(--soft-gray);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--soft-gray);
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background: var(--light-bg);
}

.suggestion-item:last-child {
    border-bottom: none;
} 