/* =========================================================
   BOTÓN FLOTANTE CON FORMA DE PESTAÑA (estilo imágenes)
   ========================================================= */
.menu-btnlateral {
    position: fixed;
    top: 30%;
    right: 0;
    z-index: 1050;

    width: 150px;
    height: 110px;

    background: #f93b28;
    color: #fff;
    border: none;
    cursor: pointer;

    /* Forma de pestaña: borde izquierdo redondeado */
    border-radius: 60px 0 0 60px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 0;
    font-family: "Open Sans", sans-serif;
    box-shadow: -4px 0 14px rgba(201, 37, 43, 0.35);

    transition: right 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease;
}

.menu-btnlateral:hover {
    background: #f93b28;
}

/* Cuando está activo se corre a la izquierda junto al panel */
.menu-btnlateral.active {
    right: 300px;   /* ancho del panel */
}

/* =========================================================
   ÍCONO HAMBURGUESA (3 líneas)
   ========================================================= */
.menu-btnlateral .icon-hamburger {
    position: relative;
    width: 26px;
    height: 18px;
    display: block;
}

.menu-btnlateral .icon-hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.menu-btnlateral .icon-hamburger span:nth-child(1) { top: 0; }
.menu-btnlateral .icon-hamburger span:nth-child(2) { top: 7.5px; }
.menu-btnlateral .icon-hamburger span:nth-child(3) { top: 15px; }

/* Transformación a X cuando el botón está activo */
.menu-btnlateral.active .icon-hamburger span:nth-child(1) {
    top: 7.5px;
    transform: rotate(45deg);
}
.menu-btnlateral.active .icon-hamburger span:nth-child(2) {
    opacity: 0;
}
.menu-btnlateral.active .icon-hamburger span:nth-child(3) {
    top: 7.5px;
    transform: rotate(-45deg);
}

/* =========================================================
   TEXTO "MENU"
   ========================================================= */
.menu-btnlateral .menu-txt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    text-transform: uppercase;
    font-family: "Open Sans", sans-serif;
}

/* =========================================================
   PANEL LATERAL DERECHO
   ========================================================= */
.side-bar {
    position: fixed !important;
    top: 0 !important;
    right: -300px !important;
    left: auto !important;
    width: 300px !important;
    max-width: 90% !important;
    height: 100vh !important;
    background: #f93b28;
    overflow-y: auto;
    overflow-x: hidden;
    transition: right 0.45s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: "Open Sans", sans-serif;
    z-index: 1100;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
    display: block !important;
    padding: 0 !important;
}

.side-bar.active {
    right: 0 !important;
}

/* Scroll fino */
.side-bar::-webkit-scrollbar { width: 6px; }
.side-bar::-webkit-scrollbar-track { background: transparent; }
.side-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

/* =========================================================
   BOTÓN CERRAR (X interna del panel)
   ========================================================= */
.side-bar .close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.25s ease, transform 0.25s ease;
    z-index: 10;
    background: transparent;
    border: none;
    user-select: none;
}
.side-bar .close-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

/* =========================================================
   MENÚ INTERNO
   ========================================================= */
.side-bar .menu2 {
    width: 100%;
    padding: 60px 0 40px;
}

.side-bar .menu2 .item {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.side-bar .menu2 .item > a{
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    padding: 13px 45px 13px 20px;
    line-height: 1.35;
    transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
    cursor: pointer;
}

.side-bar .menu2 .item > p > a {
    color: #fff;
    font-size: 14.5px;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding: 13px 45px 13px 12px;
    line-height: 1.35;
    transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
    cursor: pointer;
}

.side-bar .menu2 .item > a:hover,
.side-bar .menu2 .item > p > a:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #f93b28;
    padding-left: 26px;
}

.side-bar .menu2 .item > a .dropdown {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    transition: transform 0.3s ease, color 0.3s ease;
    margin: 0;
}
.side-bar .menu2 .item > a:hover .dropdown {
    color: #f93b28;
}
.dropdown.rotate {
    transform: translateY(-50%) rotate(90deg) !important;
}

/* =========================================================
   SUBMENÚ
   ========================================================= */
.side-bar .menu2 .item .sub-menu {
    background: rgba(0, 0, 0, 0.18);
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.side-bar .menu2 .item .sub-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.side-bar .menu2 .item .sub-menu li:last-child {
    border-bottom: none;
}
.side-bar .menu2 .item .sub-menu li a {
    font-size: 13px;
    font-weight: 400;
    padding: 10px 20px 10px 45px;
    color: rgba(255, 255, 255, 0.88);
    border-left: 3px solid transparent;
    display: block;
    text-decoration: none;
}
.side-bar .menu2 .item .sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-left: 3px solid #fff;
    padding-left: 50px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
/* =========================================================
   FIX MÓVIL — que se vean los ítems correctamente
   ========================================================= */
@media (max-width: 991.98px) {

    /* El panel ocupa toda la altura disponible */
    .side-bar {
        width: 290px !important;
        height: 100vh !important;
        padding-top: 0 !important;
    }

    /* El menú arranca más arriba para que se vea todo */
    .side-bar .menu2 {
        padding: 55px 0 30px !important;
        max-height: 100vh;
        overflow-y: auto;
    }

    /* Items más chicos para que entren más */
    .side-bar .menu2 .item > a,
    .side-bar .menu2 .item > p > a {
        font-size: 12px;
        padding: 12px 40px 12px 18px;
    }

    .side-bar .menu2 .item .sub-menu li a {
        font-size: 12.5px;
        padding: 9px 18px 9px 40px;
    }
}

@media (max-width: 400px) {

    /* El panel ocupa CASI toda la pantalla en celular */
    .side-bar {
        top: 5%;
        right: -400px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
    }

    .side-bar .menu2 {
        padding: 50px 0 25px !important;
    }
    .side-bar .menu2 .item > a {
        font-size: 14px;
        padding: 11px 38px 9px 16px;
    }

  
    .side-bar .menu2 .item > p > a {
        font-weight: bold;
        font-size: 14px;
        padding: 8px 4px 0px 9px;
    }

    /* El botón flotante un poco más arriba y más chico */
    .menu-btnlateral {
        top: 38%;
        width: 140px;
        height: 88px;
    }
    .menu-btnlateral .icon-hamburger {
        width: 22px;
        height: 16px;
    }
    .menu-btnlateral .icon-hamburger span:nth-child(2) { top: 6.5px; }
    .menu-btnlateral .icon-hamburger span:nth-child(3) { top: 13px; }
    .menu-btnlateral.active .icon-hamburger span:nth-child(1) { top: 6.5px; }
    .menu-btnlateral.active .icon-hamburger span:nth-child(3) { top: 6.5px; }
}