/* Blog Section Styles */
.blog-section {
    min-height: 100vh;
    padding: 100px 0 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    color: #fff;
    margin-bottom: 1rem;
}

.section-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Blog Controls */
.blog-controls {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

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

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sort-box label {
    color: #333;
    font-weight: 500;
}

.sort-box select {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
    outline: none;
    font-size: 1rem;
}

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

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

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

.blog-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.blog-author {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-date {
    color: #999;
    font-size: 0.85rem;
}

.blog-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #999;
}

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

.blog-tag {
    background: #f0f0f0;
    color: #667eea;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Blog Modal */
.blog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    overflow: hidden;
}

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

.blog-modal-content {
    width: 95%;
    height: 95%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.blog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.close-btn {
    background: #ff4757;
    color: #fff;
    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;
}

.close-btn:hover {
    background: #ff3838;
}

.blog-modal-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.like-btn:hover {
    transform: scale(1.05);
}

.like-btn.liked {
    background: linear-gradient(135deg, #ff4757 0%, #d63031 100%);
}

.view-count {
    color: #666;
    font-size: 1rem;
}

#blog-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3rem;
    color: #fff;
    font-size: 1.2rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #fff;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .blog-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box, .sort-box {
        width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
