/* Reset and base styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
}
main {
    margin-top: 100px;
    justify-content: center;
   
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    height: 80%;
    /* Adjust for navbar/footer */
    min-height: 500px;
}

footer {
    width: 100%;
    padding: 1rem 0 1rem 0;
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
    position: relative;
    bottom: 0;
    left: 0;
    margin-top: 1rem;
    font-size: 1rem;
    color: #444;
}


/* Blog Index Page Styles */
.blog-container {
    width: 60%;
    margin: 2rem auto;
    padding: 0 1rem;
}

.blog-section {
    margin-bottom: 3rem;
}

.blog-section h2 {
    text-align: left;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.post-item:hover {
    background-color: #f8f8f8;
}

.post-title {
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
    flex: 1;
}

.post-title:hover {
    color: #0066cc;
}

.post-item time {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Blog Post Styling */
.blog-post {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 8px;
}

.post-content video {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 8px;
}

.post-content h2 {
    margin: 2.5rem 0 1.5rem;
    font-size: 1.8rem;
}

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

.tags {
    margin: 1.5rem 0;
    text-align: center;
}

.tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    margin: 0.3rem;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s;
}

.tag:hover {
    background: #eee;
    transform: translateY(-1px);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.post-navigation a {
    color: #555;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: all 0.2s;
    background: #f5f5f5;
}

.post-navigation a:hover {
    background: #eee;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        width: 95%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card {
        padding: 1.5rem;
    }
    
    .blog-post {
        padding: 0 1rem;
        margin: 2rem auto;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .blog-section h2 {
        font-size: 1.8rem;
    }

    .blog-container {
        width: 95%;
        margin: 1rem auto;
    }
    
    .post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-item time {
        margin-left: 0;
    }
}
