/* Blog Page Styles */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    padding: 60px 0;
}

/* Featured Post */
.featured-post {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, #b21f1f, #fdbb4d);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.featured-post h2 {
    font-size: 1.8rem;
    color: #1a2a6c;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 0.85rem;
}

.post-meta i {
    margin-right: 5px;
    color: #b21f1f;
}

.code-preview {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.code-preview pre {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.code-preview code {
    color: #00ff00;
}

/* Blog Posts */
.blog-post {
    display: flex;
    gap: 25px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.post-image {
    flex-shrink: 0;
}

.post-image img {
    width: 180px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}

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

.post-content {
    flex: 1;
}

.post-content h3 {
    font-size: 1.3rem;
    color: #1a2a6c;
    margin: 10px 0;
    line-height: 1.4;
}

.post-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: #b21f1f;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.read-more:hover {
    transform: translateX(5px);
    color: #8b1515;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: #1a2a6c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b21f1f;
    display: inline-block;
}

/* Calculator Widget */
.calculator-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.calculator-card h4 {
    color: #1a2a6c;
    margin-bottom: 15px;
    font-size: 1rem;
}

.calculator-input label {
    display: block;
    margin: 10px 0 5px;
    color: #495057;
    font-size: 0.9rem;
}

.calculator-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.calculator-input input:focus {
    outline: none;
    border-color: #b21f1f;
}

.calc-result {
    margin-top: 15px;
    padding: 12px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1a2a6c;
    font-weight: 500;
}

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

.tag-cloud a {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 6px 14px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: linear-gradient(135deg, #b21f1f, #fdbb4d);
    color: white;
    transform: translateY(-2px);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #b21f1f;
}

.newsletter-form button {
    background: linear-gradient(135deg, #b21f1f, #fdbb4d);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(178, 31, 31, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: linear-gradient(135deg, #b21f1f, #fdbb4d);
    color: white;
}

/* Related Posts */
.related-posts {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.related-posts h3 {
    font-size: 1.5rem;
    color: #1a2a6c;
    margin-bottom: 25px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card .content {
    padding: 15px;
}

.related-card h4 {
    font-size: 1rem;
    color: #1a2a6c;
    margin-bottom: 8px;
}

.related-card p {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Single Post Page */
.post-header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.post-header .post-meta {
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.post-content-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 0;
}

.post-content-single p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.post-content-single h2 {
    color: #1a2a6c;
    margin: 30px 0 15px;
}

.post-content-single h3 {
    color: #1a2a6c;
    margin: 25px 0 12px;
}

.post-content-single ul,
.post-content-single ol {
    margin: 20px 0;
    padding-left: 25px;
}

.post-content-single li {
    margin-bottom: 10px;
}

.post-content-single blockquote {
    background: #f8f9fa;
    border-left: 4px solid #b21f1f;
    padding: 20px 25px;
    margin: 25px 0;
    font-style: italic;
    color: #495057;
}

.post-content-single pre {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 25px 0;
}

.post-content-single code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.post-content-single pre code {
    background: none;
    color: #00ff00;
    padding: 0;
}

/* Author Box */
.author-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    gap: 25px;
    margin: 40px 0;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    color: #1a2a6c;
    margin-bottom: 5px;
}

.author-info p {
    color: #6c757d;
    margin-bottom: 10px;
}

.author-social a {
    color: #b21f1f;
    margin-right: 15px;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.author-social a:hover {
    color: #fdbb4d;
}

/* Comments Section */
.comments-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.comments-section h3 {
    font-size: 1.3rem;
    color: #1a2a6c;
    margin-bottom: 25px;
}

.comment {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.comment-content h4 {
    color: #1a2a6c;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 10px;
}

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

.comment-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-post {
        flex-direction: column;
    }
    
    .post-image img {
        width: 100%;
        height: 200px;
    }
    
    .featured-post h2 {
        font-size: 1.4rem;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .comment {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .featured-post {
        padding: 20px;
    }
    
    .blog-post {
        padding: 20px;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Code Syntax Highlighting */
.hljs-keyword { color: #ff79c6; }
.hljs-string { color: #50fa7b; }
.hljs-comment { color: #6272a4; }
.hljs-function { color: #8be9fd; }
.hljs-number { color: #bd93f9; }

/* Search Widget */
.search-widget form {
    display: flex;
    gap: 10px;
}

.search-widget input {
    flex: 1;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.search-widget button {
    background: #b21f1f;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-widget button:hover {
    background: #8b1515;
}

/* Categories Widget */
.categories-list {
    list-style: none;
    padding: 0;
}

.categories-list li {
    margin-bottom: 12px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    color: #495057;
    text-decoration: none;
    transition: color 0.3s;
}

.categories-list a:hover {
    color: #b21f1f;
}

.categories-list span {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Recent Posts Widget */
.recent-posts {
    list-style: none;
    padding: 0;
}

.recent-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts a {
    color: #1a2a6c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.recent-posts a:hover {
    color: #b21f1f;
}

.recent-posts .post-date {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Scroll to Top for Blog */
.blog-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #b21f1f, #fdbb4d);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.blog-scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.blog-scroll-top:hover {
    transform: translateY(-5px);
}