/* css/detail-berita.css */

/* --- General Layout & Card Styling --- */
.main-content-card {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1.5rem;
    margin-bottom: 2rem; /* Space before comments section */
}

/* --- News Title --- */
.main-content-card h1 {
    color: #343a40; /* Dark gray for title */
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 1rem;
}

/* --- Meta Information (Category, Date, Views, Likes) --- */
.meta {
    font-size: 0.95rem;
    color: #6c757d; /* Bootstrap muted color */
    border-bottom: 1px solid #dee2e6; /* Light gray border */
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    text-align: center; /* Ensure meta info is centered */
}

.meta .badge {
    font-size: 0.85em;
    padding: 0.35em 0.6em;
    vertical-align: middle;
}

.meta i.fas {
    color: #007bff; /* Primary color for icons */
    margin-right: 0.25rem;
}

/* --- Like Button --- */
#likeButton {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* Space between icon and text */
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.3rem;
    transition: all 0.2s ease-in-out;
}

#likeButton.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

#likeButton.btn-outline-primary:hover:not(:disabled) {
    background-color: #007bff;
    color: #fff;
}

#likeButton:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #007bff; /* Solid primary color when disabled/liked */
    color: #fff;
    border-color: #007bff;
}

/* --- News Content (berita-detail) --- */
.berita-detail p {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #343a40;
    text-align: justify; /* Justify text for better readability */
    white-space: pre-wrap; /* Preserves line breaks from nl2br */
}

.berita-detail img {
    max-width: 100%;
    height: auto;
    display: block; /* Ensures image takes its own line */
    margin: 1.5rem auto; /* Center images and add vertical spacing */
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* --- No News Message --- */
.no-berita-message {
    padding: 3rem;
    background-color: #e9f7fe; /* Light blue background */
    border: 1px solid #bde6fd; /* Lighter blue border */
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.no-berita-message p {
    font-size: 1.1rem;
    color: #0056b3;
}

/* --- Back Link Button --- */
.back-link {
    max-width: 250px; /* Limit width for a cleaner look */
    text-align: center;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    margin-top: 2rem !important; /* Override Bootstrap's margin for more space */
}

/* --- Comments Section --- */
.comments-section {
    background-color: #f8f9fa; /* Light grey background */
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.comments-section h4 {
    color: #343a40;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.comments-section hr {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

/* --- Comment Form --- */
.comments-section h5 {
    color: #5a5a5a;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

#commentText {
    min-height: 120px; /* Minimum height for textarea */
}

#commentForm .btn-success {
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
}

#commentMessage {
    min-height: 20px; /* Reserve space for messages */
    font-size: 0.9rem;
}

/* --- Individual Comment Item (You'll likely generate these via JavaScript/AJAX) --- */
.comment-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.4rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.05);
}

.comment-item strong {
    color: #007bff;
    font-size: 1em;
}

.comment-item .comment-date {
    font-size: 0.85em;
    color: #6c757d;
    margin-left: 0.5rem;
}

.comment-item p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap; /* Preserves line breaks for comments */
}

/* --- Sidebar adjustments (from your other includes) --- */
/* Ensure sidebar has some top margin on smaller screens */
@media (max-width: 991.98px) { /* Applies for tablets and smaller */
    .col-lg-4.mt-md-4.mt-lg-0 {
        margin-top: 1.5rem !important; /* Adjust if needed */
    }
}