/* Blog CSS - Professional and Modern Design */

/* Main layout */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.blog-hero {
    position: relative;
    color: #fff;
    text-align: center;
    background-color: #0a192f;
    background-image: linear-gradient(135deg, #0a192f 0%, #304769 100%);
    padding: 6rem 1rem;
    margin-bottom: 4rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/blog-hero.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 0;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.blog-hero .search-container {
    max-width: 500px;
    margin: 0 auto;
}

.blog-search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 20px;
    color: #fff;
    font-size: 1rem;
}

.blog-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.blog-search-form button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search-form button:hover {
    background: #2980b9;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .blog-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.blog-main {
    overflow: hidden;
}

.blog-sidebar {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Featured Post */
.featured-post {
    position: relative;
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 400px;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.featured-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.featured-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    z-index: 1;
}

.featured-post-tag {
    display: inline-block;
    background: #3498db;
    color: white;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.featured-post-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.9;
}

.featured-post-meta img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
}

/* Post Cards */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-tag {
    display: inline-block;
    background: #f1f1f1;
    color: #333;
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.post-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

.post-card-author {
    display: flex;
    align-items: center;
}

.post-card-author img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-right: 8px;
}

.post-card-stats {
    display: flex;
    align-items: center;
}

.post-card-stats span {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.post-card-stats i {
    margin-right: 5px;
    font-size: 0.9rem;
}

/* Sidebar Components */
.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    font-weight: 600;
}

.sidebar-categories a,
.sidebar-tags a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-categories a:hover,
.sidebar-tags a:hover {
    color: #3498db;
    padding-left: 5px;
}

.sidebar-categories .count,
.sidebar-tags .count {
    float: right;
    background: #f1f1f1;
    color: #777;
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.popular-posts .post-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.popular-posts .post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-posts .post-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.popular-posts .post-item-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.popular-posts .post-item-meta {
    font-size: 0.75rem;
    color: #888;
}

.newsletter-subscribe {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.newsletter-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.newsletter-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
}

.newsletter-form input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.newsletter-form button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #2980b9;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    background: #f1f1f1;
    color: #555;
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #3498db;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 5px;
    background: #f1f1f1;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover,
.pagination a.active {
    background: #3498db;
    color: white;
}

.pagination .prev,
.pagination .next {
    width: auto;
    padding: 0 15px;
}

/* Blog post detail page */
.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #333;
}

.post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.post-meta img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-meta-info span {
    display: flex;
    align-items: center;
}

.post-meta-info i {
    margin-right: 5px;
}

.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 2rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.post-content ul, 
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: #555;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.post-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content code {
    background: #f8f9fa;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.post-tags a {
    display: inline-block;
    background: #f1f1f1;
    color: #555;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
}

.post-tags a:hover {
    background: #3498db;
    color: white;
}

/* Author box */
.author-box {
    display: flex;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.author-bio {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #555;
    transition: all 0.2s;
}

.author-social a:hover {
    background: #3498db;
    color: white;
}

/* Related posts */
.related-posts {
    margin-bottom: 2rem;
}

.related-posts-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Comments section */
.comments-section {
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #888;
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.comment-reply {
    margin-top: 1rem;
    margin-left: 4rem;
}

.comment-form-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.comment-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

.comment-form button {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form button:hover {
    background: #2980b9;
}

/* Category page */
.category-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.category-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.category-description {
    font-size: 1rem;
    color: #666;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .featured-post {
        height: 300px;
    }
    
    .featured-post-title {
        font-size: 1.5rem;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}