/* Blog Post Specific Styles */

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Article Breadcrumb */
.article-breadcrumb {
    padding: 100px 0 20px;
    background: var(--bg-secondary);
}

/* Article Header */
.article-header {
    padding: 20px 0 40px;
    background: var(--bg-secondary);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-category {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 800px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.author-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.read-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-time::before {
    content: "•";
    margin-right: 0.25rem;
}

/* Featured Image */
.article-featured-image {
    padding: 0 0 60px;
    background: var(--bg-secondary);
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

/* Social Share Sticky */
.social-share-sticky {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.social-share-sticky.visible {
    opacity: 1;
    visibility: visible;
}

.share-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

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

.share-linkedin {
    background: #0077b5;
    color: white;
}

.share-twitter {
    background: #1da1f2;
    color: white;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

.share-copy {
    background: var(--text-primary);
    color: white;
}

.share-copy.copied {
    background: #10b981;
}

/* Article Body */
.article-body {
    padding: 60px 0;
    background: white;
}

.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    scroll-margin-top: 100px;
}

.article-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
    scroll-margin-top: 100px;
}

.article-text h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-primary);
    scroll-margin-top: 100px;
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text ul,
.article-text ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

.article-text blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 2rem;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-text pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.article-text code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Monaco', 'Courier New', monospace;
}

.article-text pre code {
    background: none;
    padding: 0;
}

.article-text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-light);
}

.article-text a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.article-text a:hover {
    border-bottom-color: var(--primary-color);
}

/* Content Skeleton */
.content-placeholder {
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 100px;
    height: fit-content;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
}

.table-of-contents h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.toc-nav ul {
    list-style: none;
    padding: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.toc-nav a:hover,
.toc-nav a.active {
    color: var(--primary-color);
    transform: translateX(5px);
}

.toc-nav .toc-h3 {
    padding-left: 1rem;
    font-size: 0.85rem;
}

.toc-nav .toc-h4 {
    padding-left: 2rem;
    font-size: 0.8rem;
}

/* Article Tags */
.article-tags {
    margin: 3rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.article-tags h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

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

/* Social Share Bottom */
.social-share-bottom {
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
}

.social-share-bottom h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.share-btn-large {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

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

/* Related Articles */
.related-articles {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.related-articles h2 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

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

.related-article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

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

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-article-content {
    padding: 1.5rem;
}

.related-article-category {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.related-article-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1rem 0 0.5rem;
}

.related-article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.related-article-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Article CTA */
.article-cta {
    padding: 60px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.article-cta h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-cta p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: var(--gradient-secondary);
    color: white;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Error State */
.error-state {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.back-to-blog {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.back-to-blog:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .social-share-sticky {
        display: none;
    }
    
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .table-of-contents {
        order: -1;
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-featured-image img {
        height: 250px;
        margin: 0 -20px;
        border-radius: 0;
    }
    
    .article-text {
        font-size: 1rem;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn-large {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 20px 0 20px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .author-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .read-time::before {
        display: none;
    }
    
    .table-of-contents {
        padding: 1rem;
    }
    
    .article-cta h3 {
        font-size: 1.5rem;
    }
    
    .article-cta p {
        font-size: 1rem;
    }
}