/* General Reset & Body Styling */
body {
    font-family: 'IBM Plex Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #161616;
    line-height: 1.5;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: #0f62fe;
    transition: color 0.2s ease;
}

a:hover {
    color: #0353e9;
    text-decoration: underline;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- HEADER STYLES --- */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-row {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.site-logo {
    height: 3rem;
    width: auto;
    display: block;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    margin-left: 2.5rem;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav ul li a {
    color: #161616;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    white-space: nowrap;
    position: relative;
    top: 0;
}

.main-nav ul li a:hover {
    text-decoration: none;
    color: #0f62fe;
}

.utility-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.utility-link {
    color: #161616;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 0.75rem;
    white-space: nowrap;
}

.utility-link:hover {
    text-decoration: underline;
}

.subscribe-btn {
    background-color: #0f62fe;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.subscribe-btn:hover {
    background-color: #0353e9;
    text-decoration: none;
}

.icon-btn {
    background: none;
    border: none;
    color: #161616;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.icon-btn:hover {
    color: #0f62fe;
}

/* Secondary Navigation Styles */
.secondary-nav {
    background-color: #f4f4f4;
    border-top: 1px solid #e0e0e0;
    height: 3.5rem;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 999;
}

.secondary-nav-content {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-nav ul {
    display: flex;
    gap: 2rem;
    height: 100%;
}

.category-nav ul li a {
    color: #161616;
    font-size: 1rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    height: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.category-nav ul li a:hover {
    text-decoration: none;
    color: #0f62fe;
}

.category-nav ul li a.active {
    font-weight: 600;
    position: relative;
    color: #161616;
    text-decoration: none;
}

.category-nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0f62fe;
}

.category-nav .dropdown-arrow {
    font-size: 0.75em;
    margin-left: 0.35rem;
    line-height: 1;
}

.has-dropdown {
    position: relative;
    z-index: 10;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 0.5rem 0;
    border-radius: 0.25rem;
    min-width: 200px;
    display: none;
    margin-top: 0.5rem;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background-color: #0f62fe;
    transition: top 0.2s ease-in-out, height 0.2s ease-in-out;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #161616;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f4f4f4;
    color: #0f62fe;
    text-decoration: none;
}

/* --- END HEADER STYLES --- */

/* Main Content Layout */
.page-content-wrapper {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2.5rem;
    position: relative;
}

/* Fixed Social Share Bar */
.social-share-fixed {
    position: fixed;
    left: max(calc(50% - 600px - 50px), 1rem);
    top: 150px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 999;
}

.social-share-fixed .share-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.1rem;
    color: #161616;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-share-fixed .share-icon-btn:hover {
    background-color: #f4f4f4;
    color: #0f62fe;
    text-decoration: none;
}

.social-share-fixed .share-icon-btn img {
    width: 100%;
    height: auto;
}

/* Article Main Content */
.article-main-content {
    flex: 3;
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-width: 0;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: #0f62fe;
    font-weight: 400;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: 600;
    color: #161616;
    margin-bottom: 1rem;
}

.article-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.article-image-container {
    margin-bottom: 2.5rem;
}

.article-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
}

.article-image-container figcaption {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.75rem;
}

.article-body-section h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 600;
    color: #161616;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body-section h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 600;
    color: #161616;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body-section p {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.article-body-section ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.article-body-section ul li {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

/* Sidebar Styling */
.article-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 280px;
    align-content: flex-start;
}

.sidebar-section {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #161616;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-report .report-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0f62fe;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.sidebar-report .report-description {
    font-size: 0.9375rem;
    color: #525252;
    line-height: 1.6;
}
/* Responsive video container for YouTube/Vimeo embeds */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem; /* Apply border-radius to the container */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Remove default iframe border */
}

/* Table of Contents specific styling */
.sidebar-toc {
    position: relative;
    position: sticky;
    top: calc(5rem + 3.5rem + 1px + 1px + 20px);
    align-self: flex-start;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-toc ul li a {
    color: #0f62fe;
    font-size: 0.9375rem;
    padding: 0.625rem 0;
    display: block;
    border-bottom: 1px dotted #e0e0e0;
    padding-left: 25px;
    position: relative;
    transition: color 0.2s ease;
}

.sidebar-toc ul li:last-child a {
    border-bottom: none;
}

.sidebar-toc ul li a:hover {
    color: #0353e9;
    text-decoration: underline;
}

/* Active TOC link styling (JavaScript will add this class) */
.sidebar-toc ul li a.active {
    color: #161616;
    font-weight: 600;
    text-decoration: none;
}

/* Scroll Indicator Styling */
.toc-scroll-indicator {
    position: absolute;
    top: 55px;
    left: 15px;
    height: calc(100% - 70px);
    width: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.toc-scroll-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.toc-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background-color: #0f62fe;
    border-radius: 2px;
    transition: top 0.2s ease-out, height 0.2s ease-out;
    height: 20px;
}

/* Basic Responsiveness - adjust as needed */
@media (max-width: 1024px) {
    .page-content-wrapper {
        flex-direction: column;
        gap: 2rem;
        max-width: 800px;
    }

    .social-share-fixed {
        position: static;
        display: flex;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-bottom: 2rem;
        box-shadow: none;
        background: none;
        padding: 0;
        gap: 0.5rem;
    }

    .article-main-content, .article-sidebar {
        padding: 2rem;
    }

    /* Hide the secondary nav on smaller screens */
    .secondary-nav {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .utility-nav {
        gap: 0.5rem;
    }

    .icon-btn:nth-child(-n+2) {
        display: none;
    }

    /* Adjust TOC sticky top position for single row header */
    .sidebar-toc {
        top: 70px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .logo-container {
        margin-right: auto;
    }
    .utility-nav {
        justify-content: flex-end;
    }
    .subscribe-btn {
        padding: 0.5rem 1rem;
    }
}

/* FOOTER STYLES */
.site-footer {
    background-color: #f4f4f4;
    border-top: 1px solid #e0e0e0;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
    text-align: center;
    color: #666;
    font-size: 0.875rem;
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
}

.site-footer p {
    margin: 0.5rem 0;
}