/* Blog List Styles */
.content-container {
    max-width: 95%;
    width: 95%;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    color: white;
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.blog-description {
    color: white;
    font-size: 1.2rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.blog-search-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-btn {
    padding: 0.75rem 1rem;
    background: rgb(93, 131, 153);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: rgb(73, 111, 133);
}

.search-results-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.clear-search {
    color: #007bff;
    text-decoration: none;
    margin-left: 1rem;
}

.blog-posts-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.blog-post-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-container .post-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: white !important;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-content-preview {
    position: relative;
}

.blog-expand {
    position: absolute;
    top: 0;
    right: 0;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color 0.2s;
}

.blog-expand:hover {
    background: #0056b3;
}

.blog-content {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Custom Scrollbar for Blog Content */
.blog-content::-webkit-scrollbar {
    width: 8px;
}

.blog-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.blog-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.blog-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.page-item {
    margin: 0 0.25rem;
}

.page-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.page-link:hover {
    background-color: #e9ecef;
}

.page-item.active .page-link {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.admin-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background: #0056b3;
}

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

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

.btn-secondary {
    background: white;
    color: rgb(93, 131, 153);
    border: 2px solid rgb(93, 131, 153);
}

.btn-secondary:hover {
    background: rgb(93, 131, 153);
    color: white;
}

.no-posts {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Blog Detail Styles */
.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: rgb(93, 131, 153);
    background-color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 2px solid rgb(93, 131, 153);
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    background-color: rgb(93, 131, 153);
    color: white;
}

.breadcrumb-item.active {
    color: #6c757d;
}

.blog-post-detail {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-post-detail .post-title {
    font-size: 2.5rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    color: #333;
}

.post-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    color: #333;
    font-size: 1rem;
    margin-top: 0.25rem;
}

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

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

.post-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 2rem;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.post-sharing-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.post-sharing {
    text-align: center;
}

.sharing-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.sharing-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.related-posts {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.related-posts h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

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

.related-post-card {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: box-shadow 0.2s;
}

.related-post-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.related-post-title a {
    color: #333;
    text-decoration: none;
}

.related-post-title a:hover {
    color: #007bff;
}

.related-post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}



/* Blog Form Styles */
.blog-form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-header h1 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 2.5rem;
}

.form-description {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 300px;
    line-height: 1.6;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.checkbox-label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.field-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}

.field-errors, .form-errors {
    margin-top: 0.5rem;
}

.error {
    color: #dc3545;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-container {
        padding: 1rem;
    }
    
    .blog-posts-container {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .blog-post-detail {
        padding: 2rem 1.5rem;
    }
    
    .blog-post-detail .post-title {
        font-size: 2rem;
    }
    
    .post-meta {
        grid-template-columns: 1fr;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sharing-buttons {
        flex-direction: column;
    }
    
    .blog-form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
/* Rea
d More Link Styling */
.read-more-link {
    color: rgb(93, 131, 153);
    background-color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 2px solid rgb(93, 131, 153);
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more-link:hover {
    background-color: rgb(93, 131, 153);
    color: white;
}
/* Add
itional overflow prevention for blog content */
.blog-post-card * {
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post-card pre,
.blog-post-card code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.blog-post-card img {
    max-width: 100%;
    height: auto;
}

.blog-post-card table {
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

.blog-post-detail * {
    max-width: 100%;
    box-sizing: border-box;
}

.blog-post-detail pre,
.blog-post-detail code {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.blog-post-detail img {
    max-width: 100%;
    height: auto;
}

.blog-post-detail table {
    max-width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

/* Ensure the main content container doesn't overflow */
.content-container {
    overflow-x: hidden;
}

/* Ensure blog posts container doesn't create horizontal scroll */
.blog-posts-container {
    overflow-x: hidden;
}