/* ===================================================== */
/* --- BARRA LATERAL KOON (ESTILOS PROTEGIDOS) --- */
/* ===================================================== */

:root {
    --sidebar-width: 280px;
    --koon-teal: #279a94;
    --koon-blue-dark: #0c516e;
}

/* Solo afecta al Layout si el header existe */
@media (min-width: 769px) {
    body {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    .site-header {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-width);
        height: 100dvh;
        z-index: 9999;
        /* Por encima de todo */
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, #0c516e 0%, #082f40 100%);
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        font-family: 'Inter', sans-serif;
    }

    .site-header .header-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 40px 0 20px 0;
    }
}

/* Evitar que el reset afecte otros bloques */
.site-header * {
    box-sizing: border-box;
}

/* LOGO */
.site-header .logo {
    display: block;
    text-align: center;
    padding-bottom: 30px;
}

.site-header .logo img {
    height: 80px;
    transition: transform 0.5s ease;
}

/* NAVEGACIÓN (Solo dentro de site-header) */
.site-header .main-nav {
    flex-grow: 1;
}

.site-header .main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-header .main-nav a {
    color: #fff !important;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.site-header .bullet {
    width: 6px;
    height: 6px;
    background: var(--koon-teal);
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
}

.site-header .main-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* DROPDOWN (Acordeón que empuja contenido) */
.site-header .dropdown-menu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

.site-header .dropdown:hover>.dropdown-menu {
    display: block;
}

.site-header .dropdown-menu li a {
    padding: 10px 25px 10px 50px !important;
    font-size: 13px;
    color: white !important;
}

.site-header .dropdown-submenu-list {
    display: none;
}

.site-header .dropdown-submenu-list li a::before {
    content: "";
    /* Crea el elemento */
    width: 10px;
    /* Largo de la rayita */
    height: 1px;
    /* Grosor de la rayita */
    background-color: var(--koon-teal, #279a94);
    /* Color turquesa de Koon */
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
}

/* Efecto al pasar el mouse por la subviñeta */
.site-header .dropdown-submenu-list li a:hover::before {
    width: 15px;
    /* Se alarga un poco al hacer hover */
    background-color: #fff;
    /* Cambia a blanco */
}

/* Ajuste de indentación para que se vea escalonado */
.site-header .dropdown-submenu-list li a {
    padding: 8px 25px 8px 65px !important;
    /* Más espacio a la izquierda */
    font-size: 12px !important;
    opacity: 0.8;
}

.site-header .dropdown-submenu:hover .dropdown-submenu-list {
    display: block;
}

/* BOTONES LATERALES (Renombrados para no chocar) */
.site-header .header-actions {
    margin-top: auto;
    /* Empuja todo al fondo */
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    /* Importante para el posicionamiento del dropdown */
}

.site-header .sidebar-cta {
    display: block;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.site-header .sidebar-cta:not(.secondary) {
    background: var(--koon-teal, #279a94);
    color: #ffffff !important;
}

.site-header .sidebar-cta.secondary {
    background: #ffffff;
    color: #0c516e !important;
}

.site-header .sidebar-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.site-header .sidebar-dropdown-up {
    position: absolute;
    bottom: calc(100% + 10px);
    /* Aparece 10px arriba del botón */
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);

    /* Estado inicial oculto con animación */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10001;
}

.site-header .sidebar-dropdown-up::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.site-header .sidebar-dropdown-action:hover .sidebar-dropdown-up {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header .sidebar-dropdown-up li a {
    display: block;
    padding: 12px 20px;
    color: #0c516e !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    text-align: left;
}

.site-header .sidebar-dropdown-up li a:hover {
    background: #f4f7f8;
    color: var(--koon-teal, #279a94) !important;
}

.site-header .header-footer-tag {
    font-size: 9px;
    text-align: center;
    opacity: 0.5;
    letter-spacing: 0.2em;
    margin-top: 5px;
    font-weight: 800;
    color: #fff;
}