* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

.container {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: #f1f1f1;
    padding: 20px;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar.closed {
    transform: translateX(-100%);
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

iframe {
    width: calc(100% - 250px); /* Ocupa el espacio restante después del sidebar */
    min-height: 100vh;
    margin-left: 250px; /* Desplaza el iframe a la derecha del sidebar */
    transition: margin 0.3s ease-in-out, width 0.3s ease-in-out;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h2 {
    font-size: 18px;
    color: #555;
}

.logo img {
    max-width: 100%;
    height: auto;
}

nav {
    width: 100%;
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 15px;
}

.menu a {
    text-decoration: none;
    color: #ad0909;
    font-size: 16px;
    display: block;
    padding: 10px;
    transition: background 0.3s;
}

.menu a:hover {
    background-color: #ddd;
}

.submenu {
    list-style: none;
    display: none;
}

.menu li:hover .submenu {
    display: block;
    padding-left: 10px;
}

.submenu a {
    color: #333;
    font-size: 14px;
    padding: 5px 10px;
}

/* Estilos responsivos */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    iframe {
        width: 100%; /* Ocupa toda la pantalla en móviles */
        margin-left: 0; /* No hay margen en móviles */
    }

    .sidebar.open + iframe {
        width: calc(100% - 250px); /* Ajusta el ancho del iframe cuando el sidebar está abierto */
        margin-left: 250px; /* Desplaza el iframe a la derecha */
    }
}
