/* ===== NAVEGACIÓN ===== */
/* Archivo: css/navigation.css */
/* Contiene: Navbar, menú de navegación, enlaces */

/* Navbar */
.navbar {
    background-color: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Línea de acento superior animada */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color), 
        var(--primary-color), 
        transparent
    );
    opacity: 0.8;
}

/* Light theme navbar */
body.light-theme .navbar {
    background-color: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    height: 70px;
}

/* Agrupa el selector de idioma junto al bloque de perfil/login, como un
   único hijo de .nav-container — si van sueltos rompen el grid de 3
   columnas de arriba (el 4º hijo se cae a una fila nueva). */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    justify-self: start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-brand:hover {
    color: var(--primary-color);
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(var(--primary-rgb, 99, 102, 241), 0.4));
}

.nav-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

/* Scroll wrap — injected by JS around nav-menu */
.nav-scroll-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    overflow: visible;
}

/* Scroll arrow buttons — shown by JS when items overflow */
.nav-scroll-btn {
    display: none;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-scroll-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.22);
}
body.light-theme .nav-scroll-btn {
    border-color: rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.5);
}
body.light-theme .nav-scroll-btn:hover {
    background: rgba(0,0,0,0.09);
    color: #111;
    border-color: rgba(0,0,0,0.18);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-item {
    position: relative;
}

/* Separador entre items */
.nav-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.25rem;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.1), transparent);
}

body.light-theme .nav-item:not(:last-child)::after {
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.1), transparent);
}

.settings-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.03);
}

.login-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    justify-self: end;
}

.login-link i {
    color: var(--primary-color);
}

.login-link:hover, .settings-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-link i {
    transition: transform 0.4s ease;
}

.settings-link:hover i {
    transform: rotate(90deg);
}

body.light-theme .login-link:hover,
body.light-theme .settings-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.login-link.active, .settings-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 99, 102, 241), 0.3);
}

.login-link.active i {
    color: white;
}

.login-link.active:hover, .settings-link.active:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-1px);
}

/* Perfil de Usuario en Nav */
.user-profile-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

.user-profile-nav .settings-link {
    background-color: rgba(255, 255, 255, 0.03);
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.03);
}

.profile-link i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.profile-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    text-decoration: none;
    color: #ff4b2b;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: rgba(255, 75, 43, 0.1);
    border: 1px solid rgba(255, 75, 43, 0.2);
}

.logout-link:hover {
    background-color: #ff4b2b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 75, 43, 0.3);
}

.discord-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    text-decoration: none;
    color: #5865f2;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    font-size: 1.1rem;
}

.discord-link:hover {
    background-color: #5865f2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

body.light-theme .profile-link {
    background-color: rgba(0, 0, 0, 0.03);
}

body.light-theme .profile-link:hover {
    background-color: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

.nav-item.active .nav-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb, 99, 102, 241), 0.3);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

/* Efecto de línea inferior en hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: calc(100% - 2rem);
}

.nav-item.active .nav-link::after {
    display: none;
}

.nav-link i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-link:hover i {
    transform: scale(1.1);
    color: var(--primary-color);
}

body.light-theme .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-item.active .nav-link:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-1px);
}

.nav-item.active .nav-link i {
    color: white;
}

/* Dropdown Menu Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-icon {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: fixed;
    top: -9999px;
    left: -9999px;
    transform: translateY(-10px);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

body.light-theme .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-item i {
    color: var(--primary-color);
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding-left: 1.2rem;
}

body.light-theme .dropdown-item:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 0.5rem 0;
}

body.light-theme .dropdown-divider {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.coming-soon {
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 600;
}

/* Nested submenu inside dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-item {
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 0.65rem;
    opacity: 0.55;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dropdown-submenu:hover > .dropdown-item .submenu-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.dropdown-submenu-menu {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 4px;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1002;
}

.dropdown-submenu:hover .dropdown-submenu-menu {
    opacity: 1;
    visibility: visible;
}

body.light-theme .dropdown-submenu-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ── Mega-menu Comparador ── */
.dropdown-menu.mega-dd {
    min-width: 610px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    border-top: 2px solid #ff7b3a;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,123,58,0.1);
}
body.light-theme .dropdown-menu.mega-dd {
    box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(255,123,58,0.15);
}
.mega-inner {
    display: flex;
    gap: 0;
    padding: 1.5rem;
}
.mega-col { flex: 1; min-width: 0; }
.mega-col-sm { flex: 0 0 158px; display: flex; flex-direction: column; }
.mega-heading {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.22);
    margin: 0 0 0.75rem 0.25rem;
}
body.light-theme .mega-heading { color: rgba(0,0,0,0.28); }
.mega-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent);
    margin: 0 1.1rem;
    flex-shrink: 0;
    align-self: stretch;
}
body.light-theme .mega-divider { background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.08) 80%, transparent); }
.mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
}
.mega-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.3rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    border: 1px solid transparent;
    transition: background 0.17s ease, color 0.17s ease, border-color 0.17s ease, transform 0.17s ease;
}
.mega-card:hover:not(.disabled) {
    background: rgba(255,123,58,0.07);
    color: #fff;
    border-color: rgba(255,123,58,0.22);
    transform: translateY(-2px);
}
body.light-theme .mega-card { color: rgba(0,0,0,0.45); }
body.light-theme .mega-card:hover:not(.disabled) { background: rgba(255,123,58,0.07); color: #111; border-color: rgba(255,123,58,0.22); }
.mega-card.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }
.mega-card-ico {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255,123,58,0.22), rgba(255,123,58,0.07));
    color: #ff7b3a;
    transition: transform 0.17s ease, box-shadow 0.17s ease;
}
.mega-card:hover:not(.disabled) .mega-card-ico {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255,123,58,0.28);
}
.mega-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.52rem 0.6rem;
    border-radius: 9px;
    text-decoration: none;
    color: rgba(255,255,255,0.45);
    font-size: 0.82rem;
    border: 1px solid transparent;
    transition: background 0.17s ease, color 0.17s ease, border-color 0.17s ease;
}
.mega-list-item:hover:not(.disabled) { background: rgba(255,123,58,0.07); color: #fff; border-color: rgba(255,123,58,0.18); }
body.light-theme .mega-list-item { color: rgba(0,0,0,0.45); }
body.light-theme .mega-list-item:hover:not(.disabled) { background: rgba(255,123,58,0.07); color: #111; border-color: rgba(255,123,58,0.18); }
.mega-list-item.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.mega-list-item i { color: #ff7b3a; width: 16px; text-align: center; font-size: 0.83rem; flex-shrink: 0; }
.mega-badge {
    margin-left: auto;
    font-size: 0.6rem; font-weight: 700;
    background: rgba(255,123,58,0.13); color: #ff7b3a;
    padding: 0.12rem 0.36rem; border-radius: 4px; white-space: nowrap;
    letter-spacing: 0.03em;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* ===== HAMBURGER BUTTON ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    order: 99;
    flex-shrink: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .nav-hamburger {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-hamburger:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== RESPONSIVE ≤ 1100px — compact scrollable nav ===== */
@media (max-width: 1100px) {
    .nav-container { padding: 0 0.75rem; }
    .profile-link { padding: 0.5rem 0.6rem; }
    .profile-link span { display: none; }
    .logout-link { width: 32px; height: 32px; }
    .login-link { padding: 0.5rem 0.65rem; }
    .login-link span { display: none; }
    .settings-link { padding: 0.5rem 0.65rem; }
    .settings-link span { display: none; }

    .nav-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
        gap: 0.3rem;
    }
    .nav-link i:not(.dropdown-icon) { display: none; }
    .nav-link span { display: inline; }
    .nav-item:not(:last-child)::after { display: none; }
    .dropdown-icon { margin-left: 0.15rem; }
    .nav-menu {
        gap: 0.15rem;
        padding: 0.3rem 0.25rem;
    }

    /* Mega-menu at narrower widths */
    .dropdown-menu.mega-dd { min-width: unset !important; border-radius: 10px !important; border-top-width: 2px !important; }
    .mega-inner { flex-direction: column; padding: 0.5rem 0.2rem; gap: 0.5rem; }
    .mega-divider { height: 1px; width: 100%; background: rgba(255,255,255,0.07) !important; margin: 0.1rem 0; align-self: auto; }
    .mega-col-sm { flex: 1; }
    .mega-grid { grid-template-columns: repeat(2, 1fr); gap: 0.25rem; }
    .mega-card { flex-direction: row; text-align: left; align-items: center; padding: 0.48rem 0.55rem; gap: 0.55rem; transform: none !important; }
    .mega-card-ico { width: 28px; height: 28px; border-radius: 7px; font-size: 0.75rem; box-shadow: none !important; }
}

/* ===== RESPONSIVE ≤ 620px — hamburger / full mobile panel ===== */
@media (max-width: 620px) {
    .nav-container { padding: 0 0.75rem; grid-template-columns: auto 1fr auto; }
    .nav-hamburger { display: flex; grid-column: 3; justify-self: end; }
    .user-profile-nav, .login-link { display: none; }
    /* .nav-actions entero fuera del grid: si no, compite por la columna 3
       con el hamburger y rompe el layout, igual que le pasaba suelto arriba. */
    .nav-actions { display: none; }

    /* Collapse scroll-wrap to zero so nav-menu panel can escape via position:fixed */
    .nav-scroll-wrap { grid-column: 2; flex: 0 0 0; width: 0; min-width: 0; overflow: visible; gap: 0; padding: 0; }

    /* Mobile nav panel (hidden by default) */
    .nav-menu {
        display: none;
        position: fixed !important;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        overflow-y: auto !important;
        flex: none !important;
        width: auto !important;
        gap: 0.25rem;
        padding: 0.75rem;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - 70px);
        z-index: 999;
        border-radius: 0 0 16px 16px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
        border-left: none;
        border-right: none;
    }
    body.light-theme .nav-menu {
        background: rgba(252, 252, 252, 0.98);
        border-top-color: rgba(0, 0, 0, 0.06);
        border-bottom-color: rgba(0, 0, 0, 0.1);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    }
    .nav-menu.open { display: flex; }

    .nav-item { width: 100%; }
    .nav-item:not(:last-child)::after { display: none; }
    .nav-link {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        width: 100%;
        white-space: normal;
        gap: 0.6rem;
    }
    .nav-link i:not(.dropdown-icon) { display: inline !important; }
    .nav-link span { display: inline; }
    .dropdown-icon { display: inline-block; margin-left: auto; transition: transform 0.3s ease; }
    .nav-item.dropdown.open > .nav-link .dropdown-icon { transform: rotate(180deg); }

    /* Accordion dropdowns */
    .dropdown-menu {
        position: static !important;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 8px;
        margin-top: 0.25rem;
        padding: 0.25rem;
        box-shadow: none !important;
        backdrop-filter: none !important;
        min-width: unset !important;
    }
    body.light-theme .dropdown-menu {
        background: rgba(0, 0, 0, 0.04) !important;
        border-color: rgba(0, 0, 0, 0.06) !important;
    }
    .nav-item.dropdown.open > .dropdown-menu { display: block; }
    .nav-item.dropdown:hover > .dropdown-menu { display: none; }
    .nav-item.dropdown.open:hover > .dropdown-menu { display: block; }

    /* Nested accordion submenu */
    .dropdown-submenu-menu {
        position: static !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.03) !important;
        margin: 0.25rem 0 0 1.5rem;
        border-radius: 8px;
        min-width: unset !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    .dropdown-submenu.open > .dropdown-submenu-menu { display: block !important; }
    .dropdown-submenu:hover > .dropdown-submenu-menu { display: none !important; }
    .dropdown-submenu.open .submenu-arrow { transform: rotate(90deg) !important; opacity: 1; }

    .dropdown-menu.mega-dd { border-top-width: 2px !important; }
}

/* Language Selector Styles */
.language-selector {
    position: relative;
}

.language-selector .nav-link {
    cursor: pointer;
    user-select: none;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

body.light-theme .language-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    cursor: pointer;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding-left: 1.2rem;
}

body.light-theme .language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.language-option.active:hover {
    padding-left: 1rem;
}

.lang-flag {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.lang-name {
    font-weight: 500;
}
