/* Blog-specific styles extending main site design */

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

.blog-header::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.blog-header h1 {
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-header p {
    font-size: var(--font-size-md);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Blog Controls */
.blog-controls {
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.search-filter-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--highlight-color);
}

/* Blog Posts Grid */
.blog-posts {
    padding: var(--section-padding);
}

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

.post-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: var(--font-size-sm);
}

.post-category {
    background: var(--highlight-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.post-date {
    color: var(--text-light);
}

.post-content h3 {
    margin-bottom: 1rem;
    line-height: var(--line-height-tight);
}

.post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: var(--highlight-color);
}

.post-content p {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: 1.5rem;
}

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

.read-time {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    text-decoration: underline;
}

/* Loading and No Results */
.loading-indicator,
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading-indicator i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--highlight-color);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

/* Blog Stats */
.blog-stats {
    background: var(--bg-secondary);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--highlight-color);
    margin-bottom: 1rem;
}

.stat-item h3 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

/* Navigation active state for blog */
.nav-link.active {
    color: var(--highlight-color) !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--highlight-color);
    border-radius: 1px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-header {
        padding: 100px 0 60px;
    }
    
    .blog-header h1 {
        font-size: var(--font-size-lg);
    }
    
    .blog-header p {
        font-size: var(--font-size-base);
    }
    
    .search-filter-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-controls select {
        flex: 1;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-item i {
        font-size: 2rem;
    }
    
    .stat-item h3 {
        font-size: var(--font-size-md);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .post-content {
        padding: 1rem;
    }
}