html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

/* Prevent body shift when offcanvas opens */
body.offcanvas-open {
    padding-right: 0 !important;
    overflow: auto !important;
}

body[style*="overflow: hidden"] {
    padding-right: 0 !important;
}

body[style*="padding-right"] {
    padding-right: 0 !important;
}

#main-area {
    overflow-x: hidden;
    flex: 1;
    min-height: calc(100vh - 175px);
}

#main-area > .row {
    margin: 0;
    display: flex;
    align-items: stretch;
}

#main-area > .row > .col-auto {
    border-right: 1px solid #e5e5e5;
    background: transparent;
}

@media (max-width: 991.98px) {
    #main-area > .row > .col-auto {
        display: none;
    }
}

#sidebar {
    width: 400px;
    max-width: 400px;
    background: transparent;
    padding-top: 1rem;
}

#sidebar .logo-searchbar-area {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
}

#sidebar .logo-searchbar-area a {
    text-decoration: none;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
}

.lang-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    line-height: 1;
}

.lang-btn:hover {
    background: #e8e8e8;
    border-color: #5c2d91;
    color: #5c2d91;
}

.lang-btn.active {
    background: #5c2d91;
    border-color: #5c2d91;
    color: #fff;
}

#sidebar .sidebar-logo-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    text-decoration: none;
}

#sidebar .sidebar-logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #5c2d91;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
}

#sidebar .sidebar-logo-sub {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #fff;
    background: #5c2d91;
    padding: 1px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-top: 3px;
}

.offcanvas-logo-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-decoration: none;
}

.offcanvas-logo-sub {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #fff;
    background: #5c2d91;
    padding: 1px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-top: 3px;
    align-self: flex-start;
}

#sidebar .sidebar-logo i {
    display: none;
}

.logo-close {
    display: flex;
    align-items: center;
}

.btn-search {
    color: white;
    background-color: #5c2d91;
}

.btn-search:hover {
    color: white;
    background-color: #000000;
}

.input-group .form-control {
    border-radius: 0 20px 20px 0;
    border: 1px solid #ccc;
}

.input-group .btn {
    border-radius: 20px 0 0 20px;
}

#sidebar .search-container {
    margin-left: 0;
    margin-right: 0;
}

/* Search Results */
.input-group {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-result-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: #f5f5f5;
    color: #5c2d91;
}

.search-result-item i {
    color: #5c2d91;
}

.search-no-result {
    padding: 15px;
    text-align: center;
    color: #888;
}

#sidebar .list-group-item {
    border: none;
    padding: 0.6rem 1rem;
    margin: 0;
    display: flex;
    align-items: center;
}

#sidebar .list-group-item[data-bs-toggle="collapse"] {
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: 0.6rem;
    border-top: 0.5px solid #e0e0e0;
}

#sidebar .list-group-item[data-bs-toggle="collapse"]:first-of-type {
    margin-top: 0;
    border-top: none;
}

#sidebar .collapse .list-group-item {
    padding: 0.5rem 1rem;
}

#sidebar .collapse .list-group-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0.8rem;
}

#mobileSidebarMenu .list-group-item {
    padding: 0.6rem 1rem;
    margin: 0;
    display: flex;
    align-items: center;
}

#mobileSidebarMenu .list-group-item[data-bs-toggle="collapse"] {
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: 0.6rem;
    border-top: 0.5px solid #e0e0e0;
}

#mobileSidebarMenu .collapse .list-group-item {
    padding: 0.5rem 1rem;
}

#mobileSidebarMenu .collapse .list-group-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0.8rem;
}

.list-group {
    --bs-list-group-border-color: none;
}

.list-group-item .menu-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background-color: #5c2d91;
    color: white;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.list-group-item[aria-expanded="true"] .menu-icon {
    transform: rotate(90deg);
}

.offcanvas-body {
    padding: 0;
    overflow-x: hidden;
}

.offcanvas-body .offcanvas-logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #5c2d91;
    text-decoration: none;
}

.site-map {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    width: 100%;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.site-map > span {
    flex: 1;
}

.site-map > button {
    flex-shrink: 0;
    margin-left: auto;
}

.site-map .fa-house {
    color: #5c2d91;
}

.site-map .fa-bars {
    font-size: 24px;
}

.btn-check:checked+.btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check)+.btn:active {
    border-color: transparent;
}

.site-map a {
    text-decoration: none;
    color: black;
}

.site-map a:hover {
    text-decoration: underline;
}


@media (max-width: 768px) {
    #sidebar {
        width: 250px;
    }
}

.offcanvas {
    width: 400px;
    max-width: 400px;
    overflow: hidden;
    transition: transform 0.4s ease-in-out;
}

.offcanvas.showing,
.offcanvas.hiding {
    transition: transform 0.4s ease-in-out;
}

#mobileSidebarMenu {
    width: 100%;
}

/* Alt menü ikonları */
.collapse .list-group-item i.fa-sm {
    color: #5c2d91;
    font-size: 0.85rem;
}

/* Content Area Styles */
.content-area {
    max-width: 900px;
}

.content-area h1 {
    color: #0a0a0a;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: none;
    text-align: center;
}

.content-area h2 {
    color: #333;
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-area h3 {
    color: #555;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-area p {
    line-height: 1.7;
    color: #444;
}

.content-area pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.content-area code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

.content-area p code {
    background-color: #f6f8fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #5c2d91;
}

.content-area ul, .content-area ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-area li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Active menu item */
.list-group-item.active {
    background-color: #e8eef4;
    color: #5c2d91;
    border-color: transparent;
    font-weight: 500;
}

.list-group-item:hover {
    background-color: #f0f4f8;
}

/* Mobile responsive - başlık fontlarını küçült */
@media (max-width: 768px) {
    .content-area h1 {
        font-size: 1.6rem;
    }
    
    .content-area h2 {
        font-size: 1.3rem;
    }
    
    .content-area h3 {
        font-size: 1.1rem;
    }
}

/* Footer */
.doc-footer {
    margin-top: 3rem;
    margin-bottom: 0;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    min-height: 175px;
    display: flex;
    align-items: center;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    padding: 0 2rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    font-weight: 600;
    color: #5c2d91;
    font-size: 1rem;
}

.footer-version {
    background: #5c2d91;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.footer-center {
    color: #666;
    font-size: 0.85rem;
}

.footer-right {
    display: flex;
    gap: 1rem;
}

.footer-right a {
    color: #5c2d91;
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: #000;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #5c2d91;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: #2c5282;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}