/**
 * VGM Single Post Styles
 * Prefix: vgmpost-
 */

/* Variables */
:root {
    --vgm-gold: #F3DF70;
    --vgm-gold-light: #FFF6BF;
    --vgm-gold-dark: #E5D060;
    --vgm-brown: #8B7355;
    --vgm-gray: #6C757D;
    --vgm-gray-light: #F8F9FA;
    --vgm-border: #E9ECEF;
    --vgm-text: #2C3E50;
    --vgm-text-light: #6C757D;
}

/* Reset & Base */
.vgmpost-wrapper {
    font-family: 'Be Vietnam Pro', sans-serif;
    color: var(--vgm-text);
    line-height: 1.8;
    position: relative;
}

.vgmpost-wrapper * {
    box-sizing: border-box;
}

/* Reading Progress Bar */
.vgmpost-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--vgm-border);
    z-index: 9999;
}

.vgmpost-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--vgm-gold), var(--vgm-gold-dark));
    width: 0%;
    transition: width 0.2s ease;
}

/* Focus Mode Button - Sticky on left side */
.vgmpost-focus-btn {
    position: fixed;
    top: 200px; /* Điều chỉnh vị trí từ trên xuống */
    left: 50%;
    margin-left: -640px; /* Điều chỉnh khoảng cách từ content */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--vgm-gold);
    color: var(--vgm-brown);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.vgmpost-focus-btn:hover {
    background: var(--vgm-gold);
    transform: scale(1.1);
}

/* Alternative: Button as vertical bar */
.vgmpost-focus-btn.vertical-style {
    border-radius: 25px;
    width: 40px;
    height: 120px;
    writing-mode: vertical-lr;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Hide button on smaller screens */
@media (max-width: 1400px) {
    .vgmpost-focus-btn {
        left: 20px;
        margin-left: 0;
    }
}

@media (max-width: 1200px) {
    .vgmpost-focus-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        top: auto;
        margin-left: 0;
    }
}

/* Container */
.vgmpost-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Breadcrumbs */
.vgmpost-breadcrumb {
    margin-bottom: 30px !important;
    font-size: 14px !important;
    color: #6C757D !important;
}

.vgmpost-breadcrumb a {
    color: #6C757D !important;
    text-decoration: none !important;
    transition: color 0.3s;
}

.vgmpost-breadcrumb a:hover {
    color: #E5D060 !important;
    text-decoration: none !important;
}

.vgmpost-breadcrumb-sep {
    margin: 0 8px !important;
    color: #CCCCCC !important;
    display: inline-block !important;
}

.vgmpost-breadcrumb-current {
    color: #8B7355 !important;
    font-weight: 500 !important;
}

/* Content Wrapper */
.vgmpost-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Main Content */
.vgmpost-main {
    background: white;
    border-radius: 8px;
    overflow: hidden;
	padding: 20px;
}

/* Post Header */
.vgmpost-header {
    margin-bottom: 30px;
}

.vgmpost-category {
    margin-bottom: 15px;
}

.vgmpost-category a {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, var(--vgm-gold-light), var(--vgm-gold));
    color: var(--vgm-brown);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: transform 0.3s;
}

.vgmpost-category a:hover {
    transform: translateY(-2px);
}

.vgmpost-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vgm-text);
    margin: 0 0 20px 0;
}

.vgmpost-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--vgm-text-light);
    flex-wrap: wrap;
}

.vgmpost-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vgmpost-meta-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--vgm-gold);
}

.vgmpost-meta-author a {
    color: var(--vgm-text);
    text-decoration: none;
    font-weight: 500;
}

.vgmpost-meta-author a:hover {
    color: var(--vgm-gold-dark);
}

.vgmpost-meta-sep {
    color: var(--vgm-border);
}

/* Featured Image */
.vgmpost-featured-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.vgmpost-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.vgmpost-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--vgm-text);
}

.vgmpost-content p {
    margin-bottom: 25px;
}

.vgmpost-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    margin: 45px 0 20px;
    color: var(--vgm-text);
}

.vgmpost-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    margin: 35px 0 15px;
    color: var(--vgm-text);
}

.vgmpost-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 12px;
    color: var(--vgm-text);
}

.vgmpost-content ul,
.vgmpost-content ol {
    margin: 0 0 25px 20px;
    padding-left: 20px;
}

.vgmpost-content li {
    margin-bottom: 10px;
}

.vgmpost-content blockquote {
    border-left: 4px solid var(--vgm-gold);
    padding: 20px 25px;
    margin: 30px 0;
    background: var(--vgm-gray-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--vgm-text-light);
}

.vgmpost-content pre {
    background: var(--vgm-gray-light);
    border: 1px solid var(--vgm-border);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    overflow-x: auto;
}

.vgmpost-content code {
    background: var(--vgm-gray-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

/* Images in content */
.vgmpost-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

/* WordPress image alignments */
.vgmpost-content .alignleft {
    float: left;
    margin: 10px 20px 10px 0;
}

.vgmpost-content .alignright {
    float: right;
    margin: 10px 0 10px 20px;
}

.vgmpost-content .aligncenter {
    display: block;
    margin: 20px auto;
}

.vgmpost-content .alignnone {
    margin: 20px 0;
}

/* WordPress captions */
.vgmpost-content .wp-caption {
    max-width: 100%;
    margin: 20px auto;
    background: transparent;
}

.vgmpost-content .wp-caption img {
    margin: 0;
    max-width: 100%;
    height: auto;
}

.vgmpost-content .wp-caption-text {
    background: white;
    border: 1px solid var(--vgm-border);
    border-top: 3px solid var(--vgm-gold);
    padding: 10px 15px;
    margin: -5px 0 0 0;
    font-size: 14px;
    color: var(--vgm-text-light);
    text-align: center;
    font-style: italic;
    border-radius: 0 0 8px 8px;
}

/* WordPress gallery */
.vgmpost-content .gallery {
    margin: 30px 0;
}

.vgmpost-content .gallery-item {
    margin-bottom: 20px;
}

.vgmpost-content .gallery-item img {
    border-radius: 8px;
}

/* WordPress block gallery */
.vgmpost-content .wp-block-gallery {
    margin: 30px 0;
}

.vgmpost-content .wp-block-image {
    margin: 30px 0;
}

.vgmpost-content .wp-block-image img {
    border-radius: 8px;
}

.vgmpost-content .wp-block-image figcaption {
    background: white;
    border: 1px solid var(--vgm-border);
    border-top: 3px solid var(--vgm-gold);
    padding: 10px 15px;
    margin: -5px 0 0 0;
    font-size: 14px;
    color: var(--vgm-text-light);
    text-align: center;
    font-style: italic;
    border-radius: 0 0 8px 8px;
}

/* Links in content - No underline, blue on hover */
.vgmpost-content a {
    color: var(--vgm-gold-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.vgmpost-content a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Share Buttons */
.vgmpost-share {
    padding: 25px 0;
    margin: 30px 0;
    border-top: 1px solid var(--vgm-border);
    border-bottom: 1px solid var(--vgm-border);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.vgmpost-share-label {
    font-weight: 500;
    color: var(--vgm-text);
}

.vgmpost-share-buttons {
    display: flex;
    gap: 10px;
}

.vgmpost-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vgm-gray-light);
    color: var(--vgm-text);
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.vgmpost-share-btn:hover {
    transform: translateY(-3px);
    background: var(--vgm-gold);
}

.vgmpost-share-facebook:hover {
    background: #1877f2;
    color: white;
}

.vgmpost-share-twitter:hover {
    background: #1da1f2;
    color: white;
}

.vgmpost-share-zalo:hover {
    background: #0068ff;
    color: white;
}

.vgmpost-share-copied {
    position: absolute;
    right: 0;
    background: var(--vgm-gold);
    color: var(--vgm-brown);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Tags */
.vgmpost-tags {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vgmpost-tag {
    padding: 6px 14px;
    background: var(--vgm-gray-light);
    color: var(--vgm-text);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.vgmpost-tag:hover {
    background: var(--vgm-gold);
    color: var(--vgm-brown);
    transform: translateY(-2px);
}

/* Related Posts */
.vgmpost-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--vgm-border);
}

.vgmpost-related-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--vgm-text);
}

.vgmpost-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.vgmpost-related-item {
    transition: transform 0.3s;
}

.vgmpost-related-item:hover {
    transform: translateY(-5px);
}

.vgmpost-related-link {
    text-decoration: none;
    display: block;
}

.vgmpost-related-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--vgm-gray-light);
}

.vgmpost-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vgmpost-related-item:hover .vgmpost-related-thumb img {
    transform: scale(1.1);
}

.vgmpost-related-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vgm-border);
}

.vgmpost-related-content {
    padding: 0 5px;
}

.vgmpost-related-item-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--vgm-text);
}

.vgmpost-related-meta {
    font-size: 13px;
    color: var(--vgm-text-light);
}

/* Sidebar */
.vgmpost-sidebar {
    /* Remove sticky position */
}

.vgmpost-sidebar-sticky {
    /* Remove scroll */
}

/* Widgets */
.vgmpost-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--vgm-border);
}

.vgmpost-widget-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--vgm-text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--vgm-gold);
}

/* Banner Widget */
.vgmpost-widget-placeholder {
    background: var(--vgm-gray-light);
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    color: var(--vgm-text-light);
}

.vgmpost-widget-placeholder p {
    margin: 0;
    font-weight: 500;
}

.vgmpost-widget-placeholder small {
    font-size: 11px;
    display: block;
    margin-top: 5px;
}

/* Recent Posts Widget */
.vgmpost-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vgmpost-recent-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--vgm-border);
}

.vgmpost-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vgmpost-recent-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.vgmpost-recent-link:hover {
    opacity: 0.8;
}

.vgmpost-recent-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.vgmpost-recent-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vgmpost-recent-content {
    flex: 1;
}

.vgmpost-recent-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 5px 0;
    color: var(--vgm-text);
}

.vgmpost-recent-date {
    font-size: 12px;
    color: var(--vgm-text-light);
}

/* Comments */
.vgmpost-comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--vgm-border);
}

/* Focus Mode */
body.vgmpost-focus-mode .vgmpost-sidebar,
body.vgmpost-focus-mode .header,
body.vgmpost-focus-mode .footer,
body.vgmpost-focus-mode .vgmpost-breadcrumb,
body.vgmpost-focus-mode .vgmpost-related {
    display: none !important;
}

body.vgmpost-focus-mode .vgmpost-content-wrapper {
    grid-template-columns: 1fr;
}

body.vgmpost-focus-mode .vgmpost-main {
    max-width: 800px;
    margin: 0 auto;
}

body.vgmpost-focus-mode .vgmpost-content {
    font-size: 19px;
}

/* Responsive */
@media (max-width: 1024px) {
    .vgmpost-content-wrapper {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .vgmpost-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .vgmpost-sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .vgmpost-title {
        font-size: 32px;
    }
    
    .vgmpost-content {
        font-size: 15px;
    }
    
    .vgmpost-content h2 {
        font-size: 26px;
    }
    
    .vgmpost-content h3 {
        font-size: 22px;
    }
    
    .vgmpost-related-grid {
        grid-template-columns: 1fr;
    }
    
    .vgmpost-focus-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .vgmpost-meta {
        font-size: 13px;
    }
    
    .vgmpost-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .vgmpost-container {
        padding: 20px 15px;
    }
    
    .vgmpost-title {
        font-size: 26px;
    }
    
    .vgmpost-recent-link {
        flex-direction: column;
    }
    
    .vgmpost-recent-thumb {
        width: 100%;
        height: 150px;
    }
}