/* Burger Menu and Navigation Styles - DubnCo */

/* ===== BURGER MENU STYLES ===== */

/* Burger Menu Container - Fixed position in top right */
.burger-menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px; /* Reduced from 15px */
    z-index: 1000;
    /* Remove all backgrounds and borders */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 4px 6px; /* Reduced from 8px 12px */
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Add background only when menu is active/hovered */
.burger-menu-container:hover,
.burger-menu-container.menu-active {
    background: none !important; /* Remove all backgrounds */
    border: none !important; /* Remove all borders */
}

/* Remove background for burger menu container except when menu is open */
.burger-menu-container {
    background: none !important;
    border: none !important;
}

.burger-menu-container.menu-active, .burger-menu-container:hover {
    border: none !important;
    background: none !important;
}

/* Mini brand logo */
.mini-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.mini-brand:hover {
    opacity: 0.8;
}

.mini-logo {
    height: 42px; /* Increased by 50% from previous 28px */
    width: auto;
    object-fit: contain;
}

/* Burger Menu Button */
.burger-menu-btn {
    background: none !important; /* Remove all backgrounds */
    border: none !important;
    width: 28px; /* Reduced from 40px */
    height: 28px; /* Reduced from 40px */
    position: relative;
    cursor: pointer;
    padding: 4px; /* Reduced from 8px */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center the burger lines */
    align-items: center; /* Center the burger lines */
    transition: transform 0.3s ease;
    border-radius: 6px; /* Add subtle border radius for better UX */
}

.burger-menu-btn:hover {
    transform: scale(1.05); /* Reduced scale effect since we increased base size */
    background: none !important; /* Remove hover background */
}

.burger-line {
    display: block;
    width: 16px; /* Reduced from 20px */
    height: 2px; /* Reduced from 3px to 2px - thinner lines */
    background: var(--menu-active);
    border-radius: 1px; /* Reduced from 2px */
    transition: all 0.3s ease;
    transform-origin: center;
    margin: 1.5px 0; /* Slightly reduced spacing */
}

/* Animated burger lines - adjusted for smaller icon */
.burger-menu-btn.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px); /* Adjusted translate values for smaller icon */
}

.burger-menu-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu-btn.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px); /* Adjusted translate values for smaller icon */
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Slide Menu - More compact */
.slide-menu {
    position: fixed;
    top: 70px; /* Adjusted for better positioning */
    right: -280px;
    width: 260px;
    max-width: 85vw; /* Reduced max-width */
    background: var(--base);
    border: 1px solid #bcb8c7;
    box-shadow: var(--menu-shadow);
    color: #fff;
    border-radius: 15px 0 0 15px; /* Restore round corners */
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slide-menu.active {
    right: 0 !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 2000 !important;
}

/* Slide Menu Header - More compact */
.slide-menu-header {
    padding: 12px 16px; /* Reduced padding further */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--base); /* Light gray background for title */
    color: var(--menu-text);
}

.slide-menu-brand {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap */
    font-size: 1.2rem; /* Slightly smaller */
    font-weight: 700;
    color: var(--menu-active);
    text-decoration: none;
    font-family: var(--font-family-primary);
}

.slide-menu-brand:hover {
    color: #ffb347;
}

.slide-menu-logo {
    height: 32px; /* Reduced from 39px */
    width: auto;
    object-fit: contain;
    background: var(--menu-accent2);
    border-radius: 6px; /* Smaller radius */
    padding: 1px; /* Reduced padding */
}

.menu-close-btn {
    background: none !important; /* Remove all backgrounds */
    border: none !important;
    color: var(--contrast); /* Dark gray close button */
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%; /* Keep round shape for click area */
    transition: all 0.3s ease;
}

.menu-close-btn:hover {
    background: none !important; /* Remove background */
    color: var(--menu-active);
    transform: scale(1.1); /* Use scale instead of background */
    border-radius: 50%; /* Maintain round shape */
}

/* Slide Menu Content */
.slide-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Slide Menu Navigation - More compact */
.slide-menu-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.slide-menu-item {
    border-bottom: 1px solid rgba(248, 249, 250, 0.8); /* Lighter border */
}

/* Slide Menu Links */
.slide-menu-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--contrast) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem; 
    transition: all 0.3s ease;
    border-radius: 6px; 
    margin: 1px 8px; 
}

.slide-menu-link:hover {
    background: var(--menu-link-hover-bg);
    color: var(--contrast) !important; 
    text-decoration: none;
    transform: translateX(5px);
}

.slide-menu-link i {
    color: var(--contrast) !important; /* Dark gray icons */
    font-size: 0.9rem; /* Smaller icons */
    width: 18px; /* Reduced width for alignment */
    text-align: center;
}

.slide-menu-link:hover i {
    color: var(--contrast) !important; /* Keep dark gray icons on hover */
}

/* Remove Bootstrap dropdown-toggle caret in slide menu */
.slide-menu-link.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* Remove visible border from burger menu button by default */
.burger-menu-btn {
    border: none !important;
}

/* Only show border when button is active (clicked/open) */
.burger-menu-btn.active {
    border: none !important; /* Remove border */
    background: none !important; /* Remove background */
    border-radius: 6px;
}

/* Remove border from burger menu container by default */
.burger-menu-container {
    border: none !important;
}

/* Only show light gray background when menu is open or hovered, no border */
.burger-menu-container.menu-active, .burger-menu-container:hover {
    border: none !important;
    background: var(--base) !important;
}

/* --- ENSURE SLIDE MENU VISIBILITY --- */
.slide-menu {
    background: #fff6e9 !important; /* Warmer, solid background */
    border: 1px solid #f5c16c;
    box-shadow: -5px 0 25px rgba(230, 126, 34, 0.18);
    z-index: 2000 !important;
    position: fixed !important;
    display: block !important;
    opacity: 1 !important;
    transition: right 0.3s ease;
}
.slide-menu.active {
    right: 0 !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 2000 !important;
}

/* === MENU VISIBILITY & STYLE FIXES === */
.burger-menu-container {
    background: none !important; /* Remove all backgrounds */
    box-shadow: none !important; /* Remove box shadow */
    border: none !important; /* Remove border */
    border-radius: 50px; /* Maintain round corners for visual consistency */
}
.burger-menu-btn {
    background: none !important; /* Ensure no background */
    border: none !important;
}
.burger-line {
    background: var(--menu-active);
}
.burger-menu-btn:hover, .burger-menu-btn.active {
    background: none !important; /* Remove all hover/active backgrounds */
}

/* Slide-out Menu */
.slide-menu {
    background: var(--menu-bg);
    border: 1px solid #bcb8c7;
}
.slide-menu-header {
    background: var(--base); /* Light gray background */
    color: var(--menu-text);
}
.slide-menu-brand {
    color: var(--menu-active);
}
.slide-menu-logo {
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
.menu-close-btn {
    color: var(--menu-active);
}
.menu-close-btn:hover {
    background: none !important; /* Remove background */
    color: var(--menu-active);
    transform: scale(1.1); /* Use scale instead of background */
    border-radius: 50%; /* Maintain round shape */
}
.slide-menu-link {
    color: var(--menu-text);
    background: transparent;
    transition: background 0.2s, color 0.2s;
    text-decoration: none !important;
    box-shadow: none !important;
}
.slide-menu-link:hover, .slide-menu-link:focus {
    background: var(--menu-accent3);
    color: var(--menu-text-inverse);
    text-decoration: none !important;
    box-shadow: none !important;
}
.slide-menu-link.active, .slide-menu-link[aria-current="page"] {
    background: var(--menu-active);
    color: var(--menu-text-inverse);
    text-decoration: none !important;
    box-shadow: none !important;
}
.slide-menu-link i {
    color: var(--menu-accent3);
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Mobile responsiveness for compact menu */
@media (max-width: 768px) {
    .slide-menu {
        width: 240px; /* Even more compact on mobile */
        max-width: 90vw;
        right: -250px;
        max-height: 380px; /* Reduced mobile height */
    }
    
    .slide-menu-header {
        padding: 10px 14px; /* Further reduced padding on mobile */
    }
    
    .slide-menu-link {
        padding: 8px 14px; /* Reduced padding on mobile */
        font-size: 0.85rem; /* Smaller text on mobile */
    }
    
    .slide-menu-link i {
        font-size: 0.85rem; /* Smaller icons on mobile */
        width: 16px; /* Reduced width */
    }
}

@media (max-width: 480px) {
    .slide-menu {
        width: 220px; /* Most compact for very small screens */
        max-width: 95vw;
        right: -230px;
        max-height: 360px; /* Even more reduced height for small screens */
    }
}