/* Blog Specific Styles */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.1;
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Content */
.blog-content {
    padding: 80px 0;
    background: var(--bg-light);
}

/* Blog Categories */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.category-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

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

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-content {
    padding: 2rem;
}

.blog-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-date::before {
    content: '📅';
    font-size: 1rem;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.blog-author::before {
    content: '👤';
    font-size: 1rem;
}

.blog-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-tag {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

/* Loading and Empty States */
.loading-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: block;
}

.no-posts-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-posts-message i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
}

.no-posts-message h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.no-posts-message p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Blog Detail Modal */
.blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.blog-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.blog-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.blog-modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.blog-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.blog-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.blog-modal-body {
    padding: 2rem;
}

.blog-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-modal-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-modal-content-text {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-modal-content-text h1,
.blog-modal-content-text h2,
.blog-modal-content-text h3,
.blog-modal-content-text h4,
.blog-modal-content-text h5,
.blog-modal-content-text h6 {
    color: var(--text-dark);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.blog-modal-content-text p {
    margin-bottom: 1.5rem;
}

.blog-modal-content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.blog-modal-content-text blockquote {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.blog-modal-content-text code {
    background: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.blog-modal-content-text pre {
    background: var(--bg-dark);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-modal-content-text pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-hero {
        padding: 100px 0 60px;
    }
    
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-description {
        font-size: 1.1rem;
    }
    
    .blog-content {
        padding: 60px 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .blog-modal {
        padding: 1rem;
    }
    
    .blog-modal-title {
        font-size: 1.5rem;
    }
    
    .blog-modal-body {
        padding: 1.5rem;
    }
    
    .blog-modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-content {
        padding: 40px 0;
    }
    
    .blog-card {
        margin: 0 -1rem;
        border-radius: 15px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-title {
        font-size: 1.25rem;
    }
}