/* Article Page Styles */

/* Article Hero Section - High Priority */


section.article-hero {
    min-height: 60vh !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 75px;
    /* Account for fixed header */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

section.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.article-hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 2;
    position: relative;
}

.article-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.article-description {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: white;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.95;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.meta-item i {
    font-size: 1rem;
    color: white;
}

/* Article Header */
.article-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0 4rem;
    margin-top: 75px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 50 Q 25 25, 50 50 T 100 50" stroke="rgba(255,255,255,0.1)" fill="none"/></svg>');
    opacity: 0.3;
}

.article-header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.article-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.95;
}

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

.meta-item i {
    font-size: 1rem;
}

.article-excerpt {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Article Container */
.article-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    align-items: start;
}

/* Article Main Content */
.article-main {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.article-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #667eea;
    position: relative;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.article-content h3 {
    color: #34495e;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
}

.article-content h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

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

.article-content ul,
.article-content ol {
    margin: 1.5rem 0 1.8rem 2rem;
}

.article-content li {
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.article-content blockquote {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-left: 4px solid #667eea;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    font-style: italic;
    font-size: 1.05rem;
}

.content-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.sidebar-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid #f0f0f0;
}

.sidebar-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3 i {
    color: #667eea;
    font-size: 1.2rem;
}

/* Article Navigation (Table of Contents) */
.article-nav ul {
    list-style: none;
    padding: 0;
}

.article-nav li {
    margin-bottom: 0.8rem;
}

.article-nav a {
    display: block;
    color: #555;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
    position: relative;
}

.article-nav a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    border-left-color: #667eea;
    transform: translateX(5px);
}

.article-nav a.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.article-nav a::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-nav a:hover::before,
.article-nav a.active::before {
    opacity: 1;
}

/* Recommended Articles */
.sidebar-section .recommended-article {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 1rem;
}

.sidebar-section .recommended-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 1rem;
}

.sidebar-section .recommended-article:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.recommended-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recommended-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.recommended-content a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recommended-content a:hover {
    color: #667eea;
}

/* Article Navigation */
.article-nav {

    justify-content: space-between;

    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.article-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    max-width: 45%;
}

.article-nav .nav-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.article-nav .nav-link.prev {
    flex-direction: row;
}

.article-nav .nav-link.next {
    flex-direction: row-reverse;
    text-align: right;
}

.article-nav .nav-icon {
    font-size: 1.5rem;
}

.article-nav .nav-text {
    display: flex;
    flex-direction: column;
}

.article-nav .nav-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.article-nav .nav-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    section.article-hero {
        min-height: 50vh !important;
        margin-top: 70px;
    }

    .reading-progress {
        top: 71px !important;
    }

    .article-hero h1 {
        font-size: 2.5rem;
    }

    .article-description {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }

    .meta-item {
        font-size: 0.9rem;
    }

    .article-header {
        padding: 6rem 0 3rem;
    }

    .article-title {
        font-size: 2.5rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-container {
        padding: 3rem .5rem;
    }

    .article-main {
        padding: 2rem 1.5rem;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .article-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .article-nav .nav-link {
        max-width: 100%;
    }

    .toc-section,
    .recommended-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    section.article-hero {
        min-height: 40vh !important;
    }

    .article-hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .article-description {
        font-size: 1rem;
        margin-bottom: 1.2rem;
        line-height: 1.5;
    }

    .article-hero-content {
        padding: 0 1rem;
    }

    .meta-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-excerpt {
        font-size: 1rem;
    }

    .article-main {
        padding: 1.5rem;
    }

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

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

    .toc-section,
    .recommended-section {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {

    .article-sidebar,
    .article-nav {
        display: none;
    }

    .article-container {
        grid-template-columns: 1fr;
    }

    .article-main {
        box-shadow: none;
        padding: 0;
    }
}