/* Blog Public Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.blog-header {
    background: #000000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* Overlay for background image to ensure text readability */
.blog-header[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 0;
}

.blog-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.blog-header h1 a {
    color: #ffffff !important;
    text-decoration: none;
}

/* Search Form */
.search-nav {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 250px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.search-button {
    padding: 0.5rem 1.5rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0056b3;
}

/* Search Results Info */
.search-results-info {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.search-results-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.search-results-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Main Content */
.blog-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.blog-content {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Posts */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

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

.post-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.post-header h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-header h2 a:hover {
    color: #007bff;
}

.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-meta time {
    font-weight: 500;
}

.post-category {
    margin-left: 1rem;
}

.post-category a {
    color: #007bff;
    text-decoration: none;
}

.post-category a:hover {
    text-decoration: underline;
}

.post-content {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 1.5rem 0 1rem 0;
    color: #2c3e50;
}

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

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

.post-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6c757d;
    font-style: italic;
}

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

.post-footer {
    margin-top: 1.5rem;
}

.read-more {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Single Post */
.post-single {
    border-bottom: none;
    margin-bottom: 0;
}

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

/* Sidebar */
.blog-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: #6c757d;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: #007bff;
}

.post-count {
    font-size: 0.8rem;
    color: #adb5bd;
}

.link-list {
    list-style: none;
}

.link-list li {
    margin-bottom: 0.5rem;
}

.link-list a {
    color: #6c757d;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.link-list a:hover {
    color: #007bff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.pagination-link {
    color: #007bff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background-color: #007bff;
    color: #fff;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Post Navigation */
.post-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 3rem 0;
    color: #6c757d;
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Footer */
.blog-footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.blog-footer p {
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .blog-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input {
        flex: 1;
        width: auto;
    }
    
    .post-header h2 {
        font-size: 1.5rem;
    }
    
    .post-single .post-header h1 {
        font-size: 2rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}
