/* New Single Post Styles */
.single-post-content {
    background-color: var(--main-div-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.single-post-content h1 {
    color: #ffffff;
    font-size: 32px;
    margin-bottom: 10px;
}

.single-post-content .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #1a1a1a; /* Dark background for meta info */
    border-radius: 5px;
    font-size: 14px;
    color: #ffffff; /* White text for dark mode */
}

.single-post-content .post-meta a {
    color: #c00; /* Red color for category link */
    text-decoration: none;
    font-weight: bold;
}

.single-post-content .post-meta a:hover {
    text-decoration: underline;
}

.single-post-content .post-meta i {
    margin-right: 5px;
    color: #c00;
}

.single-post-content .post-hero-image {
    display: block; /* Make it a block element */
    margin: 0 auto; /* Center it horizontally */
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain; /* Ensures the whole image is visible within its bounds */
}

.single-post-content .post-body p {
    color: #cccccc;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Comments Section */
.comment-section {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.comment-section h4 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    background-color: #3a3a3a;
    padding: 10px;
    border-radius: 5px;
}

.comment-item strong {
    color: #fff;
    font-size: 16px;
}

.comment-item p {
    color: #ccc;
    font-size: 14px;
    margin: 0;
}

/* Comment Form Section */
.comment-form-section {
    background-color: #2d2d2d;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.comment-form-section h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
}

.comment-form-section .form-group {
    margin-bottom: 15px;
}

.comment-form-section .form-control {
    background-color: #333; /* Darker background for form controls in dark mode */
    color: #fff;
    border: 1px solid #555;
}

.comment-form-section .form-control::placeholder {
    color: #bbb;
}

.comment-form-section .btn-primary {
    background-color: #c00;
    border-color: #c00;
    color: #fff;
}

.comment-form-section .btn-primary:hover {
    background-color: #a00;
    border-color: #a00;
}



/* Responsive adjustments for single post */
@media (max-width: 768px) {
    .single-post-content {
        padding: 15px;
    }

    .single-post-content h1 {
        font-size: 26px;
    }

    .single-post-content .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .single-post-content .post-body p {
        font-size: 15px;
    }
}

/* Ensure images within post-body are responsive */
.post-body img {
    max-width: 100%;
    height: auto;
}

/* Ensure tables within post-body are responsive */
.post-body table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
}

.post-body table thead,
.post-body table tbody,
.post-body table th,
.post-body table td,
.post-body table tr {
    display: block;
}

.post-body table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

.post-body table tr {
    border: 1px solid #ccc;
}

.post-body table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
}

.post-body table td:before {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    font-weight: bold;
}

/* Specific responsive image class */
.post-content-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

/* 18+ Filter Styles */
body.filter-18-active .post-18-plus img,
body.filter-18-active .post-18-plus video {
    filter: blur(5px); /* Apply blur effect */
    transition: filter 0.3s ease; /* Smooth transition for blur */
}

body.filter-18-active .post-18-plus:hover img,
body.filter-18-active .post-18-plus:hover video {
    filter: blur(0px); /* Remove blur on hover */
}