/* Single Post Page - Style based on baiviet.html */

/* Variables */
:root {
    --td-title-color: #f3d079;
    --td-content-color: #222222;
    --td-border-color: #f6d97e;
    --td-bg-light: #f7f3ee;
    --td-bg-dark: #181923;
}

/* Outer Wrap */
.td-outer-wrap {
    background: var(--td-bg-light);
    min-height: 100vh;
}

/* Header */
.td-header-wrap {
    background: var(--td-bg-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.td-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.td-logo img {
    height: 45px;
    width: auto;
}

.td-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.td-back-btn:hover {
    background: var(--td-title-color);
    color: #000;
}

/* Main Content */
.td-main-content-wrap {
    padding: 2rem 0;
}

.td-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.td-content-row {
    display: flex;
    gap: 30px;
}

.td-main-column {
    flex: 1;
    max-width: calc(100% - 330px);
}

.td-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Breadcrumbs */
.td-breadcrumbs {
    font-size: 13px;
    color: #666;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.td-breadcrumbs a {
    color: #666;
}

.td-breadcrumbs a:hover {
    color: var(--td-title-color);
}

.td-bread-sep {
    font-size: 10px;
    color: #999;
}

.td-bread-current {
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Article */
.td-post-article {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Post Header */
.td-post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--td-border-color);
}

.td-post-category a {
    display: inline-block;
    background: var(--td-title-color);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.td-post-category a:hover {
    background: #000;
    color: var(--td-title-color);
}

.td-post-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--td-title-color);
    margin-bottom: 1rem;
}

.td-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 13px;
    color: #666;
    margin-bottom: 1rem;
}

.td-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.td-post-meta a {
    color: var(--td-title-color);
}

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

/* Share buttons top */
.td-post-sharing-top {
    display: flex;
    gap: 0.5rem;
}

.td-social-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.td-social-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.td-facebook { background: #3b5998; }
.td-twitter { background: #000; }
.td-telegram { background: #0088cc; }
.td-pinterest { background: #bd081c; }

/* Featured Image */
.td-post-featured-image {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.td-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.td-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--td-content-color);
}

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

.td-post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--td-title-color);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--td-border-color);
}

.td-post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--td-title-color);
    margin: 1.5rem 0 0.75rem;
}

.td-post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--td-title-color);
    margin: 1.25rem 0 0.5rem;
}

.td-post-content ul,
.td-post-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.td-post-content li {
    margin-bottom: 0.5rem;
}

.td-post-content a {
    color: var(--td-title-color);
}

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

.td-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.td-post-content blockquote {
    border-left: 4px solid var(--td-border-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #faf8f5;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.td-post-content strong {
    font-weight: 600;
    color: #000;
}

.td-post-content em,
.td-post-content i {
    font-style: italic;
}

/* Tags */
.td-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.td-tags-label {
    font-weight: 600;
    color: #333;
}

.td-post-tags a {
    background: #f0f0f0;
    color: #666;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.td-post-tags a:hover {
    background: var(--td-title-color);
    color: #000;
}

/* Share buttons bottom */
.td-post-sharing-bottom {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.td-share-label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.td-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.td-post-sharing-bottom .td-social-btn {
    width: auto;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.td-post-sharing-bottom .td-social-btn span {
    font-size: 13px;
}

/* Author Box */
.td-author-box {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--td-border-color);
}

.td-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.td-author-info {
    flex: 1;
}

.td-author-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.td-author-name a {
    color: var(--td-title-color);
}

.td-author-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Sidebar */
.td-sidebar-block {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.td-block-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--td-title-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--td-border-color);
}

/* Related Posts in Sidebar */
.td-related-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.td-related-item:last-child {
    border-bottom: none;
}

.td-related-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.td-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-related-info {
    flex: 1;
    min-width: 0;
}

.td-related-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-related-title a {
    color: #333;
}

.td-related-title a:hover {
    color: var(--td-title-color);
}

.td-related-date {
    font-size: 12px;
    color: #999;
}

/* Popular Posts */
.td-popular-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.td-popular-item:last-child {
    border-bottom: none;
}

.td-popular-number {
    width: 30px;
    height: 30px;
    background: var(--td-title-color);
    color: #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    flex-shrink: 0;
}

.td-popular-info {
    flex: 1;
    min-width: 0;
}

.td-popular-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.td-popular-title a {
    color: #333;
}

.td-popular-title a:hover {
    color: var(--td-title-color);
}

.td-popular-date {
    font-size: 12px;
    color: #999;
}

.td-no-related {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 1rem;
}

/* Footer */
.td-footer-wrap {
    background: var(--td-bg-dark);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.td-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.td-footer-container p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .td-content-row {
        flex-direction: column;
    }

    .td-main-column {
        max-width: 100%;
    }

    .td-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .td-sidebar-block {
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .td-header-container {
        padding: 0 15px;
    }

    .td-logo img {
        height: 35px;
    }

    .td-back-btn span {
        display: none;
    }

    .td-back-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .td-container {
        padding: 0 15px;
    }

    .td-post-article {
        padding: 1.5rem;
    }

    .td-post-title {
        font-size: 1.5rem;
    }

    .td-post-meta {
        gap: 1rem;
    }

    .td-post-content {
        font-size: 15px;
    }

    .td-post-content h2 {
        font-size: 1.3rem;
    }

    .td-sidebar {
        grid-template-columns: 1fr;
    }

    .td-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .td-post-article {
        padding: 1rem;
        border-radius: 0;
    }

    .td-post-title {
        font-size: 1.3rem;
    }

    .td-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .td-post-sharing-top {
        justify-content: center;
    }

    .td-share-buttons {
        justify-content: center;
    }

    .td-post-sharing-bottom .td-social-btn span {
        display: none;
    }

    .td-post-sharing-bottom .td-social-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }
}
