/**
 * Post Page Styles - Clean & Optimized
 * JTSC Pro Website
 */

/* Post Header */
.post-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 25%, #1d4ed8 50%, #1e3a8a 75%, #1e3a8a 100%);
    color: white;
    padding: 8rem 0 5rem;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 70vh;
}

.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    opacity: 0.7;
}

.post-header .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.post-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: white;
    font-family: 'Be Vietnam Pro', sans-serif;
    margin-top: 0;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.post-excerpt {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    opacity: 0.95;
    line-height: 1.7;
    max-width: 900px;
    font-weight: 400;
    margin-bottom: 2.5rem;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.95;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: auto;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-meta span:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Back Button - Hidden */
.back-button {
    display: none !important;
}

/* Back button styles removed - button is now hidden */

/* Post Content */
.post-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.08);
    margin-top: -3rem;
    position: relative;
    z-index: 3;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2.5rem 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    color: var(--text-primary);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    position: relative;
}

.post-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #3b82f6;
    margin-bottom: 2rem;
}

.post-content h3 {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    color: #1e40af;
}

.post-content h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #374151;
}

.post-content p {
    margin-bottom: 1.8rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--text-secondary);
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 400;
}

.post-content blockquote {
    border-left: 5px solid #3b82f6;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin: 2.5rem 0;
    padding: 2rem 2.5rem;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #475569;
    font-size: 1.1rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.post-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #3b82f6;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-family: serif;
    opacity: 0.3;
}

.post-content ul, 
.post-content ol {
    margin: 2rem 0;
    padding-left: 2.5rem;
}

.post-content li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
}

.post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-content em {
    font-style: italic;
    color: #1e40af;
}

/* Post Tags */
.post-tags {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    border-top: 3px solid #3b82f6;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.3rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Related Posts */
.related-posts {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
    margin-top: 3rem;
}

.related-posts h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.related-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.related-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.2);
}

.related-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover img {
    transform: scale(1.1);
}

.related-card-content {
    padding: 2rem;
}

.related-card h4 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-header {
        padding: 5rem 0 3rem;
        text-align: center;
    }
    
    .post-header .container {
        padding: 0 1rem;
        display: flex;
        flex-direction: column;
        min-height: 50vh;
    }
    
    .back-button {
        display: none !important;
    }
    
    .post-title {
        margin-top: 0;
        margin-bottom: 1rem;
    }
    
    .post-excerpt {
        margin-bottom: 2rem;
        flex-grow: 1;
    }
    
    .post-meta {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin-top: auto;
    }
    
    .post-meta span {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
    
    .post-content {
        margin: -2rem 1rem 0;
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
    
    .post-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .related-card-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 4rem 0 2rem;
    }
    
    .post-header .container {
        min-height: 45vh;
    }
    
    .back-button {
        display: none !important;
    }
    
    .post-content {
        margin: -1.5rem 0.5rem 0;
        padding: 1.5rem 1rem;
    }
    
    .post-meta {
        gap: 0.5rem;
    }
    
    .post-meta span {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* Dark Theme Support */
[data-theme="dark"] .post-content {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .content {
    color: var(--text-secondary);
}

[data-theme="dark"] .content h1,
[data-theme="dark"] .content h2,
[data-theme="dark"] .content h3,
[data-theme="dark"] .content h4,
[data-theme="dark"] .content h5,
[data-theme="dark"] .content h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .post-tags {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

[data-theme="dark"] .tag {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

[data-theme="dark"] .tag:hover {
    background: var(--primary);
    color: white;
}

[data-theme="dark"] .related-posts {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .related-posts h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .related-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .related-card h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .related-card p {
    color: var(--text-secondary);
}

/* Dark theme back button styles removed - button is hidden */

/* Post Featured Image */
.post-featured-image {
    margin-bottom: 3rem;
    text-align: center;
}

.post-featured-image .featured-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    margin: 0;
}

.post-featured-image .featured-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

/* Dark theme for featured image */
[data-theme="dark"] .post-featured-image .featured-img {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .post-featured-image .featured-img:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
