/* Modern Post Detail Styles */
.modern-post-detail {
    font-family: 'Inter', 'Sarabun', sans-serif;
}

/* Hero Section */
.post-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0 3rem;
    color: var(--white);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.breadcrumb-wrapper {
    margin-bottom: 2rem;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--white);
}

.breadcrumb-item.active {
    color: var(--white);
    font-weight: 500;
}

.post-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* Content Section */
.post-content-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

/* Article Styles */
.post-article {
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-header {
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.post-meta {
    margin-bottom: 1.5rem;
}

.meta-items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
    width: 16px;
}

.meta-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: var(--primary-color);
}

.admin-actions {
    margin-left: auto;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.social-share {
    margin-top: 1rem;
}

/* Post Body */
.post-body {
    padding: 2rem 2.5rem;
}

.post-content-wrapper {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
}

.post-content {
    max-width: none;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

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

.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Login Required */
.login-required {
    padding: 4rem 2rem;
    text-align: center;
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-icon {
    margin-bottom: 2rem;
}

.login-image {
    width: 120px;
    height: auto;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.login-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* File Sections */
.file-section {
    margin: 3rem 0;
    background: var(--gray-50);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.file-header {
    padding: 1.5rem 2rem;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* PDF Viewer */
.pdf-container {
    height: 80vh;
    position: relative;
}

.pdf-object, .pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Image Viewer */
.image-container {
    padding: 2rem;
    text-align: center;
}

/* Attachments Grid */
.attachments-section, .links-section {
    margin: 3rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.file-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.file-icon {
    flex-shrink: 0;
}

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

.file-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.file-actions {
    flex-shrink: 0;
}

/* Links */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.link-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.link-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.link-content {
    flex: 1;
}

.link-title {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.link-title:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Sidebar */
.modern-sidebar {
    position: sticky;
    top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .post-header, .post-body {
        padding: 1.5rem;
    }
    
    .meta-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-actions {
        margin-left: 0;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-card {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-container {
        height: 60vh;
    }
}

@media (max-width: 576px) {
    .post-content-section {
        padding: 2rem 0;
    }
    
    .post-hero {
        padding: 2rem 0 1.5rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}
