﻿/* === Navbar general === */

:root {
}

.navbar {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background: #fdfdfd;
    color: #fff;
    padding: 0.6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.logo {
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
}

.menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    display: none;
    cursor: pointer;
}

/* === Links principales === */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

    /* === Nivel 1 === */
    .nav-item > .nav-link {
        color: #115e9e;
        font-weight: 600;
        padding: 0.5rem 0.8rem;
        border-radius: 6px;
        transition: background 0.2s ease, color 0.2s ease;
        cursor: pointer;
        background: transparent;
        border: none;
    }

        .nav-item > .nav-link:hover,
        .nav-item > .nav-link.active {
            color: #fff;
            background: rgba(255,255,255,0.15);
        }

/* === Dropdown base === */
/*.dropdown-toggle::after {
    content: " ▾";
    font-size: 0.7rem;
}*/

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    min-width: 200px;
    z-index: 999;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

    /* Mostrar dropdown */
    .nav-item.has-children:hover > .dropdown-menu,
    .dropdown-menu.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    /* === Ítems === */
    .dropdown-item,
    .dropdown-menu .nav-link {
        display: block;
        padding: 0.45rem 1rem;
        color: #1e293b;
        background: transparent;
        border: none;
        text-align: left;
        text-decoration: none;
        font-weight: 500;
        width: 100%;
        transition: background 0.2s ease, color 0.2s ease;
    }

        .dropdown-item:hover,
        .dropdown-menu .nav-link:hover {
            background: #ebebeb;
            color: #0f172a;
        }

        .dropdown-item.active, .dropdown-item:active {
            color: var(--bs-dropdown-link-active-color);
            text-decoration: none;
            background-color: var(--color-primary);
        }
    /* === Subniveles alineados === */
    .dropdown-menu .nav-item.has-children {
        position: relative;
    }

        /* 🔹 Submenús perfectamente alineados */
        .dropdown-menu .nav-item.has-children > .dropdown-menu {
            top: 0; /* 🔸 sin desplazamiento vertical */
            left: 100%;
            margin-left: -2px; /* 🔹 ligera superposición horizontal */
            background: #fcfcfc;
            border-radius: 8px;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
            transition: opacity 0.15s ease, transform 0.15s ease;
        }

        /* Flecha lateral */
        .dropdown-menu .nav-item.has-children > .nav-link::after {
            content: " ▸";
            font-size: 0.75rem;
            color: #64748b;
            margin-left: 4px;
        }

        /* Hover estable entre niveles */
        .dropdown-menu .nav-item.has-children::after {
            content: "";
            position: absolute;
            top: 0;
            right: -10px;
            width: 10px;
            height: 100%;
            background: transparent;
        }

.k-tabstrip k-tabstrip-item k-active {
    font-weight: 600;
}

/* === Contenido principal === */
/*.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f1f5f9;
    height: calc(100vh - 56px);*/ /* Ajustar según la altura de la navbar */
/*}*/
/* === Responsive === */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navbar-links {
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        background: #1e293b;
        padding: 0.5rem 0;
    }

        .navbar-links.open {
            display: flex;
        }

    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        min-width: unset;
        opacity: 1;
        transform: none;
    }

        .dropdown-item,
        .dropdown-menu .nav-link {
            color: #f8fafc;
            padding: 0.6rem 1.5rem;
        }

            .dropdown-item:hover,
            .dropdown-menu .nav-link:hover {
                background: rgba(255,255,255,0.1);
            }

    .nav-item.has-children:hover > .dropdown-menu {
        display: none; /* solo click en móvil */
    }
}
