/* ===== Article Page Styles ===== */

/* ===== Article Banner ===== */
.article-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, var(--primary-color) 100%);
    color: #fff;
    padding: 90px 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.article-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%);
    animation: pulseGlow 8s ease-in-out infinite;
    pointer-events: none;
}

.article-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    background-size: 200% 100%;
    animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.article-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    text-align: center;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

.article-banner-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.article-banner-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 3px 3px 20px rgba(0,0,0,0.4);
    letter-spacing: -1px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.article-banner-subtitle {
    font-size: 22px;
    opacity: 0.95;
    max-width: 800px;
    line-height: 1.6;
    margin: 0 auto;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Article Layout ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 50px;
    max-width: 1280px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* ===== Main Article Content ===== */
.article-main {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 50px;
    transition: box-shadow 0.3s ease;
}

.article-main:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.article-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--accent-color);
}

.article-category-tag {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.article-full-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 18px;
    line-height: 1.3;
}

.article-meta-info {
    display: flex;
    gap: 25px;
    color: #888;
    font-size: 15px;
    flex-wrap: wrap;
}

.article-meta-info span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.article-meta-info i {
    color: var(--primary-color);
}

.article-featured-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 35px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.article-featured-image:hover {
    transform: scale(1.01);
}

.article-body {
    line-height: 1.9;
    color: var(--text-color);
}

.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.article-body h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 4px solid var(--primary-color);
}

.article-body p {
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 1.9;
}

.article-body ul,
.article-body ol {
    margin: 15px 0 15px 30px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-body strong {
    color: var(--primary-color);
    font-weight: 600;
}

.article-body blockquote {
    background: var(--light-color);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-light);
}

.article-body code {
    background: var(--light-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.article-body pre {
    background: var(--secondary-color);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body pre code {
    background: transparent;
    color: inherit;
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.article-tags h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.tag-cloud {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-color);
    color: var(--secondary-color);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 80px;
    align-self: start;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    padding: 30px 25px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-color);
}

/* ===== Table of Contents ===== */

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: var(--text-color);
    font-size: 15px;
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    overflow: hidden;
}

.toc-list a:hover {
    background: linear-gradient(to right, rgba(26, 115, 232, 0.1), transparent);
    color: var(--primary-color);
    padding-left: 18px;
    border-left-color: var(--primary-color);
}

.toc-list a.active {
    background: var(--primary-color);
    color: #fff;
    border-left-color: var(--primary-color);
    padding-left: 18px;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

/* ===== Recommended Articles ===== */
.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 10px;
    margin: -10px 0;
}

.recommended-item:last-child {
    border-bottom: none;
    padding-bottom: 10px;
}

.recommended-item:hover {
    transform: translateX(5px);
    background: linear-gradient(to right, rgba(26, 115, 232, 0.05), transparent);
}

.recommended-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recommended-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
    line-height: 1.4;
}

.recommended-content span {
    font-size: 12px;
    color: #999;
}

/* ===== Share Widget ===== */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

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

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

.share-btn.linkedin {
    background: #0a66c2;
}

.share-btn.whatsapp {
    background: #25d366;
}

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

/* ===== Article Navigation ===== */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.article-nav-item {
    background: linear-gradient(135deg, var(--light-color) 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.article-nav-item:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, var(--light-color) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.article-nav-item.prev {
    text-align: left;
}

.article-nav-item.next {
    text-align: right;
}

.article-nav-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
    display: block;
}

.article-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .toc-widget {
        position: static;
    }
}

@media (max-width: 768px) {
    .article-banner {
        padding: 40px 0;
    }

    .article-banner-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .article-banner-subtitle {
        font-size: 16px;
    }

    .article-full-title {
        font-size: 24px;
    }

    .article-main {
        padding: 25px;
    }

    .article-featured-image {
        height: 250px;
    }

    .article-body h2 {
        font-size: 22px;
    }

    .article-body h3 {
        font-size: 18px;
    }

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