/* -------------------------------------
   Header / Navbar Styling
-------------------------------------- */
#mainNavbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    padding: 18px 0;
}
#mainNavbar.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
    background: rgba(255, 255, 255, 0.98);
}
.nav-link {
    font-weight: 600;
    color: #333 !important;
    padding: 10px 18px !important;
    transition: color 0.2s;
    font-size: 0.95rem;
}
.nav-link:hover, .nav-link.nav-active {
    color: #cf6b48 !important;
}

/* -------------------------------------
   Dropdown & Mega Menu Styling
-------------------------------------- */
.dropdown-menu {
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08) !important;
    border-radius: 16px !important;
    background: #ffffff;
    padding: 1rem 0;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    display: block;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
    transform: translateY(0);
}

.mega-menu.position-static, .has-megamenu.position-static {
    position: static !important;
}
.mega-menu .dropdown-menu, .has-megamenu .dropdown-menu {
    width: max-content;
    max-width: 90vw;
    left: 50% !important;
    transform: translate(-50%, 10px) !important;
    padding: 1.5rem;
}
.mega-menu:hover .dropdown-menu, .has-megamenu:hover .dropdown-menu {
    transform: translate(-50%, 0) !important;
}

/* Specific widths for perfection */
.mega-menu .dropdown-menu {
    width: 950px;
}
.has-megamenu .dropdown-menu {
    width: 650px;
}

/* Standard dropdowns (Partners, Resources, Company) */
li.dropdown:not(.mega-menu):not(.has-megamenu) .dropdown-menu {
    min-width: 220px;
}

.dropdown-item {
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #4b5563;
    transition: all 0.2s;
    border-radius: 8px;
    margin: 0 8px 4px 8px;
    width: auto;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(207, 107, 72, 0.05);
    color: #cf6b48;
    transform: translateX(3px);
}

.mega-menu-col {
    position: relative;
}
.mega-menu-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0,0,0,0.05);
}

.mega-menu-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: #333;
}
.mega-menu-link:hover {
    background: #fcfaf6; 
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(207, 107, 72, 0.05);
}
.mega-menu-link:hover .mega-menu-icon {
    background: #cf6b48;
    color: #ffffff !important;
}
.mega-menu-link:hover .mega-menu-title {
    color: #cf6b48 !important;
}
.mega-menu-icon {
    font-size: 18px;
    color: #cf6b48;
    margin-right: 12px;
    line-height: 1;
    background: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(207, 107, 72, 0.08);
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.mega-menu-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: #111;
    transition: color 0.25s ease;
}
.mega-menu-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.3;
}

/* -------------------------------------
   Mobile / Hamburger Styling
-------------------------------------- */
.navbar-toggler {
    z-index: 1060;
}
.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    cursor: pointer;
}
.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #111;
    border-radius: 2px;
    transition: 0.25s ease-in-out;
}
.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: #050505;
    z-index: 1050;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 20px 0 50px rgba(0,0,0,0.5);
}
.mobile-sidebar.show {
    left: 0;
}
.mobile-sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    line-height: 1;
}
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}
.mobile-sidebar-content .nav-link {
    color: white !important;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mobile-sidebar-content .dropdown-menu {
    background: rgba(255,255,255,0.02) !important;
    border: none;
    padding: 10px 0 10px 20px;
    margin: 0;
    display: none;
    position: static;
    visibility: visible;
    opacity: 1;
    box-shadow: none !important;
    transform: none !important;
}
.mobile-sidebar-content .dropdown-menu.show {
    display: block;
}
.mobile-sidebar-content .dropdown-item {
    color: rgba(255,255,255,0.7);
    padding: 10px 0;
    font-size: 0.95rem;
}
.mobile-sidebar-content .dropdown-item:hover {
    color: #cf6b48;
    background: transparent;
    transform: translateX(5px);
}

/* Hide desktop mega menus on mobile */
@media (max-width: 991.98px) {
    #desktopNav {
        display: none !important;
    }
}
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* Global reset for site-header so it doesn't break flow */
body {
    padding-top: 76px; /* Offset for fixed navbar */
}
