
/* ====================================== */
/* GLOBAL VARIABLES & BASE SETTINGS       */
/* ====================================== */
:root {
    /* Color System */
    --primary-color: #1a252f;
    --secondary-color: #4CAF50;
    --accent-color: #333;
    --light-color: #f8f8f8;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #666;
    --white: #fff;
    --off-white: #f9f9f9;
    
    /* Hamburger Colors */
    --hamburger-orange: #FF9800;
    --hamburger-yellow: #FFC107;
    --hamburger-green: #8BC34A;
    
    /* Status Colors */
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index layers */
    --z-overlay: 998;
    --z-sidebar: 999;
    --z-navbar: 1000;
    --z-sticky: 1020;
    --z-modal: 1050;
}

/* ====================================== */
/* NAVBAR & HAMBURGER FIXES               */
/* ====================================== */

/* Navbar Container */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #1a252f, #0f1820);
    z-index: var(--z-navbar);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

@media (max-width: 576px) {
    .navbar {
        padding: 0 10px;
    }
    .navbar-brand,
    #hamburger-menu {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    .navbar-brand {
        margin: 0 6px 0 0 !important;
    }
    #hamburger-menu {
        margin-right: 8px;
    }
    /* Sidebar provides navigation on mobile, so hide the right nav links
       to give the search bar full breathing room */
    .navbar .nav-links {
        display: none !important;
    }
}

/* SIDEBAR HAMBURGER BUTTON (Bootstrap Icon) - ALWAYS VISIBLE */
#hamburger-menu {
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--hamburger-orange) !important; /* ORANGE COLOR */
    border: 2px solid var(--hamburger-orange) !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
    z-index: 1001;
    transition: all var(--transition-normal) !important;
}

/* Bootstrap icon inside sidebar hamburger button */
#hamburger-menu .bi-list {
    font-size: 1.5rem !important;
    color: white !important; /* White icon on orange background */
    transition: transform var(--transition-normal);
}

/* Hover effect for sidebar hamburger */
#hamburger-menu:hover {
    background: #e68900 !important; /* Darker orange on hover */
    border-color: #e68900 !important;
    transform: scale(1.1);
}

/* Active state - rotate icon for sidebar hamburger */
#hamburger-menu.active .bi-list {
    transform: rotate(90deg);
}

/* Active state - change background for sidebar hamburger */
#hamburger-menu.active {
    background: var(--hamburger-green) !important; /* Green when active */
    border-color: var(--hamburger-green) !important;
}

/* Home Button (replaces logo/site name) */
.navbar-brand {
    width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: 2px solid #2E7D32;
    border-radius: var(--radius-sm);
    color: var(--white) !important;
    font-size: 1.25rem;
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.navbar-brand:hover,
.navbar-brand:focus {
    background: linear-gradient(135deg, #43A047, #1B5E20);
    transform: scale(1.08);
    color: var(--white) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.navbar-brand i {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--white);
}

/* CUSTOM NAVBAR TOGGLER (NOT Bootstrap's) */
.navbar-toggler-custom {
    width: 40px;
    height: 40px;
    display: none !important; /* Hidden by default */
    align-items: center;
    justify-content: center;
    background: var(--hamburger-yellow) !important; /* YELLOW COLOR */
    border: 2px solid var(--hamburger-yellow) !important;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    margin-left: 10px;
    transition: all var(--transition-normal) !important;
    cursor: pointer;
}

/* Custom hamburger icon for navbar toggler */
.navbar-toggler-custom span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #000;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-custom span::before,
.navbar-toggler-custom span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #000;
    left: 0;
    transition: all 0.3s ease;
}

.navbar-toggler-custom span::before {
    top: -6px;
}

.navbar-toggler-custom span::after {
    bottom: -6px;
}

/* Active state for custom navbar toggler */
.navbar-toggler-custom.active span {
    background-color: transparent;
}

.navbar-toggler-custom.active span::before {
    transform: rotate(45deg) translate(4px, 4px);
}

.navbar-toggler-custom.active span::after {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Hover effect for navbar toggler */
.navbar-toggler-custom:hover {
    background: #e0a800 !important; /* Darker yellow on hover */
    border-color: #e0a800 !important;
    transform: scale(1.1);
}

/* Show custom navbar toggler only on mobile */
@media (max-width: 991px) {
    .navbar-toggler-custom {
        display: flex !important; /* Show only on mobile */
    }
}

/* Search bar - sits inline on the left, right after the home button */
.navbar .container-fluid {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
}

.navbar .search-wrapper {
    position: relative;
    flex: 0 1 360px;
    width: 100%;
    max-width: 360px;
    min-width: 0;
    margin: 0 12px 0 0;
    z-index: 5;
}

.navbar .search-wrapper #search-input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: none;
    padding: 6px 14px;
    font-size: 14px;
}

/* Push everything after the search bar (nav-links) to the right */
.navbar #navbarNav,
.navbar .navbar-collapse {
    margin-left: auto;
}

.search-wrapper {
    position: relative;
}

/* Tablet: shrink search a bit so nav-links still fit */
@media (max-width: 991px) {
    .navbar .search-wrapper {
        flex: 1 1 auto;
        max-width: 260px;
        margin: 0 8px 0 0;
    }
}

/* Phone: tighter still, no overlap with home/hamburger */
@media (max-width: 576px) {
    .navbar .container-fluid {
        gap: 0;
    }
    .navbar .search-wrapper {
        flex: 1 1 auto;
        max-width: none;
        margin: 0 6px 0 0;
    }
    .navbar .search-wrapper #search-input {
        padding: 5px 10px;
        font-size: 13px;
    }
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    z-index: calc(var(--z-navbar) + 10);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    display: none;
}

.search-results.active {
    display: block;
}

.search-results .search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: var(--text-color);
}

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

.search-results .search-result-item:hover,
.search-results .search-result-item.highlighted {
    background: #f0f7ff;
}

.search-results .search-result-item .result-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.search-results .search-result-item .result-info {
    flex: 1;
    min-width: 0;
}

.search-results .search-result-item .result-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results .search-result-item .result-title mark {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

.search-results .search-result-item .result-path {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results .search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.search-results .search-category {
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

/* Nav Links Container - FIX FOR VISIBILITY */
#navbarNav {
    background-color: transparent !important;
    display: flex !important; /* Always show on desktop */
}

/* Nav Links - FIXED FOR VISIBILITY */
.nav-links {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

/* Nav Links Styling */
.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-block;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-links a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
}

/* ====================================== */
/* MOBILE MENU RESPONSIVE FIXES           */
/* ====================================== */

@media (max-width: 991px) {
    /* Stack hamburger and logo */
    .navbar > .container-fluid {
        flex-wrap: nowrap !important;
    }
    
    /* Make search full width on mobile */
    #search-input {
        max-width: 100%;
        margin: 10px 0;
        order: 3;
        width: 100%;
    }
    
    /* FIX: Mobile menu - using our own toggle system */
    #navbarNav {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background-color: var(--primary-color) !important;
        padding: 15px !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
        z-index: var(--z-navbar) !important;
        margin-top: 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: none !important; /* Hidden by default on mobile */
        flex-direction: column !important;
    }
    
    /* Show menu when active */
    #navbarNav.mobile-active {
        display: flex !important;
    }
    
    /* Ensure nav links stack vertically on mobile */
    .nav-links {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .nav-links li {
        width: 100% !important;
    }
    
    .nav-links a {
        display: block !important;
        padding: 12px 15px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
        text-align: left !important;
    }
    
    /* Remove border from last item */
    .nav-links li:last-child a {
        border-bottom: none !important;
    }
    
    /* Add click handler to close menu when link is clicked */
    .nav-links a {
        cursor: pointer;
    }
}

/* Desktop menu - always visible */
@media (min-width: 992px) {
    /* FIX: Ensure nav links are visible on desktop */
    #navbarNav {
        display: flex !important;
        position: static !important;
        width: auto !important;
        background-color: transparent !important;
        box-shadow: none !important;
        border-top: none !important;
        padding: 0 !important;
    }
    
    .nav-links {
        flex-direction: row;
        width: auto;
    }
    
    .nav-links a {
        display: inline-block;
        padding: 8px 15px;
        border-bottom: none;
        width: auto;
    }
}

/* ====================================== */
/* SIDEBAR & CONTENT LAYOUT               */
/* ====================================== */

/* Sidebar Container */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 230px;
    height: calc(100vh - 56px);
    background-color: var(--light-color);
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: var(--z-sidebar);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    will-change: transform;
}

.sidebar.active {
    transform: translateX(0) !important;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
}

/* Sidebar Title */
.sidebar h2 {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 15px;
    margin: 0;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    border-bottom: 2px solid var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ====================================== */
/* SIDEBAR MENU                           */
/* ====================================== */

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

.menu-item {
    border-bottom: 1px solid #e8e8e8;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 600;
    background-color: #f5f5f5;
    cursor: pointer;
    text-align: left;
    transition: background-color var(--transition-fast);
    border-left: 3px solid var(--secondary-color);
}

.menu-header:hover {
    background-color: #e9e9e9;
}

.menu-header.active {
    background-color: var(--secondary-color);
    color: var(--white);
    border-left-color: var(--primary-color);
}

.menu-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.menu-header.active .menu-icon {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.submenu.active {
    max-height: 1000px;
    overflow: visible;
}

.submenu-item {
    border-bottom: 1px solid #f0f0f0;
}

.submenu-item a {
    display: block;
    padding: 8px 15px 8px 25px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 13px;
    transition: all var(--transition-fast);
    text-align: left;
    position: relative;
    line-height: 1.4;
    border-left: 2px solid transparent;
}

.submenu-item a:hover {
    background-color: #f9f9f9;
    color: var(--primary-color);
    border-left-color: var(--secondary-color);
}

.submenu-item a.active {
    background-color: var(--secondary-color) !important;
    color: var(--white) !important;
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.submenu-item a.active::before {
    content: "›";
    position: absolute;
    left: 12px;
    font-weight: bold;
}

/* ====================================== */
/* CONTENT LAYOUT                         */
/* ====================================== */

.content {
    margin-top: 56px;
    transition: margin-left var(--transition-slow), width var(--transition-slow);
    min-height: calc(100vh - 56px);
    background-color: var(--white);
    position: relative;
    z-index: 1;
}

/* Page Title + Prev/Next bar */
.content > .header {
    background: linear-gradient(to right, #f8fbff, #ffffff);
    border-bottom: 2px solid var(--secondary-color) !important;
    padding: 14px 24px !important;
    gap: 12px;
}

.content > .header h4#content-title,
.content > .header h4 {
    font-weight: 600 !important;
    color: var(--primary-color);
    font-size: 1.05rem !important;
    line-height: 1.35;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.content > .header .button-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.content > .header .btn-success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
    transition: all var(--transition-fast);
}

.content > .header .btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #43A047, #1B5E20);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

.content > .header .btn-success:disabled {
    background: #c8e6c9;
    color: #fff;
    opacity: 0.65;
    box-shadow: none;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .content > .header {
        padding: 10px 14px !important;
    }
    .content > .header h4 {
        font-size: 0.95rem !important;
    }
    .content > .header .btn-success {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
}

/* Desktop: Sidebar pushes content */
@media (min-width: 769px) {
    .sidebar.active ~ .content {
        margin-left: 230px;
        width: calc(100% - 230px);
    }
}

/* Mobile: Sidebar is overlay */
@media (max-width: 768px) {
    .sidebar {
        width: 280px !important;
        box-shadow: 3px 0 15px rgba(0, 0, 0, 0.2);
        z-index: var(--z-sidebar);
    }
    
    .sidebar.active ~ .content {
        margin-left: 0;
        width: 100% !important;
    }
}

/* ====================================== */
/* OVERLAY                                */
/* ====================================== */

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .overlay.active {
        display: block;
        opacity: 1;
    }
}

@media (min-width: 769px) {
    .overlay {
        display: none !important;
        opacity: 0 !important;
    }
}

/* ====================================== */
/* STICKY TABS                            */
/* ====================================== */

.sticky-tabs-container {
    position: sticky;
    top: 56px;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    z-index: var(--z-sticky);
    padding: 15px 0;
    margin: 0;
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid #eee;
    backdrop-filter: blur(10px);
}

/* ====================================== */
/* TAB BUTTONS                            */
/* ====================================== */

.mytab-btn {
    padding: 8px 20px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-normal);
    color: #555;
    margin: 0 5px;
    min-width: 100px;
    text-align: center;
}

.mytab-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    transform: translateY(-1px);
}

.mytab-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), #45a049);
    border-color: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* ====================================== */
/* QA BOXES                               */
/* ====================================== */

.qa-content-box {
    border: 2px solid #3498db;
    border-radius: var(--radius-md);
    margin: 25px 0;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal);
}

.qa-content-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.qa-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qa-header::before {
    content: "Q.";
    font-weight: bold;
    font-size: 18px;
}

/* ====================================== */
/* QUIZ STYLING                           */
/* ====================================== */

.quiz-score-display {
    position: sticky;
    top: 110px;
    z-index: 1019;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
}

.quiz-score-display .quiz-score-correct {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 2px;
}

.quiz-options {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.quiz-options li {
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-options li:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quiz-options li.correct {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border-color: #1e7e34;
    font-weight: 600;
}

.quiz-options li.wrong {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-color: #bd2130;
    font-weight: 600;
}

.answer {
    display: none;
    padding: 15px;
    margin: 15px 0;
    background: #e8f4fd;
    border: 1px solid #b6d4fe;
    border-radius: var(--radius-sm);
    color: #084298;
}

.answer.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================================== */
/* THEORY CONTENT                         */
/* ====================================== */

.theory-text {
    background: #fffdf7;
    border-radius: var(--radius-md);
    line-height: 1.8;
    color: #222;
    padding: 25px;
    border-left: 4px solid #f39c12;
    margin: 20px 0;
}

/* ====================================== */
/* CONTENT CARDS                          */
/* ====================================== */

.content-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

/* ====================================== */
/* LOADING & STATES                      */
/* ====================================== */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    padding: 30px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: var(--radius-md);
    color: #721c24;
    text-align: center;
}

/* ====================================== */
/* NAVIGATION BUTTONS                    */
/* ====================================== */

.nav-buttons {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-buttons button {
    padding: 10px 25px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-normal);
    min-width: 120px;
}

.nav-buttons button:hover:not(:disabled) {
    background: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-buttons button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ====================================== */
/* RESPONSIVE ADJUSTMENTS                */
/* ====================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 85% !important;
        max-width: 300px;
    }
    
    .sticky-tabs-container {
        top: 56px;
        padding: 10px 0;
    }
    
    .mytab-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .content-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .content {
        padding: 0 40px;
    }
    
    .content-cards {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* ====================================== */
/* UTILITY CLASSES                       */
/* ====================================== */

.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

.code-block {
    background: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    margin: 15px 0;
}

.note {
    background: #e8f4fd;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 15px 0;
    border-radius: var(--radius-sm);
}

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 15px 0;
    border-radius: var(--radius-sm);
}

/* ====================================== */
/* HIDE SCHEMA DATA                      */
/* ====================================== */

script[type="application/ld+json"],
script[type="application/json"] {
    display: none !important;
}

/* Print styles */
@media print {
    .sidebar, .sticky-tabs-container, .nav-buttons {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

//new css
/* ====================================== */
/* LONG Q&A SPECIFIC STYLES              */
/* ====================================== */

/* Q&A Body with justified text */

.qa-body {
    flex: 1;
    padding: 10px;
  	font-size: 1.25rem;
    line-height: 1.6;
    background-color: var(--white);
}

 

.qa-body h5 {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.qa-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* old one 
.qa-body p {
    margin-bottom: 1.25rem;
    text-align: justify;
}
*/

.qa-body p {
    margin-bottom: 1.25rem;
    text-align: justify !important;;
	hyphens: auto;
    text-justify: inter-word;   /* improves spacing between words */
    line-height: 1.7;           /* better readability */
}

.qa-body .lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: #495057;
    line-height: 1.8;
}

/* Quick Navigation Styling */
.quick-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    box-shadow: var(--shadow-sm);
}

.quick-nav .btn {
    padding: 8px 16px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.quick-nav .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Accordion Improvements */
.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all var(--transition-normal);
}

.accordion-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.accordion-button {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(26, 37, 47, 0.25);
    border-color: var(--primary-color);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform var(--transition-normal);
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Q&A Content Box Improvements */
.qa-content-box {
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    margin: 0;
    overflow: hidden;
    background: white;
}

.qa-header {
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    color: white;
    padding: 18px 25px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.qa-body {
    padding: 10px;
}

/* Card styling within answers */
.qa-body .card {
    border: 1px solid #dee2e6;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.qa-body .card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.qa-body .card-header {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 15px 20px;
}

.qa-body .card-body {
    padding: 20px;
}

/* Highlight important text */
.qa-body strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* List styling within answers */
.qa-body ul,
.qa-body ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.qa-body li {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Animation for content appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qa-content-box {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .qa-body {
        padding: 20px !important;
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .qa-header {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .accordion-button {
        padding: 15px;
        font-size: 1rem;
    }
    
    .quick-nav {
        padding: 15px;
    }
    
    .quick-nav .btn {
        padding: 6px 12px;
        font-size: 13px;
        margin-bottom: 5px;
    }
}

/* Print optimizations */
@media print {
    .qa-content-box {
        border: 1px solid #ddd;
        page-break-inside: avoid;
        box-shadow: none;
    }
    
    .qa-header {
        background: #f0f0f0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
    }
    
    .accordion-button {
        background: white !important;
        color: black !important;
        border: 1px solid #ddd !important;
    }
    
    .quick-nav {
        display: none;
    }
}



/* Add these to your CSS file */
.tab-hidden {
    display: none !important;
}

.tab-visible {
    display: block !important;
}

/* Fix for Sidebar Security Errors */
.sidebar-active {
    margin-left: 230px !important;
    width: calc(100% - 230px) !important;
}

.sidebar-inactive {
    margin-left: 0 !important;
    width: 100% !important;
}