/* Sidebar principal */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 300px;
  background-color: #111;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  z-index: 2000;
  padding-top: 60px;
  overflow-y: auto;
  color: white;
}

hr{
  background-color: white;
  height: 1px;
  width: 85%;
}
/* Estado abierto */
.sidebar.open {
  transform: translateX(0);
}

/* Overlay */
#overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 1500;
  pointer-events: none;
}
#overlay.active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  pointer-events: auto;
}

/* Botón cerrar */
.closebtn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 36px;
  color: white;
  text-decoration: none;
}

/* Enlaces */
.sidebar a {
  display: block;
  padding: 12px 24px;
  color: #f1f1f1;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.2s;
  cursor: pointer;
}
.sidebar a:hover {
  background: #575757;
}

/* Submenús */
.has-submenu {
  border-top: 1px solid #222;
}
.submenu {
  max-height: 0;
  overflow: hidden;
  background-color: #181818;
  transition: max-height 0.3s ease;
}

/* Submenú visible */
.submenu.open {
  max-height: 300px; /* puedes ajustar si hay más elementos */
}

/* Estilo para los enlaces dentro del submenú */
.submenu a {
  padding-left: 40px;
  font-size: 15px;
}
.main{
  cursor:pointer;
}

/* Icono indicador */
.submenu-toggle {
  position: relative;
}
.submenu-toggle::after {
  content: "▸";
  position: absolute;
  right: 20px;
  transition: transform 0.3s ease;
}
.submenu-toggle.active::after {
  transform: rotate(90deg);
}
