/* Sidebar Logo Styling */
.sidebar-logo {
    display: flex; /* Use flexbox for precise centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    padding: 15px 0 0 0; 
    margin: 0 auto; /* Ensure no margin issues */
    width: 100%; /* Ensure it takes full width of parent */
}

/* Logo image styling */
.sidebar-logo img {
    max-width: 100%;
    height: auto;
    max-height: 150px; /* Adjust as needed */
}

/* Logo visibility based on theme - Fixed logic */
/* Default: hide all logos first */
.logo-light, .logo-dark {
    display: none;
}

/* Dark sidebar/topbar shows dark logo */
[data-sidebar="dark"] .logo-dark,
[data-topbar="dark"] .logo-dark {
    display: block !important;
}

/* Light sidebar/topbar shows light logo */

/* Avatar Circle Fix */
.avatar-xl, .avatar-lg, .avatar-sm {
    border-radius: 50% !important;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar-title {
    border-radius: 50% !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-xl { width: 4rem; height: 4rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; }
.avatar-sm { width: 2.5rem; height: 2.5rem; }
[data-sidebar="light"] .logo-light,
[data-topbar="light"] .logo-light {
    display: block !important;
}

/* Dark theme override */
[data-bs-theme="dark"] .logo-dark {
    display: block !important;
}

[data-bs-theme="dark"] .logo-light {
    display: none !important;
}

/* Light theme override */
[data-bs-theme="light"] .logo-light {
    display: block !important;
}

[data-bs-theme="light"] .logo-dark {
    display: none !important;
}

/* Layout-specific visibility */
[data-layout="vertical"] .horizontal-only {
    display: none !important;
}

[data-layout="horizontal"] .vertical-only {
    display: none !important;
}

[data-layout="horizontal"] .sidebar {
    display: none !important;
}

[data-layout="horizontal"] .content-wrapper {
    margin-left: 0 !important;
}

[data-layout="horizontal"] .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
}

/* Horizontal navigation styling */
.horizontal-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.horizontal-nav .nav-link:hover,
.horizontal-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-1px);
}

.horizontal-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-top: 8px;
}

.horizontal-logo img {
    transition: all 0.3s ease;
}

.horizontal-logo:hover img {
    transform: scale(1.05);
}

/* Gradient sidebar support */
[data-sidebar="gradient"] .sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
}

[data-sidebar="gradient"] .sidebar-logo .logo-dark {
    display: block !important;
}

[data-sidebar="gradient"] .sidebar-logo .logo-light {
    display: none !important;
}

[data-sidebar="gradient"] .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-sidebar="gradient"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

[data-sidebar="gradient"] .nav-link.active {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Additional gradient styling for better visibility */
[data-sidebar="gradient"] .sidebar .navbar-nav .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

[data-sidebar="gradient"] .sidebar .navbar-nav .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

[data-sidebar="gradient"] .sidebar .navbar-nav .nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.2) !important;
    border-left: 3px solid #fff;
}

/* Mobile responsive - Basic setup */
@media (max-width: 991.98px) {
    /* Force vertical layout on mobile */
    [data-layout="horizontal"] .horizontal-nav {
        display: none;
    }
    
    [data-layout="horizontal"] .vertical-only {
        display: block;
    }
    
    /* Gradient sidebar should work on mobile too */
    [data-sidebar="gradient"] .sidebar {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
    }
}

/* Ensure logo is hidden when sidebar is collapsed (if applicable) */
.sidebar.hidden .sidebar-logo {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar-logo {
        padding: 15px 10px;
    }
    .sidebar-logo img {
        max-height: 40px; /* Smaller logo on mobile */
    }
}

/* Enhanced Content Wrapper */
.content-wrapper {
    position: relative;
    margin-left: 250px;
    padding: 90px 20px 80px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: all 0.3s ease;
}

/* Enhanced Main Content - Simplified to prevent page breaking */
main {
    flex-grow: 1;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Dark mode content styling */
html[data-bs-theme="dark"] main {
    background: rgba(30, 30, 30, 0.9) !important;
    color: #e9ecef;
}

html[data-bs-theme="dark"] .content-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Light mode content styling */
html[data-bs-theme="light"] main {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333;
}

html[data-bs-theme="light"] .content-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Handle toggled sidebar */
.content-wrapper.full-width {
    margin-left: 0;
}
.content-wrapper.full-width  {
    left: 0; /* Adjust if sidebar hidden */
}

/* Media query for mobile (hide overlap when sidebar toggles) */
@media (max-width: 991px) {
    .content-wrapper {
        margin-left: 0;
        padding-top: 70px;
        padding-bottom: 70px; /* Adjust for footer */
    }
    .footer {
        position: fixed; /* Optional: Fix on mobile for better UX */
        left: 0;
        width: 100%;
    }
}

/* RTL support (flip left/right) */
html[dir="rtl"] .content-wrapper {
    margin-left: auto;
    margin-right: 250px;
}
html[dir="rtl"] .footer {
    left: auto;
    right: 0;
}

.topbar {
    background-color: #f8f9fa; /* Light default */
    color: #212529;
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.sidebar {
    background-color: #343a40; /* Dark default */
    color: #fff;
    width: 250px; /* Default lg size */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    /* z-index: REMOVED FOR MODAL COMPATIBILITY */
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    opacity: 0.1; /* Example for image overlay */
}

/* Enhanced Topbar Styling */
.topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    /* z-index: REMOVED FOR MODAL COMPATIBILITY */
    transition: all 0.3s;
    /* backdrop-filter: blur(10px); - REMOVED: Can cause page breaking */
}

.topbar.full-width {
    left: 0;
}

.topbar-title {
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fix subtitle visibility in dark topbar */
.topbar .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Light topbar text styling */
html[data-topbar="light"] .topbar .text-muted {
    color: rgba(0, 0, 0, 0.6) !important;
}

html[data-topbar="light"] .topbar-title {
    background: linear-gradient(45deg, #333, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced User Dropdown Button */
.user-dropdown-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transition: all 0.3s ease;
    /* backdrop-filter: blur(10px); - REMOVED: Can cause page breaking */
}

.user-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Fix text visibility in user dropdown */
.user-dropdown-btn .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.user-dropdown-btn .user-name-text {
    color: #fff !important;
}

/* Light topbar user dropdown styling */
html[data-topbar="light"] .user-dropdown-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #333 !important;
}

html[data-topbar="light"] .user-dropdown-btn .text-muted {
    color: rgba(0, 0, 0, 0.6) !important;
}

html[data-topbar="light"] .user-dropdown-btn .user-name-text {
    color: #333 !important;
}

/* Avatar Styling */
.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-title {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Enhanced Dropdown Menu */
.dropdown-menu {
    border: none !important;
    border-radius: 12px !important;
    padding: 0 !important;
    min-width: 280px;
    margin-top: 8px !important;
}

.dropdown-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid #e9ecef !important;
}

.dropdown-item {
    padding: 12px 20px !important;
    transition: all 0.2s ease;
    border-radius: 0 !important;
}

.dropdown-item:hover {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef) !important;
    transform: translateX(5px);
}

.dropdown-item.text-danger:hover {
    background: linear-gradient(45deg, #fee, #fdd) !important;
    color: #dc3545 !important;
}

/* Enhanced Hamburger Menu */
.topnav-hamburger {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.topnav-hamburger:hover {
    background: rgba(109, 107, 107, 0.2) !important;
    /* transform: rotate(90deg); */
}



html[data-bs-theme="dark"] main {
    background-color: #2e2d2d !important;
}

/* Handle toggled sidebar */
.content-wrapper.full-width {
    margin-left: 0;
}
.content-wrapper.full-width  {
    left: 0; /* Adjust if sidebar hidden */
}

/* Media query for mobile (hide overlap when sidebar toggles) */
@media (max-width: 991px) {
    .content-wrapper {
        margin-left: 0;
        padding-top: 70px;
        padding-bottom: 70px; /* Adjust for footer */
    }
    .footer {
        position: fixed; /* Optional: Fix on mobile for better UX */
        left: 0;
        width: 100%;
    }
}

/* RTL support (flip left/right) */
html[dir="rtl"] .content-wrapper {
    margin-left: auto;
    margin-right: 250px;
}
html[dir="rtl"] .footer {
    left: auto;
    right: 0;
}




.topbar {
    background-color: #f8f9fa; /* Light default */
    color: #212529;
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

.sidebar {
    background-color: #343a40; /* Dark default */
    color: #fff;
    width: 250px; /* Default lg size */
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    /* z-index: REMOVED FOR MODAL COMPATIBILITY */
    overflow-y: auto;
    transition: all 0.3s;
}

.sidebar-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    opacity: 0.1; /* Example for image overlay */
}

/* Topbar variations based on data-topbar */
html[data-topbar="light"] .topbar {
    background-color: #fff;
    color: #000;
    border-bottom: 1px solid #ddd;
}

html[data-topbar="dark"] .topbar {
    background-color: #333;
    color: #fff;
    border-bottom: 1px solid #444;
}

html[data-topbar="dark"] #userDropdown {
    color: #fff;
}

/* Desktop topbar and sidebar toggle behavior */
@media (min-width: 992px) {
    .topbar {
        position: fixed;
        top: 0;
        left: 250px;
        right: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .topbar.full-width {
        left: 0 !important;
    }
    
    .sidebar.hidden {
        left: -250px;
    }
    
    .content-wrapper.full-width {
        margin-left: 0 !important;
    }
    
    .footer.full-width {
        margin-left: 0 !important;
    }
}


/* Sidebar variations based on data-sidebar */
html[data-sidebar="dark"] .sidebar {
    background-color: #333;
    color: #fff;
}

html[data-sidebar="light"] .sidebar {
    background-color: #fff;
    color: #000;
    border-right: 1px solid #ddd;
}

/* Sidebar size variations (extend as needed) */
html[data-sidebar-size="lg"] .sidebar {
    width: 250px;
}

html[data-sidebar-size="sm"] .sidebar {
    width: 200px;
}

/* Sidebar image (if not "none", assume a URL is set via settings) */
html[data-sidebar-image="none"] .sidebar-background {
    background-image: none;
}

/* Example: html[data-sidebar-image="pattern"] .sidebar-background { background-image: url('path/to/pattern.jpg'); } */

/* RTL adjustments (Bootstrap RTL handles most, but custom overrides here) */
html[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid #ddd; /* Flip borders */
}

html[dir="rtl"] .content-wrapper {
    margin-left: auto;
    margin-right: 250px; /* Adjust for sidebar on right */
}

/* Dark mode custom overrides (since data-bs-theme handles Bootstrap, add for custom elements) */
html[data-bs-theme="dark"] {
    --body-bg: #1a1a1a;
    --body-color: #ddd;
}

html[data-bs-theme="dark"] .content-wrapper {
    background-color: var(--body-bg);
    color: var(--body-color);
}

/* Hamburger menu and toggles (enhance for modes) */
.sidebar.active {
    left: 0; /* For LTR */
}

html[dir="rtl"] .sidebar.active {
    right: 0;
}


  body {
            font-family: 'Poppins', sans-serif;
            background-color: #f5f7fb;
            margin: 0;
        }
        .sidebar {
            width: 250px;
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            /* z-index: REMOVED FOR MODAL COMPATIBILITY */
            background: #343a40;
            color: #fff;
            overflow-y: auto;
            transition: all 0.3s;
        }
        .sidebar.hidden {
            left: -250px;
        }
        .sidebar .nav-link {
            color: #adb5bd;
            padding: 10px 20px;
            font-size: 0.95rem;
            border-radius: 5px;
            margin: 5px 10px;
            transition: all 0.3s;
        }
        .sidebar .nav-link:hover, .sidebar .nav-link.active {
            color: #fff;
            background: #495057;
        }
        .sidebar .nav-link i {
            margin-right: 10px;
        }
        .sidebar .menu-title {
            padding: 20px 20px 10px;
            font-size: 0.85rem;
            text-transform: uppercase;
            color: #6c757d;
        }
        .sidebar .menu-dropdown {
            padding-left: 20px;
        }
        .sidebar .nav-sm .nav-link {
            padding: 8px 20px;
            font-size: 0.9rem;
        }
        .topbar {
            background: #fff;
            padding: 15px 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: fixed;
            top: 0;
            left: 250px;
            right: 0;
            z-index: 99;
            transition: all 0.3s;
        }
        .topbar.full-width {
            left: 0;
        }
        .content-wrapper {
            margin-left: 250px;
            padding: 80px 10px 10px;
            min-height: calc(100vh - 86px);
            transition: all 0.3s;
        }
        .content-wrapper.full-width {
            margin-left: 0;
        }
        .sidebar-background {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(180deg, #343a40, #495057);
            opacity: 0.1;
            z-index: -1;
        }
        .hamburger-icon {
            display: inline-block;
            width: 1.5em;
            height: 1.5em;
            vertical-align: middle;
            content: "";
            background: no-repeat center center;
            background-size: 100% 100%;
        }
        .hamburger-icon span {
            display: block;
            width: 25px;
            height: 3px;
            margin: 5px auto;
            background: #000;
            transition: all 0.3s ease-in-out;
        }
        .hamburger-icon.open span:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }
        .hamburger-icon.open span:nth-child(2) {
            opacity: 0;
        }
        .hamburger-icon.open span:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }
        @media (max-width: 991px) {
            .sidebar {
                width: 100%;
                height: auto;
                position: fixed;
                top: 0;
                left: -100%;
                /* z-index: REMOVED FOR MODAL COMPATIBILITY */
                transition: all 0.3s;
            }
            .sidebar.active {
                left: 0;
            }
            .topbar {
                left: 0;
                right: 0;
            }
            .content-wrapper {
                margin-left: 0;
                padding-top: 70px;
            }
        }













        /* Dark mode overrides */
.dark-mode {
    background-color: #1e1e2d;
    color: #f1f1f1;
}

/* Sidebar themes */
.sidebar-dark {
    background-color: #1f1f2e;
}
.sidebar-light {
    background-color: #ffffff;
}

/* Topbar themes */
.topbar-light {
    background-color: #f8f9fa;
}
.topbar-dark {
    background-color: #1f1f2e;
}




.footer {
        padding: 1em;
        /*border-top: 1px solid #dee2e6;*/
        padding: 15px 0; /* Vertical padding for spacing */
        font-size: 0.875rem; /* Slightly smaller font for footer text */
        position: fixed; /* Optional: Fix to bottom if desired; remove if not needed */
        bottom: 0;
        
        width: 100%;
        /* z-index: REMOVED FOR MODAL COMPATIBILITY */
    
        margin-left: 250px;
        left: 0; /* Start after sidebar */
        width: calc(100% - 250px); /* Prevent overflow */

        transition: all 0.3s;
    }


   html[data-bs-theme="light"] .footer {
    background-color: #f5f7fb; /* Light gray background for a clean look */
    color: #6c757d; /* Muted text color */
}

html[data-bs-theme="dark"] .footer {
    background-color: #333 !important;
    color: var(--body-color) !important;

}


    
    
    .footer.full-width {
        margin-left: 0;
        width: 100%;
    }



    .footer .text-sm-end {
        font-style: italic; /* Optional: Italicize user/company info for distinction */
    }

    @media (max-width: 575.98px) {
        .footer .row {
            text-align: center; /* Center text on small screens */
        }
    }



    /* Mobile responsive improvements - Enhanced */
@media (max-width: 991.98px) {
    /* Sidebar - off-canvas behavior on mobile */
    .sidebar {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 1050;
        transition: left 0.28s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* Topbar - always full width on mobile */
    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }
    
    /* Content adjusts for mobile layout */
    .content-wrapper {
        margin-left: 0;
        padding-top: 70px;
        padding-bottom: 90px;
    }
    
    /* Footer full width on mobile */
    .footer {
        margin-left: 0;
        width: 100%;
    }
    
    /* Backdrop for mobile sidebar */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1045;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
    
    /* Hamburger button z-index */
    #topnav-hamburger-icon,
    .topnav-hamburger {
        z-index: 1110;
    }
}

/* Desktop specific rules */
@media (min-width: 992px) {
    /* Desktop topbar and sidebar toggle behavior */
    .topbar {
        position: fixed;
        top: 0;
        left: 250px;
        right: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .topbar.full-width {
        left: 0;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100vh;
        z-index: 1040;
        transition: left 0.3s ease;
    }
    
    .sidebar.hidden {
        left: -250px;
    }
    
    .content-wrapper {
        margin-left: 250px;
        transition: margin-left 0.3s ease;
    }
    
    .content-wrapper.full-width {
        margin-left: 0;
    }
    
    .footer {
        margin-left: 250px;
        width: calc(100% - 250px);
        transition: margin-left 0.3s ease, width 0.3s ease;
    }
    
    .footer.full-width {
        margin-left: 0;
        width: 100%;
    }
}

/* Minimal Modal Z-Index Fix - Only what's needed for modal to appear above everything */
/* .modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
} */

/* #changePasswordModal {
    z-index: 1070 !important;
}

#changePasswordModal .modal-dialog {
    z-index: 1071 !important;
}

#changePasswordModal .modal-content {
    z-index: 1072 !important;
}

/* Task Modal Z-Index Fix */
#taskModal, #viewTaskModal {
    z-index: 1070 !important;
}

#taskModal .modal-dialog, #viewTaskModal .modal-dialog {
    z-index: 1071 !important;
}

#taskModal .modal-content, #viewTaskModal .modal-content {
    z-index: 1072 !important;
} */

/* Enhanced sidebar backdrop and body scroll control */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when mobile sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Enhanced hamburger animation */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 2px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-icon.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-icon.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ---- HAMBURGER VISIBILITY FIX ---------------------------------- */
/* Some pages were showing a blank/white square because currentColor was white on light bg */
/*#topnav-hamburger-icon.topnav-hamburger,
.topnav-hamburger {

    background: rgba(0,0,0,0.06) !important;
    color: #1f2937 !important; 
}*/

/* When placed on gradient/dark headers keep white lines */
.header-gradient #topnav-hamburger-icon.topnav-hamburger,
.header-gradient .topnav-hamburger {
    background: rgba(255,255,255,0.15) !important;
    color:#ffffff !important;
}

/* Always force line color to follow button color and add subtle outline for visibility */
#topnav-hamburger-icon .hamburger-icon span,
.topnav-hamburger .hamburger-icon span {
    background: currentColor !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    border-radius: 2px;
}

/* Slightly thicker lines for accessibility */
#topnav-hamburger-icon .hamburger-icon span,
.topnav-hamburger .hamburger-icon span { height: 3px; }

/* Transition smoothing */
#topnav-hamburger-icon .hamburger-icon span,
.topnav-hamburger .hamburger-icon span { transition: transform .3s ease, opacity .25s ease; }

/* ---------------------------------------------------------------- */



