/* Documentation Page Custom Styles - Professional & Modern */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Georgia:ital,wght@0,400;0,700;1,400&display=swap');

.doc-main, .documentation-container, .doc-toc, .doc-sidenav .fs-4, .doc-toc .nav-link, .doc-toc .nav .nav-link, .extended-type, .release-item, .upcoming-release-item {
    /* Only target documentation page elements, not global nav */
}
.doc-main {
    font-family: 'Georgia', Times, serif;
    font-size: 1.08em;
    color: #222;
    line-height: 1.6;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    max-width: 1200px; /* Increased from 900px to 1200px */
    margin: 0 auto;
}
.documentation-container {
    min-height: 100vh;
    background: #f8f9fa;
}
.doc-sidenav {
    min-width: 320px;
    max-width: 320px;
    height: 100vh;
    background: #f8f9fa;
    border-right: 1px solid #e5e5e5;
    z-index: 100;
    position: sticky;
    top: 0;
    left: 0;
    overflow-y: auto;
    font-family: 'Montserrat', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.doc-sidenav .fs-4 {
    letter-spacing: 0.01em;
    color: #222;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    font-size: 1.6em;
}
.doc-toc .nav-link {
    color: #333;
    font-weight: 500;
    border-radius: 4px;
    padding: 0.35em 0.7em;
    transition: color 0.2s, background 0.2s;
    font-size: 1.04em;
    font-family: 'Montserrat', Arial, sans-serif;
    letter-spacing: 0.04em;
}
.doc-toc .nav-link.active,
.doc-toc .nav-link:hover {
    color: #007bff;
    background: #e9ecef;
    text-decoration: none;
}
.doc-toc .nav .nav-link {
    font-size: 0.98em;
    font-weight: 400;
    padding-left: 1.2em;
    color: #555;
    font-family: 'Montserrat', Arial, sans-serif;
}
.doc-toc .nav .nav-link.active,
.doc-toc .nav .nav-link:hover {
    color: #0056b3;
    background: #f1f3f5;
}
section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 2.5rem; /* Leaves space above anchor when scrolled to via TOC */
}
.extended-type {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.1em;
    font-weight: 900;
    letter-spacing: 0.32em;
    color: #1a1a1a;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
    line-height: 1.1;
}
.doc-section-title {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.1em;
    font-weight: 900;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
    line-height: 1.1;
    border-bottom: 3px solid #007bff;
    display: inline-block;
    padding-bottom: 0.18em;
    background: linear-gradient(90deg, #e3f0ff 60%, transparent 100%);
    border-radius: 2px;
}
@media (max-width: 575.98px) {
    .doc-section-title {
        font-size: 1.3em;
        padding-bottom: 0.12em;
    }
}
h3, h4, h2 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 2.2rem;
    margin-bottom: 1.1rem;
    letter-spacing: 0.06em;
}
h4 {
    font-size: 1.25em;
    margin-top: 1.5rem;
}
p, ul, ol {
    margin-bottom: 1.1em;
    margin-top: 0.2em;
}
ul, ol {
    padding-left: 2em;
}
li {
    margin-bottom: 0.4em;
}
p + p, ul + p, ol + p {
    text-indent: 1.08em;
}
section > div > p:first-child {
    text-indent: 0;
}
.release-item:not(:last-child) {
    border-bottom: 1px solid #e9ecef !important;
}
.upcoming-release-item {
    margin-bottom: 1.5rem;
}
.badge[style*='color:#28a745'] {
    background: rgba(40,167,69,0.12) !important;
    color: #28a745 !important;
}
.badge[style*='color:#dc3545'] {
    background: rgba(220,53,69,0.12) !important;
    color: #dc3545 !important;
}
.badge[style*='color:#007bff'] {
    background: rgba(0,123,255,0.12) !important;
    color: #007bff !important;
}
a {
    color: #0056b3;
    text-decoration: underline;
}
a:hover, a:focus {
    color: #003366;
    text-decoration: underline;
}
hr {
    border: none;
    border-top: 2px solid #e5e5e5;
    margin: 2.5rem 0 2.2rem 0;
}
/* --- Mobile Optimization for Documentation Page --- */
@media (max-width: 991.98px) {
    .documentation-container {
        flex-direction: column;
    }
    .doc-sidenav {
        position: static;
        width: 100%;
        max-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        margin-bottom: 1.5rem;
        overflow-y: visible;
        min-width: 0;
    }
    .doc-main {
        max-width: 100%;
        padding: 1.5rem 0.5rem;
    }
    .release-item, .upcoming-release-item {
        border-radius: 0.7em;
        margin-left: 0;
        margin-right: 0;
    }
}
@media (max-width: 767.98px) {
    .doc-main {
        padding: 0.7rem 0.1rem;
        font-size: 0.98em;
    }
    .release-item, .upcoming-release-item {
        padding-left: 0.5em !important;
        padding-right: 0.5em !important;
    }
    .doc-section-title {
        font-size: 1.1em;
    }
    .doc-sidenav {
        font-size: 0.98em;
        padding: 0.7rem 0.2rem;
    }
    .release-item .d-flex, .upcoming-release-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .release-item .ms-3, .upcoming-release-item .ms-3 {
        margin-left: 0 !important;
        margin-top: 0.5em;
    }
}
@media (max-width: 575.98px) {
    .doc-sidenav {
        padding: 0.5rem 0.1rem;
        min-width: 0;
        max-width: 100vw;
        font-size: 0.95em;
    }
    .doc-main {
        padding: 0.5rem 0.05rem;
        font-size: 0.93em;
    }
    .release-item, .upcoming-release-item {
        border-radius: 0.5em;
        margin-left: 0;
        margin-right: 0;
        font-size: 0.98em;
    }
    .doc-section-title {
        font-size: 1em;
        padding-bottom: 0.08em;
    }
    .release-item .d-flex, .upcoming-release-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .release-item .ms-3, .upcoming-release-item .ms-3 {
        margin-left: 0 !important;
        margin-top: 0.5em;
    }
    .release-item .fw-bold, .upcoming-release-item .fw-bold {
        font-size: 1.08em !important;
    }
    .release-item .badge, .upcoming-release-item .badge {
        font-size: 0.98em !important;
        padding: 0.35em 0.8em !important;
    }
}
/* Make release cards and items full width on mobile */
@media (max-width: 575.98px) {
    .p-0.rounded.shadow-sm.bg-white.border {
        border-radius: 0.5em !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100vw !important;
        left: 50%;
        right: 50%;
        transform: none !important;
    }
}
/* Ensure horizontal scrolling for code blocks and tables on mobile */
@media (max-width: 767.98px) {
    pre, code, table {
        white-space: pre-wrap !important;
        word-break: break-word !important;
        overflow-x: auto !important;
        font-size: 0.97em !important;
    }
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}
/* Responsive images for documentation - always fit container and never overflow on mobile */
.documentation-container img, .doc-main img, .doc-section-title img, section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.1em auto;
    border-radius: 0.4em;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
@media (max-width: 767.98px) {
    .documentation-container img, .doc-main img, .doc-section-title img, section img {
        max-width: 98vw;
        margin-left: auto;
        margin-right: auto;
    }
}
