@import url('tokens.css');

/* --- CSS VARIABLES & RESET --- */
/* :root block removed - using tokens.css */

.static-banner {
    margin: 128px auto 0 auto;
    width: 100%;
    height: 400px;
    max-width: 1400px;
    background: url("../images/plain-banner@2x.jpg");
    border-radius: var(--border-radius-3xl);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.static-banner h2 {
    font-size: var(--font-size-4xl);
    font-weight: 300;
    color: var(--color-text-secondary-blue);
    text-align: center;
}

/* --- LAYOUT CONTAINER --- */
.terms-section {
    padding-top: 400px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 16px;
    display: flex;
    gap: 32px;
    position: relative;
}

/* --- SIDEBAR (Table of Contents) --- */
.sidebar {
    display: none;
    /* Hidden on mobile by default */
    width: 280px;
    flex-shrink: 0;
}

.toc-sticky {
    position: sticky;
    top: 96px;
    background: var(--color-white);
    padding: 24px;
    border: 1px solid #efefef;
    border-radius: var(--border-radius-sm);
    max-height: 85vh;
    overflow-y: auto;
}

.toc-sticky h3 {
    font-size: var(--font-size-md);
    margin-bottom: 16px;
    color: var(--color-primary);
    border-bottom: 4px solid var(--color-bg-light-gray);
    padding-bottom: 0.5rem;
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    display: block;
    padding: 4px 0;
    transition: color 0.2s;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    background: var(--color-white);
    padding: 48px;
    border: 1px solid #efefef;
    border-radius: var(--border-radius-sm);
}

.intro-meta {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
    font-style: italic;
    color: var(--color-text-light);
}

section {
    margin-bottom: 48px;
    scroll-margin-top: 32px;
    /* Smooth scroll offset */
}

.term-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-blue-bright-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text-darker-gray);
    margin-top: 24px;
    margin-bottom: 0.8rem;
}

.term-content {
    margin-bottom: 16px;
}

/* --- RESPONSIVE DESIGN --- */

@media (min-width: 992px) {
    .sidebar {
        display: block;
    }
}

@media (max-width: 768px) {
    .static-banner {
        max-width: 92vw;
        background-size: cover;
        height: 200px;
        border-radius: var(--border-radius-lg);

    }

    .static-banner h2 {
        font-size: var(--font-size-3xl);
        max-width: 300px;
    }

    header h1 {
        font-size: var(--font-size-2xl);
    }

    .main-content {
        padding: 24px;
    }

    .terms-section {
        font-size: var(--font-size-lg);
    }

    .term-list {
        padding: 0 0 0 16px;
    }

    .term-list li {
        padding-bottom: 8px;
    }
}
