/**
 * Post Page Style
 * Sử dụng common.css cho các style chung (fonts, breadcrumb, layout)
 */

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 0 20px;
    background: transparent;
    min-height: calc(100vh - 200px);
    padding-bottom: 0;
}

.container {
    max-width: 100%;
}

/* Override all headings to remove old comic style */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    font-weight: 700 !important;
}

/* Container styling - no white background */
@media (min-width: 769px) {
    .container {
        background: transparent;
        border-radius: 0;
        padding: 40px;
        box-shadow: none;
        margin-bottom: 0;
    }
    
    .main-content {
        padding-bottom: 0;
        background: transparent;
    }
}

/* Post Detail */
.post-detail {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.post-title {
    font-family: 'VJAMAI', sans-serif !important;
    font-size: 24px !important;
    font-weight: bold !important;
    color: #4f1906 !important;
    margin-bottom: 15px !important;
    line-height: 1.4 !important;
}

@media only screen and (min-width: 768px) {
    .post-title {
        font-size: 28px !important;
    }
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: 'VJAMAI', sans-serif !important;
    font-size: 14px;
    color: #291107;
}

.post-meta * {
    font-family: 'VJAMAI', sans-serif !important;
}

.post-meta .post-category a {
    color: #4f1906;
    text-decoration: underline;
    font-weight: bold;
    font-family: 'VJAMAI', sans-serif !important;
}

.post-meta .post-author,
.post-meta .post-date,
.post-meta .post-views {
    color: #291107;
    font-family: 'VJAMAI', sans-serif !important;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* Post Content */
.text-detail.post-content {
    font-family: 'VJAMAI', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #291107;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
}

.post-content h2 {
    font-size: 28px;
}

.post-content h3 {
    font-size: 24px;
}

.post-content h4 {
    font-size: 20px;
}

.post-content p {
    margin-bottom: 20px;
}

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

.post-content a {
    color: #2563eb;
    text-decoration: none;
}

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

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 20px;
    margin: 20px 0;
    color: #6b7280;
    font-style: italic;
}

/* Post Actions */
.post-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #12181f;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.social-share span {
    font-family: 'VJAMAI', sans-serif;
    font-weight: bold;
    color: #4f1906;
    font-size: 16px;
    margin-right: 8px;
}

.social-share a {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 0;
    color: #ffffff;
    text-decoration: none;
    font-family: 'VJAMAI', sans-serif;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.3s ease;
    clip-path: polygon(12% 0%, 100% 0%, 88% 100%, 0% 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0 2px;
    flex: 0 0 auto;
    white-space: nowrap;
}

@media only screen and (min-width: 768px) {
    .social-share {
        gap: 8px;
    }
    
    .social-share a {
        padding: 14px 28px;
        font-size: 16px;
        margin: 0 3px;
    }
}

.share-facebook {
    background: #000000;
    color: #ffffff;
}

.share-facebook:hover {
    background: #808080;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Related Posts */
.related-posts {
    margin-top: 0;
    padding-top: 50px;
    border-top: 2px solid #e5e7eb;
}

.related-posts h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 24px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.related-post-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.related-post-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f3f4f6;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    margin-bottom: 12px;
}

.related-post-title a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    text-decoration: none;
    line-height: 1.4 !important;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
}

.related-post-title a:hover {
    color: #2563eb;
}

.related-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
}

.related-post-meta .post-author {
    padding: 4px 10px;
    background: #f3f4f6;
    border-radius: 6px;
    font-weight: 500;
}

/* Form Styles */
.post-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.post-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.post-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.post-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .post-detail {
        padding: 20px 16px;
    }
    
    .post-title {
        font-size: 22px !important;
    }
    
    .post-content {
        font-size: 15px;
    }

    .text-detail table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .post-content h2 {
        font-size: 20px;
    }
    
    .post-content h3 {
        font-size: 18px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .post-detail {
        padding: 16px 12px;
    }
    
    .post-title {
        font-size: 20px !important;
    }
    
    .post-content {
        font-size: 14px;
    }
    
    .social-share {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}
