/* ===== POST DETAIL PAGE ===== */
.post-detail-section {
    margin: 20px auto 40px;
    max-width: 1200px;
}

.post-detail-container {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 25px;
    margin-top: 20px;
}

/* Post Header */
.post-header {
    margin-bottom: 25px;
}

.post-category {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.post-title {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.post-subtitle {
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-gray);
    margin-bottom: 15px;
    font-weight: 400;
}

.post-subtitle-bottom {
    font-size: 16px;
    color: var(--color-dark);
    margin-bottom: 20px;
    font-weight: 500;
}

/* Post Meta */
.post-meta {
    position: sticky;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(224, 224, 224, 0.5);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(6px);
    width: 100%;
    box-sizing: border-box;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
}

.post-date {
    font-size: 12px;
    color: var(--color-gray);
}

.social-sharing {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 13px;
    color: var(--color-gray);
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-light);
    font-size: 14px;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-facebook { background: #4267B2; }
.share-twitter { background: #14171A; }
.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-linkedin { background: #0077b5; }

/* Post Media */
.post-media {
    margin-bottom: 25px;
    position: relative;
}

.post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.post-video {
    width: 100%;
    border-radius: var(--border-radius);
}

.media-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.media-caption {
    font-size: 13px;
    color: var(--color-gray);
    margin-top: 8px;
    padding: 0 5px;
}

/* Post Content */
.post-content-wrapper {
    margin-bottom: 30px;
}

.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-dark);
}

.post-content p {
    margin-bottom: 0em;
}

.post-content h2 {
    font-size: 24px;
    margin: 1.5em 0 0.8em;
    color: var(--color-dark);
    font-weight: 700;
}

.post-content h3 {
    font-size: 20px;
    margin: 1.5em 0 0.8em;
    color: var(--color-dark);
    font-weight: 600;
}

.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 15px 20px;
    margin: 1.5em 0;
    background: var(--color-bg-light);
    font-style: italic;
    color: var(--color-gray);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5em auto;
    display: block;
}

/* Editor Info */
.editor-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--color-light-gray);
    border-radius: var(--border-radius);
    margin: 25px 0;
}

.editor-label {
    font-size: 13px;
    color: var(--color-gray);
}

.editor-name {
    font-weight: 600;
    color: var(--color-dark);
}

/* Tags Section */
.tags-section {
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.tags-label i {
    color: var(--color-primary);
}

.tags-label span {
    font-weight: 600;
    color: var(--color-dark);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: var(--color-bg-light);
    color: var(--color-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.tag-item:hover {
    background: var(--color-primary);
    color: var(--color-light);
    border-color: var(--color-primary);
}

/* Post Navigation */
.post-navigation {
    margin: 30px 0;
    padding: 20px;
    background: var(--color-light-gray);
    border-radius: var(--border-radius);
}

.post-navigation .section-title {
    margin-bottom: 15px;
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.nav-item {
    background: var(--color-light);
    padding: 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.nav-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-gray);
    margin-bottom: 8px;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-dark);
}

.nav-item:hover .nav-title {
    color: var(--color-primary);
}

.nav-prev .nav-label i {
    order: -1;
}

.nav-next {
    text-align: right;
}

.nav-next .nav-label {
    justify-content: flex-end;
}

/* Related Posts */
.related-posts {
    margin: 40px 0 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.related-item {
    background: var(--color-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.related-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 15px;
}

.related-category {
    font-size: 11px;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.related-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-dark);
    transition: var(--transition);
}

.related-item:hover .related-title {
    color: var(--color-primary);
}

/* ===== VOX POPULI SPECIAL LAYOUT ===== */
.vox-populi-layout {
    margin: 25px 0;
    position: relative;
}

.vox-avatar-container {
    float: left;
    width: 180px;
    margin: 0 20px 15px 0;
    text-align: center;
}

.vox-avatar {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
}

.vox-avatar-caption {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 14px;
}

.vox-content-wrapper {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.5;
}

.vox-content-wrapper p:first-of-type::first-letter {
    font-size: 4em;
    float: left;
    line-height: 0.85;
    margin: 0.1em 0.15em 0 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
    margin: 40px 0;
    padding: 25px;
    background: var(--color-light-gray);
    border-radius: var(--border-radius);
}

.comments-section .section-title {
    margin-bottom: 20px;
}

.comment-form-container {
    background: var(--color-light);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.guest-prompt {
    text-align: center;
    padding: 20px;
    background: var(--color-primary);
    color: var(--color-light);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.guest-prompt h4 {
    margin-bottom: 10px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.auth-btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.auth-btn.login {
    background: var(--color-light);
    color: var(--color-primary);
}

.auth-btn.register {
    background: transparent;
    border: 2px solid var(--color-light);
    color: var(--color-light);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 14px;
    min-height: 120px;
    resize: vertical;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 12px;
    color: var(--color-gray);
}

.submit-btn {
    background: var(--color-primary);
    color: var(--color-light);
    padding: 10px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover:not(:disabled) {
    background: var(--color-blue-dark);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    background: var(--color-light);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author {
    flex: 1;
}

.comment-author-name {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: var(--color-gray);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-dark);
    margin-bottom: 15px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.comment-action-btn:hover {
    color: var(--color-blue-dark);
}

.comment-replies {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid var(--color-border);
}

.view-all-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: var(--color-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-primary);
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition);
}

.view-all-btn:hover {
    background: var(--color-primary);
    color: var(--color-light);
}

/* ===== SIDEBAR POST DETAIL ===== */
.post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.post-sidebar .widget {
    margin-bottom: 25px;
}

/* ===== RESPONSIVE STYLES ===== */

/* Desktop Large (min-width: 1200px) */
@media (min-width: 1200px) {
    .post-detail-section {
        max-width: 1200px;
    }
    
    .post-title {
        font-size: 34px;
    }
}

/* Tablet Landscape (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .post-detail-container {
        grid-template-columns: 65% 33%;
        gap: 20px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .post-detail-container {
        grid-template-columns: 60% 38%;
        gap: 20px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .post-detail-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .post-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
    }
    
    .post-sidebar .widget {
        margin-bottom: 0;
    }
    
    .post-title {
        font-size: 26px;
    }
    
    .post-subtitle {
        font-size: 17px;
    }
    
    .post-content {
        font-size: 16px;
    }
    
    .vox-avatar-container {
        width: 160px;
        margin-right: 15px;
    }
    
    .vox-avatar {
        width: 160px;
        height: 160px;
    }
    
    .comments-section {
        padding: 20px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .post-detail-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-sidebar {
        position: static;
        margin-top: 30px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .post-header {
        padding: 0 10px;
    }
    
    .post-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .post-subtitle {
        font-size: 16px;
    }
    
    /* Post Meta untuk Mobile */
    .post-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        padding: 10px 15px;
        gap: 10px;
        width: 100%;
    }
    
    .author-info {
        display: flex;
        align-items: center;
        flex-shrink: 1;
        gap: 8px;
        min-width: 0;
        max-width: 50%;
    }
    
    .author-avatar {
        width: 35px;
        height: 35px;
        flex-shrink: 0;
        border: 1px solid var(--color-border);
    }
    
    .author-details {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }
    
    .author-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
    
    .post-date {
        display: none;
    }
    
    .social-sharing {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 8px;
        white-space: nowrap;
    }
    
    .share-label {
        font-size: 12px;
        display: inline;
    }
    
    .share-buttons {
        display: flex;
        gap: 6px;
    }
    
    .share-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .post-image {
        height: 250px;
    }
    
    .post-content {
        font-size: 16px;
        line-height: 1.7;
        padding: 0 10px;
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-item {
        display: flex;
    }
    
    .related-item img {
        width: 120px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .related-content {
        padding: 10px;
        flex: 1;
    }
    
    .related-title {
        font-size: 13px;
    }
    
    /* Vox Populi Mobile */
    .vox-avatar-container {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
    
    .vox-avatar {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    
    .vox-content-wrapper p:first-of-type::first-letter {
        font-size: 3em;
    }
    
    /* Comments Mobile */
    .comments-section {
        padding: 15px;
        margin: 30px 0;
    }
    
    .comment-form-container {
        padding: 15px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment-replies {
        padding-left: 15px;
    }
}

/* Mobile Landscape (667px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .post-title {
        font-size: 24px;
    }
    
    .post-image {
        height: 300px;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vox-avatar-container {
        float: none;
        width: 140px;
        margin: 0 auto 20px;
    }
    
    .vox-avatar {
        width: 140px;
        height: 140px;
    }
    
    .vox-content-wrapper p:first-of-type::first-letter {
        font-size: 3em;
    }
}

/* Mobile Portrait (576px - 666px) */
@media (max-width: 666px) and (min-width: 480px) {
    .post-title {
        font-size: 22px;
    }
    
    .post-image {
        height: 250px;
    }
    
    .post-content {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .share-buttons {
        gap: 6px;
    }
    
    .share-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .vox-avatar {
        width: 120px;
        height: 120px;
    }
    
    .comments-section {
        padding: 15px;
    }
    
    .comment-form-container {
        padding: 15px;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 8px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .post-title {
        font-size: 20px;
    }
    
    .post-subtitle {
        font-size: 15px;
    }
    
    .post-image {
        height: 200px;
    }
    
    .post-category {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .related-item {
        flex-direction: column;
    }
    
    .related-item img {
        width: 100%;
        height: 150px;
    }
    
    .comment-item {
        padding: 15px;
    }
    
    .comment-avatar {
        width: 35px;
        height: 35px;
    }
    
    .comment-author-name {
        font-size: 13px;
    }
    
    .comment-content {
        font-size: 13px;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .post-title {
        font-size: 18px;
    }
    
    .post-image {
        height: 180px;
    }
    
    .post-content {
        font-size: 14px;
    }
    
    .author-name {
        font-size: 12px;
    }
    
    .share-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .tag-item {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Print Styles */
@media print {
    .header,
    .main-nav,
    .portal-nav,
    .sticky-header,
    .sidebar,
    .footer,
    .social-sharing,
    .comments-section,
    .post-sidebar,
    .ad-space-wrap {
        display: none !important;
    }
    
    .post-detail-container {
        grid-template-columns: 1fr;
        margin: 0;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .post-title {
        color: #000;
    }
    
    .post-content {
        color: #000;
    }
    
    .post-category {
        background: #000;
        color: #fff;
    }
    
    .tag-item {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .post-header,
    .post-content,
    .related-item,
    .nav-item,
    .share-btn,
    .tag-item,
    .auth-btn,
    .submit-btn,
    .comment-action-btn,
    .view-all-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .share-btn:hover,
    .tag-item:hover,
    .nav-item:hover,
    .related-item:hover,
    .auth-btn:hover,
    .submit-btn:hover:not(:disabled),
    .comment-action-btn:hover,
    .view-all-btn:hover {
        transform: none !important;
    }
}