/* ===== BLOG POST STYLES - ZENCIA DARK DESIGN SYSTEM ===== */

/* Global reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    margin: 0;
    padding: 0;
}

/* Post Header - Dark Theme */
.post-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 217, 213, 0.2);
}

/* Subtle animated background pattern */
.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 217, 213, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 139, 139, 0.05) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0); opacity: 1; }
    50% { transform: translate(20px, 10px); opacity: 0.8; }
}

.post-header .container {
    position: relative;
    z-index: 2;
}

.post-header .breadcrumb {
    text-align: left;
    margin-bottom: 2rem;
}

.post-header .breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.post-header .breadcrumb a:hover {
    color: #00d9d5;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
}

.post-meta span {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta span:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -1rem;
    color: #00d9d5;
}

.post-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-header .post-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-header .tag {
    background: rgba(0, 217, 213, 0.15);
    color: #00d9d5;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 217, 213, 0.3);
    backdrop-filter: blur(10px);
}

.post-header .tag:hover {
    background: #00d9d5;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 217, 213, 0.4);
}

/* Featured Image */
.featured-image {
    margin: 0;
    padding: 0 0 2rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    z-index: 3;
}

.featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 217, 213, 0.1);
    border: 1px solid rgba(0, 217, 213, 0.1);
}

/* Post Content - Properly Visible Dark Theme */
.post-content {
    padding: 4rem 0 6rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
    margin: 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* CRITICAL: Ensure content is visible with proper contrast */
.post-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e5e5e5; /* Light gray text for readability */
    margin-bottom: 4rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 217, 213, 0.1);
    backdrop-filter: blur(5px);
}

/* Ensure ALL text content is visible */
.post-body p {
    color: #e5e5e5;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.post-body div {
    color: #e5e5e5;
}

.post-body span {
    color: #e5e5e5;
}

/* Headers with proper contrast */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    color: #ffffff;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-body h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid #00d9d5;
    padding-bottom: 1rem;
}

.post-body h2 {
    font-size: 2rem;
    position: relative;
    color: #00d9d5;
    margin-top: 2.5rem;
}

.post-body h2::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: #00d9d5;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 217, 213, 0.3);
}

.post-body h3 {
    font-size: 1.5rem;
    color: rgba(0, 217, 213, 0.9);
}

.post-body h4 {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.post-body h5 {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
}

.post-body h6 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Lists */
.post-body ul,
.post-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: #e5e5e5;
}

.post-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #e5e5e5;
}

.post-body ul li::marker {
    color: #00d9d5;
}

.post-body ol li::marker {
    color: #00d9d5;
}

/* Blockquotes */
.post-body blockquote {
    border-left: 4px solid #00d9d5;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: rgba(0, 217, 213, 0.08);
    border-radius: 0 15px 15px 0;
    font-style: italic;
    color: #f0f0f0;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 213, 0.2);
}

.post-body blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #00d9d5;
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-family: serif;
    opacity: 0.4;
}

.post-body blockquote p {
    color: #f0f0f0;
    margin: 0;
}

/* Code styling */
.post-body code {
    background: rgba(0, 217, 213, 0.12);
    color: #00d9d5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid rgba(0, 217, 213, 0.2);
}

.post-body pre {
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

.post-body pre::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 12px;
    height: 12px;
    background: #ff5f57;
    border-radius: 50%;
    box-shadow: 20px 0 #ffbd2e, 40px 0 #28ca42;
}

/* Images */
.post-body img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 15px 40px rgba(0, 217, 213, 0.2);
    border: 1px solid rgba(0, 217, 213, 0.1);
}

/* Links */
.post-body a {
    color: #00d9d5;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-body a:hover {
    border-bottom-color: #00d9d5;
    color: #ffffff;
}

/* Tables */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-body th,
.post-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

.post-body th {
    background: rgba(0, 217, 213, 0.2);
    color: #ffffff;
    font-weight: 600;
}

/* Post Share */
.post-share {
    border-top: 2px solid rgba(0, 217, 213, 0.2);
    padding-top: 2rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 217, 213, 0.1);
}

.post-share h4 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.share-btn.twitter {
    background: rgba(29, 161, 242, 0.2);
    color: #1da1f2;
    border-color: rgba(29, 161, 242, 0.3);
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(29, 161, 242, 0.3);
}

.share-btn.linkedin {
    background: rgba(0, 119, 181, 0.2);
    color: #0077b5;
    border-color: rgba(0, 119, 181, 0.3);
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 119, 181, 0.3);
}

.share-btn.facebook {
    background: rgba(24, 119, 242, 0.2);
    color: #1877f2;
    border-color: rgba(24, 119, 242, 0.3);
}

.share-btn.facebook:hover {
    background: #1877f2;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3);
}

/* Related Posts */
.related-posts {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.related-posts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 217, 213, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 139, 139, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.related-posts .container {
    position: relative;
    z-index: 2;
}

.related-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 213, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 217, 213, 0.15);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 217, 213, 0.3);
}

.related-card:hover::before {
    opacity: 1;
}

.related-image {
    height: 180px;
    overflow: hidden;
}

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

.related-card:hover .related-image img {
    transform: scale(1.1);
}

.placeholder-image {
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 217, 213, 0.1), rgba(0, 139, 139, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #00d9d5;
}

.related-content {
    padding: 1.5rem;
}

.related-content h3 {
    margin-bottom: 1rem;
}

.related-content h3 a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-content h3 a:hover {
    color: #00d9d5;
}

.related-excerpt {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.related-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.related-meta span:first-child {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

/* Blog CTA Section */
.blog-cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(0, 217, 213, 0.2);
}

.blog-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 217, 213, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.blog-cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.blog-cta p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-primary {
    background: #00d9d5;
    color: #ffffff;
    border-color: #00d9d5;
}

.btn-primary:hover {
    background: transparent;
    color: #00d9d5;
    border-color: #00d9d5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 217, 213, 0.3);
}

.btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .post-header {
        padding: 6rem 0 3rem;
    }
    
    .post-title {
        font-size: 3rem;
    }
    
    .featured-image {
        padding: 0 0 2rem;
    }
    
    .post-body {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .post-header {
        padding: 5rem 0 2rem;
        text-align: left;
    }
    
    .post-title {
        font-size: 2.25rem;
    }
    
    .post-meta {
        justify-content: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-meta span:not(:last-child)::after {
        display: none;
    }
    
    .post-header .post-tags {
        justify-content: flex-start;
    }
    
    .post-content {
        padding: 3rem 0 4rem;
    }
    
    .post-body {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .post-body h2::before {
        left: -1rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-posts {
        padding: 4rem 0;
    }
    
    .related-posts h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .blog-cta {
        padding: 4rem 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 4rem 0 2rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .content-wrapper {
        padding: 0 1rem;
    }
    
    .post-body {
        padding: 1rem;
    }
    
    .post-body h1 {
        font-size: 2rem;
    }
    
    .post-body h2 {
        font-size: 1.5rem;
    }
    
    .post-body blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .post-body pre {
        padding: 1.5rem;
        font-size: 0.875rem;
    }
    
    .blog-cta h2 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .post-header,
    .post-share,
    .related-posts,
    .blog-cta {
        background: #ffffff !important;
        color: #333333 !important;
    }
    
    .post-title,
    .post-meta,
    .breadcrumb a,
    .post-body,
    .post-body * {
        color: #333333 !important;
    }
    
    .share-buttons {
        display: none;
    }
    
    .related-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #cccccc;
        background: #ffffff !important;
    }
}