/* Post Detail Page Custom Styles - Matching Reference Design */

/* Post Category Badge */
.post-category-wrapper {
    display: none;
    /* Hidden */
}

.post-category-wrapper .badge-category {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post Content Container */
.post-content {
    padding: 0 !important;
}

/* Edit Button Styling */
.post-details-meta .item-meta a.btn {
    color: #333 !important;
    font-weight: 500;
}

.post-details-meta .item-meta a.btn:hover {
    color: #333 !important;
    background-color: transparent !important;
    border-color: #ccc !important;
}

/* Post Title */
.post-content .post-title {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 0 !important;
    color: #0A4E8A;
    /* title color adjusted to match requested color */
    position: relative;
}

/* Colored divider under title */
/* Title divider removed per user request; keep title color only */

/* Post Meta - Simplified */
.post-details-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    position: relative;
    padding: 0 0 18px 0 !important;
    /* space for the colored divider */
}

.post-details-meta .item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 0;
}

.post-details-meta .item-meta svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.post-details-meta .item-meta span {
    font-weight: 400;
}

/* Colored divider under the post meta (date, views, edit) */
.post-details-meta::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background-color: #0A4E8A;
    border-radius: 2px;
}

/* Remove author image from meta */
.post-details-meta .item-meta-author {
    display: none;
}

/* Hide summary by default to match reference */
.post-content .post-summary {
    display: none;
}

/* Share Section */
.post-share-section {
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 0;
}

.post-share-section .share-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Primary Share Buttons (Facebook + Zalo) */
.share-buttons-primary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-buttons-primary a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-share-facebook {
    background-color: #1877f2;
}

.btn-share-facebook:hover {
    background-color: #155db2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-share-zalo {
    background-color: #0068ff;
}

.btn-share-zalo:hover {
    background-color: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}

/* Secondary Share Buttons (icons only) */
.share-buttons-secondary {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #666 !important;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.btn-share-icon:hover {
    background-color: #e5e5e5;
    transform: scale(1.1);
}

.btn-share-icon.color-twitter:hover {
    background-color: #1da1f2;
    color: #fff !important;
    border-color: #1da1f2;
}

.btn-share-icon.color-linkedin:hover {
    background-color: #0077b5;
    color: #fff !important;
    border-color: #0077b5;
}

.btn-share-icon.color-whatsapp:hover {
    background-color: #25d366;
    color: #fff !important;
    border-color: #25d366;
}

.btn-share-icon svg {
    width: 16px;
    height: 16px;
}

/* Post Content Typography */
.post-content .post-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-top: 25px;
}

.post-content .post-text h2 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.post-content .post-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #2a2a2a;
}

.post-content .post-text p {
    margin-bottom: 18px;
}

/* Post Files Section */
.post-content .post-files {
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
}

.post-content .post-files .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.post-content .post-files .file button {
    background-color: #fff !important;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    width: 100%;
    text-align: left;
    color: #0068ff;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-content .post-files .file button:hover {
    background-color: #f0f7ff !important;
    border-color: #0068ff;
    transform: translateX(4px);
}

.post-content .post-files .file button svg {
    margin-right: 8px;
    color: #0068ff;
}

/* Post Tags */
.post-content .post-tags {
    margin-top: 30px;
    padding-top: 20px;
}

.post-content .post-tags .title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-right: 12px;
}

.post-content .post-tags ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-content .post-tags li a {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f5f5f5;
    color: #0068ff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.post-content .post-tags li a:hover {
    background-color: #0068ff;
    color: #fff;
    border-color: #0068ff;
}

/* About Author - Simplified */
.post-content .about-author {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-top: 35px;
}

.post-content .about-author .img-author {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content .about-author .username {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Related Posts */
.section-related-posts .section-title .title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding: 0;
}

.section-related-posts .post-item {
    border-radius: 0;
    overflow: visible;
    transition: none;
    background-color: transparent;
    border: none;
}

.section-related-posts .post-item:hover {
    transform: none;
    box-shadow: none;
}

.section-related-posts .post-item .image {
    border-radius: 0;
    overflow: visible;
}

.section-related-posts .post-item .title {
    font-size: 15px;
    padding: 0;
    margin-bottom: 0;
}

/* Comments Section */
.section-comments {
    margin-top: 40px;
}

.section-comments .nav-tabs {
    border-bottom: 2px solid #e5e5e5;
}

.section-comments .nav-link {
    font-weight: 600;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
}

.section-comments .nav-link.active {
    color: #0068ff;
    border-bottom-color: #0068ff;
    background-color: transparent;
}

/* Hide edit button from new simplified location if needed on mobile */
@media (max-width: 768px) {
    .post-details-meta .item-meta.ms-auto {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    .post-content .post-title {
        font-size: 26px;
    }

    .share-buttons-primary {
        flex-direction: column;
    }

    .share-buttons-primary a {
        width: 100%;
        justify-content: center;
    }
}

/* Hide container-bn elements */
.post-content .container-bn,
.post-content .container-bn-ds {
    display: none !important;
}

/* Breadcrumb styling to match reference */
.breadcrumb {
    background-color: transparent;
    padding: 15px 0;
    font-size: 13px;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #999;
    padding: 0 8px;
}

.breadcrumb-item a {
    color: #0068ff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* Dark Mode Overrides - Manual Toggle Only */
/* These rules apply only when .dark-mode class is present on page root */
.dark-mode {
    background-color: #0f1416 !important;
    color: #e6eef6 !important;
}

.dark-mode .post-content {
    background: transparent;
}

.dark-mode .post-content .post-title,
.dark-mode .post-content .post-text h2,
.dark-mode .post-content .post-text h3,
.dark-mode .section-related-posts .title {
    color: #f6fbff !important;
}

.dark-mode .post-details-meta {
    color: #b8c4cc;
}

.dark-mode .post-details-meta .item-meta svg {
    opacity: 0.9;
    filter: brightness(1.2);
}

.dark-mode .post-share-section {
    border-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .post-content .post-files {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
}

.dark-mode .post-content .about-author {
    background-color: rgba(255, 255, 255, 0.02);
}

.dark-mode .section-related-posts .post-item {
    background-color: transparent;
    border: none;
}

.dark-mode .section-related-posts .post-item .title {
    color: #e6eef6;
}

.dark-mode .btn-share-facebook {
    background-color: #1877f2;
    box-shadow: none;
}

.dark-mode .btn-share-zalo {
    background-color: #0480ff;
}

.dark-mode .btn-share-facebook:hover,
.dark-mode .btn-share-zalo:hover {
    box-shadow: none;
    transform: none;
}

.dark-mode .btn-share-icon {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.04);
    color: #d6e6f6 !important;
}

.dark-mode .post-content .post-text a {
    color: #79b8ff;
}

.dark-mode .post-content .post-text a:hover {
    color: #a7d4ff;
}

.dark-mode .img-description {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
}

.dark-mode .post-content .post-tags li a {
    background-color: rgba(255, 255, 255, 0.03);
    color: #9fd1ff;
    border-color: rgba(255, 255, 255, 0.04);
}

.dark-mode .section-comments,
.dark-mode .about-author {
    color: #c7d6de;
}

.dark-mode .post-details-meta .item-meta a.btn {
    color: #b8c4cc !important;
}

.dark-mode .post-details-meta .item-meta a.btn:hover {
    color: #b8c4cc !important;
}

.dark-mode .post-content .post-text {
    color: #dfeefb;
}

.dark-mode .post-content .post-text p {
    color: #d5e8f5;
}

.dark-mode .breadcrumb,
.dark-mode .section-title {
    background: transparent;
}

/* Ensure tags and share buttons clear floated media/players so they appear after content */
.post-content .post-tags {
    clear: both;
}

.post-share-buttons,
.post-content .btn-share,
.post-share-section {
    clear: both;
}

/* Sidebar post item tweaks */
.sidebar-widget .post-item-small {
    margin-bottom: 10px !important;
    line-height: 0;
    font-size: 0;
}

.sidebar-widget .post-item-small .tbl-cell.left {
    width: 130px;
    display: table-cell;
    vertical-align: top;
    line-height: normal;
    font-size: 14px;
}

.sidebar-widget .post-item-small .tbl-cell.right {
    display: table-cell;
    vertical-align: top;
    padding-left: 15px;
    line-height: normal;
    font-size: 14px;
}

.sidebar-widget .post-item-small .tbl-cell.left .image {
    display: block;
    position: relative;
    width: 100%;
    background: #f3f4f6;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: normal;
}

.sidebar-widget .post-item-small .tbl-cell.left .image::before {
    content: "";
    display: block;
    padding-top: 70%;
}

.sidebar-widget .post-item-small .tbl-cell.left .image a {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.sidebar-widget .post-item-small .tbl-cell.left .image img {
    position: relative;
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover;
}

.sidebar-widget .post-item-small .icon-pdf,
.sidebar-widget .post-item-small .icon-no-image {
    font-size: 22px;
    color: #0A4E8A;
    margin-bottom: 4px;
    line-height: 1;
}

.sidebar-widget .post-item-small .icon-text {
    font-size: 11px;
    color: #0A4E8A;
    font-weight: 600;
    line-height: 1;
}

.sidebar-widget .post-item-small .icon-container {
    font-size: 14px;
    line-height: normal;
}

.sidebar-widget .post-item-small.post-item-no-image .tbl-cell.left {
    display: table-cell;
    vertical-align: top;
}

.sidebar-widget .post-item-small.post-item-no-image .tbl-cell.right {
    padding-left: 15px;
}

/* Fix hover - keep all spacing locked */
.sidebar-widget .post-item-small .tbl-cell,
.sidebar-widget .post-item-small .tbl-cell.left,
.sidebar-widget .post-item-small .image,
.sidebar-widget .post-item-small .image a,
.sidebar-widget .post-item-small .image img {
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar-widget .post-item-small .icon-container,
.sidebar-widget .post-item-small .icon-pdf,
.sidebar-widget .post-item-small .icon-no-image,
.sidebar-widget .post-item-small .icon-text {
    transform: none !important;
}

.sidebar-widget .post-item-small .tbl-cell.right {
    padding-left: 15px !important;
}

.sidebar-widget .post-item-small:hover .tbl-cell,
.sidebar-widget .post-item-small:hover .tbl-cell.left,
.sidebar-widget .post-item-small:hover .image,
.sidebar-widget .post-item-small:hover .image a,
.sidebar-widget .post-item-small:hover .image img {
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar-widget .post-item-small:hover .icon-container,
.sidebar-widget .post-item-small:hover .icon-pdf,
.sidebar-widget .post-item-small:hover .icon-no-image,
.sidebar-widget .post-item-small:hover .icon-text {
    transform: none !important;
}

.sidebar-widget .post-item-small:hover .tbl-cell.right {
    padding-left: 15px !important;
}

.sidebar-widget .post-item-small .title {
    margin-top: 0;
    margin-bottom: 4px;
    line-height: 20px;
}

.sidebar-widget .post-item-small .title a {
    display: block;
}

/* Remove dark backgrounds from header/title elements per request */
.top-bar,
.news-ticker-title,
.section .section-head .title,
.sidebar-widget .widget-head,
.section-mid-title .title,
#comments .comment-section>.nav-tabs>.active>a,
.reaction-num-votes,
.modal-newsletter .btn {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Ensure text remains visible when backgrounds removed */
.top-bar .title,
.news-ticker-title,
.section .section-head .title,
.sidebar-widget .widget-head .title,
.section-mid-title .title,
#comments .comment-section>.nav-tabs>.active>a,
.reaction-num-votes,
.modal-newsletter .btn {
    color: inherit !important;
}
