/* ============================================
   CLEAN TWO-COLUMN LAYOUT
   Left Sidebar + Main Content Only
   ============================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--base-font-size);
    background-color: var(--lightbg);
    color: var(--text-color);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background-color: var(--topbar) !important;
    border-bottom: 1px solid var(--borderpost);
    backdrop-filter: blur(12px);
    min-height: 56px;
    padding: 0.5rem 1rem;
}

.navbar .container-xl {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.navbar-brand-text {
    color: var(--main-ink);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.navbar-brand img {
    width: 28px;
    height: auto;
}

/* ============================================
   MAIN LAYOUT - TWO COLUMNS
   ============================================ */
.layout-container {
    padding-top: 70px;
    padding-bottom: 40px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .layout-container {
        padding-top: 64px;
        padding-bottom: 24px;
    }
}

/* Content wrapper takes remaining space */
.content-wrapper {
    width: 100%;
    max-width: 900px;
}

/* ============================================
   SIDEBAR - LEFT ONLY
   ============================================ */
.sidebar-desktop {
    background-color: var(--lightbg);
}

@media (min-width: 992px) {
    .sidebar-desktop {
        position: sticky;
        top: 72px;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        padding-right: 1.5rem;
    }
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion-button {
    background-color: var(--cardbody);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    border: 1px solid var(--borderpost);
    border-radius: 8px;
}

.accordion-button:not(.collapsed) {
    background-color: var(--hover);
    border-color: var(--borderpost);
}

.accordion-body {
    font-size: 14px;
    color: var(--text-color);
    padding: 12px 16px;
}

.category-header {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: var(--main-ink);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--lightbg);
}

::-webkit-scrollbar-thumb {
    background: var(--grey);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bs-body-bg);
    z-index: 1055;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.search-overlay.active {
    display: flex;
}

.search-overlay .form-control {
    flex: 1;
    border-radius: 20px;
}

.search-overlay .btn-close {
    flex-shrink: 0;
}

#autocomplete-results {
    max-width: 600px;
    max-height: 400px;
    overflow-y: auto;
}

body.search-active .navbar {
    visibility: hidden;
}

body.search-active main {
    padding-top: 4rem;
}

.search-trigger {
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-trigger:hover {
    transform: scale(1.1);
}

/* ============================================
   NAVBAR ACTIONS
   ============================================ */
.navbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.5rem;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    color: inherit;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.nav-icon:hover {
    background-color: rgba(0,0,0,0.05);
}

.navbar .dropdown-menu {
    margin-top: 0.5rem;
}

.mobile-menu-toggle {
    padding: 0.4rem;
    border: none;
    background: none;
    font-size: 1.25rem;
}

/* ============================================
   MOBILE SIDEBAR TOGGLE (NOT USED BUT KEPT)
   ============================================ */
.sidebar-toggle-right {
    display: none; /* Hidden since no right sidebar */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 992px) {
    .navbar {
        padding: 0.4rem 1rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        width: 24px;
    }
}

@media (max-width: 767.98px) {
    .navbar .container-xl {
        padding: 0 0.75rem;
    }
    
    .layout-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-actions {
        gap: 0.25rem;
    }
    
    .nav-icon {
        padding: 0.3rem;
    }
}