/* Modern Blog Post Styles */

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(37, 99, 235, 0.1);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Article Hero Section */
.article-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0 6rem;
    margin-top: -1px; /* Overlap with navigation */
}

[data-theme="dark"] .article-hero {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    padding-right: 2rem;
}

.hero-image {
    padding-left: 2rem;
}

/* Categories */
.article-categories {
    margin-bottom: 1.5rem;
}

.category-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Article Title */
.article-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--heading-color);
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2.25rem;
    }
}

/* Article Subtitle */
.article-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-name a {
    font-weight: 600;
    color: var(--heading-color);
    text-decoration: none;
    font-size: 1rem;
}

.author-name a:hover {
    color: var(--primary-color);
}

.social-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #1da1f2;
    color: white;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-follow:hover {
    background: #1a91da;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.7;
}

.reading-time {
    font-weight: 500;
}

/* Featured Image */
.image-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.image-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.featured-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

@media (max-width: 992px) {
    .hero-text,
    .hero-image {
        padding-left: 0;
        padding-right: 0;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .image-container {
        transform: none;
    }
    
    .featured-image {
        height: 200px;
    }
}

/* Article Container */
.article-container {
    padding: 4rem 0;
    background: var(--background-color);
}

/* Share Sidebar */
.share-sidebar {
    position: sticky;
    top: 120px;
    padding: 1.5rem 0;
}

.share-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

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

.share-btn.facebook {
    background: #4267b2;
}

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

.share-btn.email {
    background: #ea4335;
}

.share-btn.copy-link {
    background: var(--text-color);
}

/* Mobile Share */
.mobile-share {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--card-shadow);
}

.mobile-share .share-title {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 1rem;
}

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

.share-btn-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.share-btn-mobile:hover {
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.share-btn-mobile.twitter {
    background: #1da1f2;
}

.share-btn-mobile.facebook {
    background: #4267b2;
}

.share-btn-mobile.linkedin {
    background: #0077b5;
}

/* Article Content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: none;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 2rem;
}

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

.article-content h4 {
    font-size: 1.25rem;
}

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

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

.article-content code {
    background: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

.article-content pre {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

/* Tags */
.article-tags {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 3rem 0;
    box-shadow: var(--card-shadow);
}

.tags-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 3rem 0;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.newsletter-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
}

.newsletter-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.newsletter-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.newsletter-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.newsletter-form {
    min-width: 300px;
}

@media (max-width: 768px) {
    .newsletter-form {
        min-width: auto;
        width: 100%;
    }
}

.input-group {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    font-size: 0.95rem;
    outline: none;
}

.newsletter-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    backdrop-filter: blur(10px);
}

.newsletter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Author Bio */
.author-bio {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: var(--card-shadow);
}

.author-card {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 576px) {
    .author-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .author-header {
        justify-content: center;
    }
}

.author-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--heading-color);
}

.author-header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.author-header a:hover {
    text-decoration: underline;
}

.author-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #1da1f2;
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.author-follow:hover {
    background: #1a91da;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.author-description {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

/* Comments Section */
.comments-section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: var(--card-shadow);
}

/* Article Navigation */
.article-navigation {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
}

.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .nav-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.nav-item {
    display: flex;
}

.nav-item.prev {
    justify-content: flex-start;
}

.nav-item.next {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .nav-item.next {
        justify-content: flex-start;
    }
}

.nav-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    max-width: 300px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.nav-item.next .nav-direction {
    justify-content: flex-end;
}

.nav-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.nav-item.next .nav-content {
    flex-direction: row-reverse;
    text-align: right;
}

.nav-image {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--heading-color);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .article-hero {
        padding: 3rem 0 4rem;
    }
    
    .article-container {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 2rem 0 3rem;
    }
    
    .article-container {
        padding: 2rem 0;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .newsletter-section {
        padding: 2rem 1.5rem;
    }
    
    .author-bio {
        padding: 1.5rem;
    }
}
