/*!
 * Blog Detail Page Styles - Isolated CSS for individual blog posts
 * Matches home page dark theme with transparent glass effect
 * No external dependencies
 */

/* Reset and base styles for blog detail */
.blog-detail-page * {
    box-sizing: border-box;
}

.blog-detail-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #1a202c;
    background-image: url('/assets/images/background-desktop-2000x1328.webp');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #e2e8f0;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .blog-detail-page {
        background-image: url('/assets/images/mobile-view-450x768.webp');
    }
}

/* Background overlay for better readability */
.blog-detail-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.8);
    backdrop-filter: blur(3px);
    z-index: -1;
}

/* Container and layout */
.blog-detail-container {
    max-width: 1100px;
    margin: 10rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Back to blog link */
.back-to-blog {
    padding: 2rem 0 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0aec0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-4px);
}

/* Article header */
.article-header {
    text-align: center;
    padding: 0 2rem;
    /* background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    margin-top: 10rem;
    margin-bottom: 3rem; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
    position: relative;
    overflow: hidden;
}

/* .article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
} */

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.article-category {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.3);
    color: #bfdbfe;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.5);
    backdrop-filter: blur(10px);
}

.category-badge .fas {
    font-size: 0.75rem;
}

.article-stats {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #90cdf4;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #a0aec0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 2rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: #cbd5e0;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-separator {
    color: #718096;
    font-weight: 300;
}

.article-description {
    font-size: 1.2rem;
    color: #e2e8f0;
    font-weight: 300;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Featured image */
.featured-image {
    margin-bottom: 3rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

/* Article meta bar */
.article-meta-bar {
    /* background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15); */
    border-radius: 0 1rem 1rem 0;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e0;
    font-size: 0.9rem;
    font-weight: 500;
}

.meta-item .fas {
    color: #90cdf4;
    font-size: 0.8rem;
}

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

.share-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Article content */
.article-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.content-wrapper {
    padding: 3rem;
}

/* Typography styles */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #ffffff;
    font-weight: 600;
    line-height: 1.25;
    margin: 2.5rem 0 1.5rem 0;
    position: relative;
}

.article-content h1::before,
.article-content h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(to bottom, #3b82f6, #06b6d4);
    border-radius: 2px;
}

.article-content h1:hover,
.article-content h2:hover,
.article-content h3:hover {
    color: #f7fafc;
    transition: color 0.3s ease;
}

.article-content h1 {
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.article-content h2 {
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h5,
.article-content h6 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Paragraphs */
.article-content p {
    margin: 0 0 1.5rem 0;
    color: #e2e8f0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: #e2e8f0;
}

.article-content ul {
    list-style-type: none;
    padding-left: 1.5rem;
}

.article-content ul li::before {
    content: '•';
    color: #cbd5e0;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content li {
    margin: 0.75rem 0;
    line-height: 1.6;
}

.article-content li p {
    margin: 0.5rem 0;
}

/* Links */
.article-content a {
    color: #90cdf4;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: #bfdbfe;
}

/* Text formatting */
.article-content strong {
    font-weight: 700;
    color: #ffffff;
}

.article-content em {
    font-style: italic;
    color: #f7fafc;
}

/* Blockquotes */
.article-content blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid rgba(255, 255, 255, 0.4);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    font-style: italic;
    color: #f7fafc;
    font-weight: 500;
    border-radius: 0 0.75rem 0.75rem 0;
    backdrop-filter: blur(10px);
}

/* Code blocks */
.article-content code {
    background: rgba(0, 0, 0, 0.4);
    color: #f7fafc;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.article-content pre {
    background: rgba(0, 0, 0, 0.6);
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 2rem 0;
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.article-content pre code {
    background: transparent;
    padding: 0;
    font-weight: 400;
    color: inherit;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    overflow: hidden;
}

.article-content th,
.article-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    text-align: left;
}

.article-content th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    color: #ffffff;
}

.article-content td {
    color: #e2e8f0;
}

/* Images in content */
.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2.5rem 0;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Image error handling */
.article-content img[onerror] {
    transition: opacity 0.3s ease;
}

.article-content img[onerror]:hover {
    opacity: 0.8;
}

/* Horizontal rules */
.article-content hr {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    margin: 3rem 0;
}

/* Article tags */
.article-tags {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tags-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tags-title .fas {
    color: #90cdf4;
    font-size: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Related articles */
.related-articles {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.related-header {
    text-align: center;
    margin-bottom: 3rem;
}

.related-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.related-title .fas {
    color: #fbbf24;
    font-size: 1.5rem;
}

.related-subtitle {
    color: #a0aec0;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

.related-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.related-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

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

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

.related-content {
    padding: 1.25rem;
}

.related-meta {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.related-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.related-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card-title a:hover {
    color: #f7fafc;
}

.related-description {
    color: #cbd5e0;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.related-link {
    color: #90cdf4;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.related-link:hover {
    color: #bfdbfe;
}

/* Article actions */
.article-actions {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.action-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #e2e8f0;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.like-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fecaca;
}

.bookmark-btn:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.6);
    color: #fef3c7;
}

.print-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
    color: #dcfce7;
}

/* Reading progress */
.reading-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 200px;
}

.progress-text {
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Back to blog section */
.back-to-blog-section {
    text-align: center;
    padding: 2rem 0 4rem;
}

.back-to-blog-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-to-blog-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .blog-detail-container {
        padding: 0 0.75rem;
    }
    
    .article-title {
        font-size: 2.25rem;
    }
    
    .article-header {
        padding: 0 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 200px;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .content-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .article-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }
    
    .article-meta-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
    }
    
    .meta-info {
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .article-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .reading-progress {
        align-items: center;
        min-width: unset;
        width: 100%;
    }
    
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.625rem;
    }
    
    .article-content h3 {
        font-size: 1.375rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.875rem;
    }
    
    .content-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .article-tags,
    .related-articles {
        padding: 1.5rem 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-meta-bar {
        padding: 1rem;
    }
    
    .meta-info {
        gap: 0.75rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        justify-content: center;
        padding: 1rem;
    }
}
