/* ===============================
   RESET
================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ===============================
   BASE
================================= */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7f9fc;
    color: #111827;
    line-height: 1.6;
}

/* ===============================
   LAYOUT (3 columns)
================================= */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    min-height: 100vh;
}

/* ===============================
   SIDEBAR (LEFT MENU)
================================= */
.sidebar .logo img {
    width: 200px;
    height: auto;
    margin-bottom: 24px;
}

.sidebar .sublogo {
    margin: -8px 0 24px;
    display: flex;
    align-items: center;
    gap: 0;
}

.sidebar .sublogo img {
    width: 100px;
    height: auto;
    display: block;
}

.sidebar .sublogo span {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #111827;
    margin-left: -8px;
}

@media (max-width: 1000px) {
    .sidebar .logo img {
        width: 180px;
    }
}

.sidebar-section-title {
    font-size: 13px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 50px 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar li {
    margin-bottom: 6px;
}

.sidebar a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #4b5563;
    transition: 0.2s ease;
}

.sidebar a:hover {
    background: #f3f4f6;
    color: #111827;
}

.sidebar li.active a {
    background: #eef2ff;
    color: #1b63ff;
    font-weight: 600;
}

/* ===============================
   CONTENT (CENTER)
================================= */
.content {
    padding: 80px;
    max-width: 820px;
}

.content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}

.content .updated {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 40px;
}

section {
    margin-bottom: 70px;
}

section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
}

section p {
    color: #4b5563;
}

/* ===============================
   TOC (RIGHT SIDE)
================================= */
.toc {
    padding: 60px 30px;
    border-left: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    height: calc(100vh - 40px); /* pełna wysokość widoku minus margines */
    overflow-y: auto;          /* tylko własny scroll */
    padding-right: 10px;       /* miejsce na pasek przewijania */
    scroll-behavior: smooth;
}

.toc h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #6b7280;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    border-left: 1px solid #e5e7eb;
    margin-top: 12px;
}

.toc li {
    margin-bottom: 16px;
}

.toc a {
    display: block;
    padding: 6px 14px;
    text-decoration: none;
    font-size: 14px;
    color: #6b7280;
    position: relative;
    transition: 0.2s ease;
}

.toc a:hover {
    color: #111827;
}

.toc a.active {
    color: #1b63ff;
    font-weight: 600;
}

.toc a.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    height: 100%;
    width: 3px;
    background: #1b63ff;
}

/* ===============================
   BURGER (ANIMATED)
================================= */
.burger {
    width: 28px;
    height: 22px;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
}

.burger span {
    position: absolute;
    height: 3px;
    width: 100%;
    background: #111827;
    left: 0;
    transition: 0.3s ease;
}

.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 9px; }
.burger span:nth-child(3) { top: 18px; }

/* transform to X */
.burger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* ===============================
   MOBILE HEADER
================================= */
.mobile-header {
    display: none;
}

.mobile-header .mobile-logo img {
    height: 32px;
    width: auto;
}

/* ===============================
   RESPONSIVE
================================= */
@media (max-width: 1000px) {

.layout {
    grid-template-columns: 1fr;
}

/* Sidebar becomes slide panel */
.sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 260px;
    height: 100vh;
    padding: 60px 24px;
    transition: 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.sidebar.open {
    left: 0;
}

/* Hide TOC on mobile */
.toc {
    display: none;
}

/* Mobile header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-logo {
    font-weight: 600;
    font-size: 16px;
}

/* Content spacing */
.content {
    padding: 40px 20px;
}

}

/* ===============================
   FOOTER
================================= */

.site-footer {
    padding: 24px 40px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-nav a {
    text-decoration: none;
    color: #6b7280;
    margin: 0 12px;
}

.footer-nav a:hover {
    color: #1b63ff;
}
