/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fuente principal y colores corporativos */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #002028;
}

/* Contenedor principal con dos secciones: sidebar y content */
.container {
    display: flex;
    height: 100vh;
}

/* Sidebar (menú izquierdo) */
.sidebar {
    width: 30%;
    background-color: #002028;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Logo superior */
.logo img {
    width: 80%;
    max-width: 400px;
    margin-bottom: 30px;
}

/* Botones del menú */
.menu {
    width: 100%;
}
/* Botones del menú */
.menu-btn {
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 10px; /* Bordes redondeados */
    color: #fff;
    font-size: 1.7em;
    text-align: center; /* Texto centrado */
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.menu-btn:hover {
    background-color: #e03b23;
    border-color: #fff; /* Delimitado con un contorno blanco en hover */
}

/* Área de contenido (parte derecha) */
.content {
    width: 70%;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

/* Contenido dinámico */
.page-content {
    min-height: 100%;
}

/* Efecto de carga */
.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.hidden {
    display: none;
}

/* Spinner para la carga */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #e03b23;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Por defecto, en escritorio no muestras la barra superior ni el menú móvil */
.top-nav,
.mobile-menu {
    display: none;
}

/* ... tu .sidebar sigue activo para pantallas grandes ... */

/* Transiciones para .mobile-menu */
.mobile-menu {
    /* Empieza 'cerrado' */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background-color: #002028;
    flex-direction: column;
    padding: 0 20px;
}

/* Cuando la clase .open está presente, expandimos para que se vea */
.mobile-menu.open {
    max-height: 500px; /* Ajusta según la altura aproximada de tu menú */
    opacity: 1;
}

/* Botón hamburguesa circular */
.nav-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;         /* hacerlo circular */
    background-color: #002028;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    gap: 4px; /* Espacio entre las líneas */
}

/* Las 3 líneas internas */
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

@media (max-width: 768px) {
    .top-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: #002028;
        color: #fff;
        padding: 10px 20px;
        height: 60px;
    }

    /* Aplica estilos específicos a la imagen del logo en el top-nav */
    .nav-logo-img {
        height: 60px !important;
        width: auto;
        object-fit: contain;
    }

    .mobile-menu {
        display: flex; /* se hace visible, pero con max-height=0 y opacity=0 por defecto */
    }

    .sidebar {
        display: none;
    }

    .container {
        display: block;
        height: auto;
    }

    .content {
        width: 100%;
    }
}


/* En pantallas mayores, ocultas la barra superior y muestras el sidebar */
@media (min-width: 769px) {
    .top-nav,
    .mobile-menu {
        display: none;
    }
    .sidebar {
        display: flex; /* o lo que tuvieras */
    }
}
