/* Blog Specific Styles */

/* Blog and header styles */

/* Header styles */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: flex-end; /* Align items to the right */
}

.nav-menu li {
    margin: 0 0 0 25px; /* Keep space between nav items */
}

.nav-menu a {
    color: #444;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-menu a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .logo {
        flex-grow: 1; /* Let logo take available space */
    }
}

/* Blog Card Styles */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: none;
    border-radius: 10px;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.blog-card-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

/* Blog Post Content */
.blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #333;
}

.blog-post-meta {
    color: #6c757d;
    margin-bottom: 2rem;
    font-style: italic;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.featured-image {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
    color: #333;
}

.blog-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #222;
}

.blog-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul, .blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    padding: 1.5rem 2rem;
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 5px 5px 0;
}

.blog-content pre {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.blog-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    color: #e83e8c;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.blog-content a {
    color: #0d6efd;
    text-decoration: none;
    border-bottom: 1px dotted #0d6efd;
    transition: all 0.3s ease;
}

.blog-content a:hover {
    color: #0a58ca;
    border-bottom: 1px solid #0a58ca;
}

/* Tags */
.blog-tags {
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.blog-tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.blog-tag:hover {
    background: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.05);
}

/* Blog Page Header */
.page-header {
    background-color: #f8f9fa;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    font-weight: 700;
    color: #333;
}

.page-header .lead {
    max-width: 700px;
    margin: 0 auto;
    color: #6c757d;
}

/* Pagination */
.blog-pagination {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.blog-pagination .page-link {
    border-radius: 50%;
    margin: 0 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #495057;
}

.blog-pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Related posts */
.related-posts {
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid #e9ecef;
}

.related-posts h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Author section */
.blog-author {
    display: flex;
    padding: 1.5rem;
    margin: 2rem 0;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.blog-author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1.5rem;
}

.blog-author-info h5 {
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-post-title {
        font-size: 2rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .featured-image {
        max-height: 300px;
    }
    
    .blog-author {
        flex-direction: column;
        text-align: center;
    }
    
    .blog-author-img {
        margin: 0 auto 1rem;
    }
}

/* Print styles */
@media print {
    header, footer, .blog-tags, .related-posts {
        display: none;
    }
    
    .blog-post-title, .blog-content {
        color: black;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}

/* Animation for blog cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.blog-card {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Improved Responsive styles */
@media (max-width: 992px) {
    .blog-post-title {
        font-size: 2.2rem;
    }
    
    .featured-image {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .blog-post-title {
        font-size: 1.8rem;
        margin-top: 1rem;
    }
    
    .blog-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .featured-image {
        max-height: 300px;
    }
    
    .blog-post-meta {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }
    
    .blog-content h2 {
        font-size: 1.6rem;
        margin-top: 2rem;
    }
    
    .blog-content h3 {
        font-size: 1.4rem;
    }
    
    .blog-content blockquote {
        padding: 1.2rem 1.5rem;
        margin: 1.2rem 0;
    }
    
    .blog-tags {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .blog-post-title {
        font-size: 1.6rem;
    }
    
    .blog-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .featured-image {
        max-height: 250px;
        margin-bottom: 1.2rem;
    }
    
    .blog-card-img {
        height: 180px;
    }
    
    .blog-tag {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .blog-content-wrapper {
        padding-top: 100px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .blog-card:hover {
        transform: none;
    }
    
    .blog-card:active {
        transform: scale(0.98);
    }
    
    .blog-tag {
        padding: 8px 15px; /* Larger touch target */
    }
}

/* Dark mode media query */
@media (prefers-color-scheme: dark) {
    .blog-content {
        color: #e1e1e1;
    }
    
    .blog-content a {
        color: #6c8fff;
    }
    
    .blog-content blockquote {
        background-color: #2a2a2a;
    }
    
    .blog-tag {
        background-color: #2a3348;
        color: #9eacff;
    }
}
