/* Article Layout Styles */
.article-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: calc(var(--nav-height) + 2rem) 1.5rem 3rem;
}

/* Table of Contents */
.toc-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    height: fit-content;
    max-height: calc(100vh - var(--nav-height) - 6rem);
    overflow-y: auto;
    padding: 1.5rem;
    padding-bottom: 3rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 185, 252, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid var(--shadow-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 2px;
}

.toc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cta-color);
    display: block;
}

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

.toc-item {
    margin-bottom: 0.4rem;
}

.toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    color: var(--accent-primary);
    background: var(--bg-primary);
}

.toc-link.active {
    color: var(--accent-primary);
    background: rgba(0, 185, 252, 0.15);
    border-left-color: var(--cta-color);
    font-weight: 600;
}

.toc-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.toc-item.expanded .toc-submenu {
    max-height: 500px;
}

.toc-sublink {
    display: block;
    padding: 0.4rem 0.75rem 0.4rem 1.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.toc-sublink:hover,
.toc-sublink.active {
    color: var(--cta-color);
}

/* Breadcrumb */
.breadcrumb {
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    background: var(--bg-primary);
    padding: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--shadow-color);
}

.breadcrumb a {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--cta-color);
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Article Content */
.article-content {
    max-width: 850px;
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-title {
    font-size: 2.6rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.25;
}

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

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

.author-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(36, 107, 207, 0.2);
}

.author-details .author-name {
    display: block;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.author-details span {
    font-size: 0.95rem;
    color: var(--cta-color);
    font-weight: 500;
}

.article-date {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Article Featured Image */
.article-featured-image {
    margin: 0 0 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--shadow-color);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Article Body - Enhanced Typography */
.article-body {
    font-size: 1.15rem;
    line-height: 1.85;
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: var(--text-secondary);
}

.article-body h2 {
    font-size: 1.85rem;
    color: var(--accent-primary);
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--cta-color);
}

.article-body h2::after {
    display: none;
}

.article-body h3 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: calc(var(--nav-height) + 3rem);
    padding-left: 1rem;
    border-left: 4px solid var(--cta-color);
}

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

.article-body li {
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: justify;
}

.article-body strong {
    color: var(--accent-primary);
}

.article-body a {
    color: var(--cta-color);
    font-weight: 500;
    border-bottom: 1px dashed var(--cta-color);
}

.article-body a:hover {
    color: var(--accent-primary);
    border-bottom-style: solid;
}

/* Colorful Section Cards */
.content-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 185, 252, 0.08) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin: 2.5rem 0;
    border-left: 5px solid var(--cta-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.content-section.accent-blue {
    border-left-color: #246bcf;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(36, 107, 207, 0.08) 100%);
}

.content-section.accent-gold {
    border-left-color: #ffd301;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 211, 1, 0.1) 100%);
}

.content-section.accent-cyan {
    border-left-color: #00b9fc;
}

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, rgba(36, 107, 207, 0.1) 0%, rgba(0, 185, 252, 0.1) 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(0, 185, 252, 0.3);
}

.highlight-box.warning {
    background: linear-gradient(135deg, rgba(255, 211, 1, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-color: rgba(255, 211, 1, 0.4);
}

.highlight-box.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Key Points List */
.key-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.key-points li {
    position: relative;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--shadow-color);
    transition: all 0.3s ease;
}

.key-points li:hover {
    transform: translateX(5px);
    border-color: var(--cta-color);
    box-shadow: 0 4px 12px rgba(0, 185, 252, 0.15);
}

.key-points li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cta-color);
    font-size: 1rem;
}

/* Skills Grid */
.skills-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.skill-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--shadow-color);
    transition: all 0.3s ease;
    text-align: center;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(36, 107, 207, 0.15);
}

.skill-item i {
    font-size: 2rem;
    color: var(--cta-color);
    margin-bottom: 0.75rem;
    display: block;
}

.skill-item strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

/* Quote Block */
.quote-block {
    position: relative;
    padding: 2rem 2rem 2rem 4rem;
    margin: 2.5rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(36, 107, 207, 0.05) 100%);
    border-radius: 12px;
    font-style: italic;
    font-size: 1.2rem;
    border-left: 4px solid var(--accent-primary);
}

.quote-block::before {
    content: '"';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 4rem;
    color: var(--cta-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Featured Image */
.featured-image {
    width: 100%;
    max-width: 420px;
    margin: 2.5rem auto;
    display: block;
}

.featured-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 12px 12px 0 var(--cta-color);
    border: 4px solid var(--accent-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-image img:hover {
    transform: translate(-5px, -5px);
    box-shadow: 17px 17px 0 var(--cta-color);
}

/* Share Section */
.share-section {
    margin-top: 4rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 185, 252, 0.1) 100%);
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--cta-color);
}

.share-title {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: block;
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
}

.share-btn i {
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn-facebook {
    background: linear-gradient(135deg, #1877F2, #0d65d9);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.share-btn-facebook:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.5);
    border-color: #fff;
    color: #ffffff !important;
}

.share-btn-linkedin {
    background: linear-gradient(135deg, #0A66C2, #084d94);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.share-btn-linkedin:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(10, 102, 194, 0.5);
    border-color: #fff;
    color: #ffffff !important;
}

.share-btn-x {
    background: linear-gradient(135deg, #000000, #333333);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.share-btn-x:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: #fff;
    color: #ffffff !important;
}

/* FAQ Section Enhanced */
.article-faq {
    margin-top: 3rem;
}

.article-faq .faq-container {
    max-width: 100%;
}

.article-faq .faq-item {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 185, 252, 0.05) 100%);
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid var(--shadow-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-faq .faq-item:hover {
    border-color: var(--cta-color);
}

.article-faq .faq-question {
    padding: 1.5rem;
    font-size: 1.1rem;
}

.article-faq .faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
}

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

    .toc-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }

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

    .article-body {
        font-size: 1.1rem;
    }

    .skills-showcase {
        grid-template-columns: 1fr;
    }
}

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

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
        width: 100%;
    }

    .content-section,
    .highlight-box {
        padding: 1.25rem;
    }
}

/* Comments Section */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--shadow-color);
}

.comments-section h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comments-section h3 i {
    color: var(--cta-color);
}