/* =====================================================================
   News Detail Page Specific Styles
   ===================================================================== */

/* Hero Section */
.news-detail-hero {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl) 0 var(--space-2xl);
    margin-bottom: 0;
}

.news-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMTIwMCA4MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImRvdHMiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PGNpcmNsZSBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuMikiIGN4PSIzIiBjeT0iMyIgcj0iMyIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3QgZmlsbD0idXJsKCNkb3RzKSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjwvc3ZnPg==') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.news-detail-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.hero-meta-item i {
    color: var(--gold-accent);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.breadcrumb-item, 
.breadcrumb-item a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.breadcrumb-item a:hover {
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
    content: "›";
}

/* Hero Image Overlap */
.hero-image-overlap {
    position: relative;
    z-index: 4;
    margin-top: -80px;
}

.hero-image-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.hero-image-container img {
    border-radius: var(--radius-lg);
    width: 100%;
    height: auto;
}

/* Article Layout */
.article-container {
    padding: var(--space-3xl) 0;
}

/* Sidebar Styles */
.article-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    transition: all var(--transition-smooth);
}

.sidebar-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-lg);
}

.sidebar-card-title {
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sidebar-card-title i {
    color: var(--gold-accent);
}

/* Author Card */
.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-gold);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.author-name {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.author-role {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.author-bio {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
}

/* Article Stats */
.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    color: var(--gold-accent);
    min-width: 16px;
}

/* Table of Contents */
.toc-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.toc-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--gold-accent);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

#toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#toc li {
    margin-bottom: var(--space-xs);
}

#toc a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: all var(--transition-smooth);
    font-size: var(--text-sm);
    border-left: 3px solid transparent;
}

#toc a:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
    border-left-color: var(--gold-accent);
    transform: translateX(var(--space-xs));
}

#toc a.active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--text-primary);
    border-left-color: var(--gold-accent);
    font-weight: 600;
}

/* Main Article */
.article-main {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.article-header {
    padding: var(--space-2xl);
    border-bottom: 1px solid var(--border-light);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.meta-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-gold);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    font-weight: 700;
}

.meta-info {
    flex-grow: 1;
}

.meta-author {
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.meta-details {
    color: var(--text-muted);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.meta-details i {
    color: var(--gold-accent);
}

/* Article Content */
.article-content {
    padding: var(--space-2xl);
    font-size: var(--text-lg);
    line-height: 1.7;
    color: var(--text-secondary);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
    line-height: 1.3;
}

.article-content h2 {
    font-size: var(--text-3xl);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
    font-size: var(--text-2xl);
}

.article-content h4 {
    font-size: var(--text-xl);
}

.article-content p {
    margin-bottom: var(--space-lg);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-md);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-content blockquote {
    border-left: 4px solid var(--gold-accent);
    padding: var(--space-lg) var(--space-xl);
    margin: var(--space-xl) 0;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--text-primary);
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--gold-accent);
    position: absolute;
    top: 0;
    left: var(--space-lg);
    line-height: 1;
    opacity: 0.5;
}

.article-content code {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold-accent);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-xl) 0;
}

.article-content pre code {
    background: none;
    color: var(--text-secondary);
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    text-align: left;
}

.article-content th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

/* Article Footer */
.article-footer {
    padding: var(--space-2xl);
    border-top: 1px solid var(--border-light);
}

.article-tags {
    margin-bottom: var(--space-xl);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-accent);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
    margin-right: var(--space-sm);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-smooth);
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--gradient-gold);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Social Sharing */
.social-share {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-xl);
}

.social-share-title {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.social-share-title i {
    color: var(--gold-accent);
}

.social-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all var(--transition-smooth);
    border: 2px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    border-color: var(--gold-accent);
}

.social-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: white;
}

.social-btn.facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
    color: white;
}

.social-btn.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
    color: white;
}

.social-btn.copy-link.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Article Navigation */
.article-navigation {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin: var(--space-2xl) 0;
    transition: all var(--transition-smooth);
}

.article-navigation:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-lg);
}

.nav-item {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-smooth);
    display: block;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-accent);
    transform: translateY(-2px);
}

.nav-label {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-title {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.nav-item:hover .nav-title {
    color: var(--gold-accent);
}

/* Related Articles */
.related-section {
    background: rgba(255, 255, 255, 0.02);
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

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

.related-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-xl);
}

.related-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.related-card-content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-card-category {
    background: var(--gradient-gold);
    color: var(--primary-color);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    margin-bottom: var(--space-md);
    align-self: flex-start;
}

.related-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.related-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

.related-card-title a:hover {
    color: var(--gold-accent);
}

.related-card-excerpt {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.related-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.related-card-date {
    color: var(--text-muted);
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.related-card-date i {
    color: var(--gold-accent);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--gradient-primary);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.newsletter-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    text-align: center;
    position: relative;
    z-index: 1;
}

.newsletter-title {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.newsletter-description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: var(--space-md) var(--space-lg);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all var(--transition-smooth);
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    color: var(--text-primary);
    outline: none;
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-disclaimer {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--space-2xl);
    right: var(--space-2xl);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn {
    width: 56px;
    height: 56px;
    background: var(--gradient-gold);
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.back-to-top-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Mobile Image */
.mobile-image {
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    .news-detail-hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .hero-image-overlap {
        margin-top: -40px;
    }
    
    .hero-image-container {
        padding: var(--space-sm);
    }
    
    .article-container {
        padding: var(--space-xl) 0;
    }
    
    .article-sidebar {
        position: static;
        margin-bottom: var(--space-xl);
    }
    
    .sidebar-card {
        padding: var(--space-lg);
    }
    
    .article-main {
        border-radius: var(--radius-lg);
    }
    
    .article-header,
    .article-content,
    .article-footer {
        padding: var(--space-lg);
    }
    
    .article-content {
        font-size: var(--text-base);
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .social-buttons {
        justify-content: center;
    }
    
    .social-btn {
        flex: 1;
        justify-content: center;
        min-width: 140px;
    }
    
    .article-navigation {
        padding: var(--space-lg);
    }
    
    .nav-item {
        padding: var(--space-md);
    }
    
    .newsletter-container {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .newsletter-title {
        font-size: var(--text-2xl);
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-input {
        width: 100%;
        min-width: auto;
    }
    
    .back-to-top {
        bottom: var(--space-lg);
        right: var(--space-lg);
    }
    
    .back-to-top-btn {
        width: 48px;
        height: 48px;
        font-size: var(--text-lg);
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: var(--text-2xl);
    }
    
    .article-content h2 {
        font-size: var(--text-xl);
    }
    
    .article-content h3 {
        font-size: var(--text-lg);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .toc-container {
        padding: var(--space-md);
    }
}

/* Accessibility and Performance */
@media (prefers-reduced-motion: reduce) {
    .article-main,
    .related-card,
    .nav-item,
    .social-btn,
    .back-to-top-btn {
        transition: none;
        animation: none;
    }
}

.article-main:focus-within,
.related-card:focus-within,
.nav-item:focus {
    outline: 2px solid var(--gold-accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .news-detail-hero,
    .article-sidebar,
    .article-navigation,
    .related-section,
    .newsletter-section,
    .back-to-top {
        display: none;
    }
    
    .article-main {
        background: white;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .article-content {
        color: #000;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6 {
        color: #000;
    }
}