/*
# content-reader.css
# Premium Reading Experience Styles
*/

.article-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-top: 80px;
}

.article-overlay.active {
    display: block;
    opacity: 1;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--vista-glass-bg);
    border: 1px solid var(--vista-glass-border);
    border-radius: 24px;
    padding: 60px;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.article-overlay.active .article-container {
    transform: translateY(0);
}

.article-close {
    position: fixed;
    top: 30px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 2001;
}

.article-close:hover {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.4);
    transform: rotate(90deg);
}

/* Content Styles */
.article-body {
    color: var(--vista-text-main);
    line-height: 1.8;
}

.article-body h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--vista-primary);
}

.article-body h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--vista-teal);
}

.article-body p {
    margin-bottom: 1.2rem;
}

.article-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.article-body th,
.article-body td {
    padding: 15px;
    border: 1px solid var(--vista-glass-border);
    text-align: left;
}

.article-body th {
    background: rgba(255, 255, 255, 0.05);
}

/* Sidebar ToC */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vista-text-dim);
    margin-bottom: 1.5rem;
    display: block;
}

.toc-list {
    list-style: none;
    padding: 0;
    border-left: 1px solid var(--vista-glass-border);
}

.toc-item {
    margin-bottom: 12px;
}

.toc-link {
    text-decoration: none;
    color: var(--vista-text-dim);
    font-size: 0.95rem;
    padding-left: 20px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 50%;
    width: 2px;
    height: 0;
    background: var(--vista-teal);
    transition: all 0.3s ease;
    transform: translateY(-50%);
}

.toc-link.active {
    color: var(--vista-teal);
    font-weight: 500;
}

.toc-link.active::before {
    height: 20px;
}

/* Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--vista-primary), var(--vista-teal));
    z-index: 2010;
    transition: width 0.1s linear;
}

@media (max-width: 992px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }

    .article-sidebar {
        display: none;
    }
}