/* blog/css/style.css */

body {   
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Allows main content to grow and push footer down */
}

/* Removed Navbar adjustments */

/* Banner styling */
.banner_blog {
    width: 100%;
    padding: 55px 0px 60px 0px;
    background-image: url('/assets/header_bg.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 37%;
    border-top: 1px solid var(--primary);
    border-bottom: 1px solid var(--primary);
}
.header_text_blog {
    font-family: Arial, Helvetica, sans-serif;
    font-size: calc(1.125rem + 1.7vw); 
    line-height: 1.2;
    margin:0; 
    padding:0;
    color: var(--white);
    text-shadow: var(--green) 2px 1px 2px;
}
.banner_img_blog {
    max-height: 150px;
}


/* Post card styling */
.card {
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.card-img-top {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    height: 250px; /* Fixed height for consistent image size */
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.card-title a:hover {
    color: var(--green) !important; /* Bootstrap primary blue on hover */
    text-decoration: underline; /* Add underline for better UX */
}

.post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Tag badge styling */
.tag-badge {
    border-radius: 0.5rem;
    font-weight: normal;
    text-decoration: none;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
    display: inline-block;
    padding: 0.3em 0.6em;
    font-size: 0.875em;
    background-color: #e2e6ea;
    color: #495057;
    transition: background-color 0.2s ease, color 0.2s ease; /* Added color transition */
}

.tag-badge:hover {
    background-color: var(--green) !important;
    color: #212529; /* Darker text on hover */
}

.tag-list-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}
.tag-list-item:last-child {
    border-bottom: none;
}

/* Single post page styling */
/* Main post content - removed card styling */
.post-content {
    background-color: #fff; /* Ensure it has a white background */
    border-radius: 0.75rem; /* Keep rounded corners */
    box-shadow: none; /* Explicitly remove box-shadow */
    /* No transition or hover effect as it's not a clickable card */
}

.post-header-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    display: block; /* Ensure it behaves as a block for centering */
    margin-left: auto;
    margin-right: auto;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.post-body pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.social-share-buttons .btn {
    border-radius: 0.75rem;
    margin-right: 0.5rem;
}

/* Hover effect for links in Popular Tags and Other Related Posts cards */
.card .list-unstyled a {
    color: #343a40; /* Default text color */
    transition: color 0.2s ease; /* Smooth transition for color change */
}

.card .list-unstyled a:hover {
    color: var(--green) !important; /* Bootstrap primary blue on hover */
    text-decoration: underline; /* Add underline for better UX */
}


/* Admin panel styling */
.admin-card {
    border-radius: 0.75rem;
}

.table thead th {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
}

.admin-action-links .btn {
    border-radius: 0.5rem;
}

.admin-post-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}
.admin-post-list-item:last-child {
    border-bottom: none;
}
.admin-post-list-item .post-title {
    flex-grow: 1;
    margin-right: 1rem;
}
.admin-post-list-item .actions {
    flex-shrink: 0;
}

/* Forms */
textarea.form-control {
    min-height: 150px;
}

.char-counter {
    font-size: 0.8em;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
}

/* Post preview */
.post-preview-area {
    border: 1px dashed #ced4da;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 150px;
    background-color: #fff;
    overflow-y: auto;
}
.post-preview-area h1, .post-preview-area h2, .post-preview-area h3,
.post-preview-area h4, .post-preview-area h5, .post-preview-area h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.post-preview-area p {
    margin-bottom: 1rem;
}
.post-preview-area ul, .post-preview-area ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}


/* Responsive adjustments */
@media (max-width: 767.98px) {
    .card-img-top {
        height: 180px;
    }
}
