/* --- mainarticles.css (THE GLOBAL FOUNDATION FOR ALL PAGES) --- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg-color: black;
    --text-color: white;
    --secondary-text-color: rgba(255, 255, 255, 0.7);
    --border-color: #353535;
    --primary-color: #245AF6;
    /* ... and all other variables ... */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}




/* --- SHARED COMPONENT STYLES --- */
.terrain-section {
    width: 100%;
    position: relative;
    height: 350px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    box-sizing: border-box;
}

.terrain-section h1 {
    font-weight: 500;
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #6d6d6d, white 50%, #6d6d6d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: arial;
    padding-bottom: 10px;
    text-align: center;
    position: relative;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .terrain-section h1 {
        font-size: 2.9rem;
        max-width: 90%;
    }
}

@media (max-width: 450px) {
    .terrain-section h1 {
        font-size: 2.1rem;
    }
}

.author-date {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

/* --- SHARED ARTICLE CONTENT STYLES --- */

.article-content {
    font-size: inherit;
    line-height: 1.6;
    width: 80%;
    margin: 2rem auto;
    padding: 0 1rem;
    
}

@media (max-width: 768px) {
    .article-content {
        width: 100%;
    }
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

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

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
}

.article-content a:hover {
    color: #5d8aff;
    border-bottom: 1px solid #5d8aff;
}

.article-content ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 1.5rem;
    color: var(--secondary-text-color);
}

.article-content li {
    margin-bottom: 0.75rem;
}



.article-progress-container {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    bottom: -6px;
    background-color: transparent;
    z-index: 1000;
}

.article-progress-bar {
    height: 100%;
    width: 0%; 
    background-color: #d1d1d1; /* Your Primary Blue Color */
    transition: width 0.1s ease-out;
    display: block;
    box-shadow: 0 0 10px rgba(36, 90, 246, 0.5);
    border-radius: 10px;
}




/* --- MAIN SIDE BAR ARTICLES --- */

#other-articles-sidebar {
    position: sticky;
    top: 70px; 
    z-index: 999;
    width: 100%;
    background-color: #000000db !important;
    border-bottom: 1px solid #245AF6;
    box-sizing: border-box;
    left: 0;
    min-height: 35px;
}

.sticky-bar {
    position: fixed;;
    top: 0;
}

.sidebar-articles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 90%;
    margin: 0 auto;
    margin-top: 0px;
    margin-bottom: 0px;
}

.sidebar-articles__title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    flex-shrink: 0;
}

.sidebar-articles__list {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.sidebar-articles__link {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.8em;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.sidebar-articles__link:hover {
    color: #245AF6;
}

@media (max-width: 1200px) {
    #other-articles-sidebar {
        display: none;
    }
}


#other-articles-sidebar {
    display: block;
}

* --- Mobile Navigation Arrows for Article Sidebar --- */

.mobile-nav-container {
    display: flex;
    gap: 25px;
}

.mobile-nav-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-decoration: none;
    
}

.mobile-nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
}


@media (max-width: 768px) {
    .sidebar-articles {
        display: flex;
        justify-content: space-between;
        align-items: center;
        justify-content: space-between; 
    }

    .sidebar-articles__list {
        display: none;
    }

    .mobile-nav-container {
        display: flex;
        gap:50px;
    }
}