/* Solo lo esencial fuera de la media query */
.menu-hamburguesa {
  display: none;
  animation: menu-rebote 0.6s;
}

@keyframes menu-rebote {
  0% {
    transform: translateY(-20px) scale(0.96);
  }

  60% {
    transform: translateY(8px) scale(1.03);
  }

  80% {
    transform: translateY(-2px) scale(0.98);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .hamburguesa-contenedor {
    position: static;
    flex-basis: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    z-index: 1100;
    order: 3;
    margin-left: 1rem;
  }

  .menu-hamburguesa {
    width: 50px;
    height: 50px;
    display: block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1101;

    .linea {
      width: 32px;
      height: 4px;
      margin: 5px 0;
      background: #222;
      border-radius: 2px;
      display: block;
      transition: all 0.3s;
      font-size: 0.5rem;
    }

    &.activo {
      .linea:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
      }

      .linea:nth-child(2) {
        opacity: 0;
      }

      .linea:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
      }
    }
  }

  .menu-principal {
    display: none;
    order: 2;
    padding-right: 0;

    &.abierto {
      display: flex;
      position: absolute;
      top: 100%;
      left: 0;
      height: 50px;
      width: 100%;
      align-items: center;
      background: var(--blanco);
      box-shadow: 0 0 12px 2px rgba(120, 39, 139, 0.15);
      border: 1px solid var(--morado);
      border-radius: var(--borde-radio-grande);
      outline-offset: -2px;

      ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
      }

      a {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
      }
    }
  }

  .encabezado-contenido {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    h1 {
      order: 1;
      margin-bottom: 0;
      text-align: center;
    }
  }
}