/* Navbar vertical a la izquierda */
ul {
  list-style: none;
  margin: 0;
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: 100vh;
  background: linear-gradient(180deg, #111 0%, #1c1c1c 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.3);
  border-right: 2px solid #222;
  overflow: hidden;
}

/* Ítems */
ul li {
  color: #fff;
  font-size: 25px;
  width: 100px;
  flex: 1; /* ocupa espacio proporcional */
  cursor: pointer;
  transition: all 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  border-bottom: 1px solid rgb(100, 92, 92);
  box-sizing: border-box;
  position: relative; /* para el a absoluto dentro */
}

/* El último sin línea */
ul li:last-child {
  border-bottom: none;
}

/* Texto rotado */
ul li span {
  display: inline-block;
  transform: rotate(-90deg);
  transition: transform 0.5s ease, margin-left 0.5s ease;
  white-space: nowrap; 
  pointer-events: none; /* para que el span no bloquee el clic */
}

/* Hover → se expande horizontalmente */
ul li:hover {
  width: 350px;
  flex: 2; /* hace que crezca verticalmente y mueva las demás líneas */
  font-size: 40px;
  background-color: #2c2a2a;
}

/* El texto se endereza al hacer hover */
ul li:hover span {
  transform: rotate(0deg);
  margin-left: 20px;
}

/* Links */
a, a i {
    text-decoration: none !important;
    color: white;
}

/* El <a> ocupa todo el <li> */
ul li a {
    position: absolute; /* ocupa todo el li */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    z-index: 1;
}

.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease-in-out;
  z-index: 9999;
  pointer-events: none;
}
/* Adaptación móvil del navbar */
@media (max-width: 768px) {

  ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg, #111 0%, #1c1c1c 100%);
    border-right: none;
    border-bottom: 2px solid #222;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 1000;
  }

  ul li {
    flex: none;
    width: auto;
    font-size: 1rem;
    border-bottom: none;
    padding: 10px;
    transition: none;
  }

  ul li span {
    transform: rotate(0deg);
    margin: 0;
    font-size: 0.9rem;
  }

  ul li:hover {
    width: auto;
    font-size: 1rem;
    background-color: transparent;
  }

  ul li:hover span {
    margin-left: 0;
  }

  ul li a {
    position: relative;
    width: auto;
    height: auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
